@umituz/react-native-localization 3.5.33 → 3.5.34
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-localization",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.34",
|
|
4
4
|
"description": "Generic localization system for React Native apps with i18n support",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
"README.md",
|
|
51
51
|
"LICENSE"
|
|
52
52
|
]
|
|
53
|
-
}
|
|
53
|
+
}
|
|
@@ -103,10 +103,10 @@ async function translateObject(enObj, targetObj, targetLang, path = '', stats =
|
|
|
103
103
|
} else if (typeof enValue === 'string') {
|
|
104
104
|
if (needsTranslation(targetValue, enValue)) {
|
|
105
105
|
const translated = await translateText(enValue, targetLang);
|
|
106
|
+
const isNewKey = targetValue === undefined;
|
|
106
107
|
|
|
107
|
-
if (translated !== enValue) {
|
|
108
|
+
if (translated !== enValue || isNewKey) {
|
|
108
109
|
const preview = enValue.length > 40 ? enValue.substring(0, 40) + '...' : enValue;
|
|
109
|
-
const isNewKey = targetValue === enValue;
|
|
110
110
|
const prefix = isNewKey ? '🆕 NEW' : '🔄';
|
|
111
111
|
console.log(` ${prefix} ${currentPath}: "${preview}"`);
|
|
112
112
|
|