@umituz/react-native-localization 3.5.30 → 3.5.32

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.30",
3
+ "version": "3.5.32",
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",
@@ -54,7 +54,13 @@ function needsTranslation(value, enValue) {
54
54
 
55
55
  if (!value || typeof value !== 'string') return true;
56
56
 
57
- if (value === enValue) return true;
57
+ if (value === enValue) {
58
+ const isSingleWord = !enValue.includes(' ') && enValue.length < 20;
59
+ if (isSingleWord) {
60
+ return false;
61
+ }
62
+ return true;
63
+ }
58
64
 
59
65
  return false;
60
66
  }
@@ -83,8 +89,6 @@ async function translateObject(enObj, targetObj, targetLang, path = '', stats =
83
89
  targetObj[key][i] = translated;
84
90
  stats.count++;
85
91
  if (isNewKey) stats.newKeys.push(`${currentPath}[${i}]`);
86
- } else {
87
- console.log(` ⏭️ Skipped (universal word): ${currentPath}[${i}]`);
88
92
  }
89
93
 
90
94
  await delay(200);
@@ -109,8 +113,6 @@ async function translateObject(enObj, targetObj, targetLang, path = '', stats =
109
113
  targetObj[key] = translated;
110
114
  stats.count++;
111
115
  if (isNewKey) stats.newKeys.push(currentPath);
112
- } else {
113
- console.log(` ⏭️ Skipped (universal word): ${currentPath}`);
114
116
  }
115
117
 
116
118
  await delay(200);