@umituz/react-native-localization 3.5.50 → 3.5.52

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.50",
3
+ "version": "3.5.52",
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",
@@ -40,14 +40,12 @@ export const useTranslationFunction = () => {
40
40
 
41
41
  let finalResult: string;
42
42
  let translationFound = false;
43
- let usedKey = key;
44
43
 
45
44
  // If key already has namespace separator (:), use as-is
46
45
  if (key.includes(':')) {
47
46
  const result = i18nextT(key, options);
48
47
  finalResult = typeof result === 'string' ? result : key;
49
48
  translationFound = finalResult !== key && finalResult !== options.defaultValue;
50
- usedKey = key;
51
49
  } else {
52
50
  // Auto-detect namespace from first dot segment
53
51
  const firstDotIndex = key.indexOf('.');
@@ -63,27 +61,23 @@ export const useTranslationFunction = () => {
63
61
  if (namespacedResult !== namespacedKey && namespacedResult !== restOfKey) {
64
62
  finalResult = typeof namespacedResult === 'string' ? namespacedResult : key;
65
63
  translationFound = true;
66
- usedKey = namespacedKey;
67
64
  } else {
68
65
  // Fallback to original key
69
66
  const result = i18nextT(key, options);
70
67
  finalResult = typeof result === 'string' ? result : key;
71
68
  translationFound = finalResult !== key && finalResult !== options.defaultValue;
72
- usedKey = key;
73
69
  }
74
70
  } else {
75
71
  // Fallback to original key
76
72
  const result = i18nextT(key, options);
77
73
  finalResult = typeof result === 'string' ? result : key;
78
74
  translationFound = finalResult !== key && finalResult !== options.defaultValue;
79
- usedKey = key;
80
75
  }
81
76
  } else {
82
77
  // Fallback to original key
83
78
  const result = i18nextT(key, options);
84
79
  finalResult = typeof result === 'string' ? result : key;
85
80
  translationFound = finalResult !== key && finalResult !== options.defaultValue;
86
- usedKey = key;
87
81
  }
88
82
  }
89
83