i18n-keyless-react 1.14.8 → 1.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +2 -2
- package/dist/store.js +9 -2
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18n-keyless-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"postpublish": "rm -rf ./dist && rm *.tgz"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"i18n-keyless-core": "1.14.
|
|
20
|
+
"i18n-keyless-core": "1.14.9",
|
|
21
21
|
"zustand": "^5.0.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
package/dist/store.js
CHANGED
|
@@ -201,10 +201,17 @@ export function getTranslation(key, options) {
|
|
|
201
201
|
const store = useI18nKeyless.getState();
|
|
202
202
|
const lastUpdatedAt = new Date().toISOString().split("T")[0];
|
|
203
203
|
if (options?.context) {
|
|
204
|
-
|
|
204
|
+
useI18nKeyless.setState({
|
|
205
|
+
lastUsedTranslations: {
|
|
206
|
+
...store.lastUsedTranslations,
|
|
207
|
+
[`${key}__${options.context}`]: lastUpdatedAt,
|
|
208
|
+
},
|
|
209
|
+
});
|
|
205
210
|
}
|
|
206
211
|
else {
|
|
207
|
-
|
|
212
|
+
useI18nKeyless.setState({
|
|
213
|
+
lastUsedTranslations: { ...store.lastUsedTranslations, [key]: lastUpdatedAt },
|
|
214
|
+
});
|
|
208
215
|
}
|
|
209
216
|
return getTranslationCore(key, store, options);
|
|
210
217
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18n-keyless-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"postpublish": "rm -rf ./dist && rm *.tgz"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"i18n-keyless-core": "1.14.
|
|
20
|
+
"i18n-keyless-core": "1.14.9",
|
|
21
21
|
"zustand": "^5.0.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|