@umituz/react-native-settings 4.23.133 → 4.23.134
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-settings",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.134",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -17,13 +17,7 @@ async function translateMissing(targetDir, srcDir) {
|
|
|
17
17
|
const localesDir = path.resolve(process.cwd(), targetDir);
|
|
18
18
|
const enUSPath = path.join(localesDir, 'en-US.ts');
|
|
19
19
|
|
|
20
|
-
// Integrated Workflow: Ensure setup and sync
|
|
21
20
|
const skipSync = process.argv.includes('--no-sync');
|
|
22
|
-
const forceRetranslate = process.argv.includes('--force');
|
|
23
|
-
|
|
24
|
-
if (forceRetranslate) {
|
|
25
|
-
console.log('⚠️ Force re-translation mode enabled. All keys will be re-translated.\n');
|
|
26
|
-
}
|
|
27
21
|
|
|
28
22
|
if (!fs.existsSync(path.join(localesDir, 'index.ts'))) {
|
|
29
23
|
console.log('🔄 Initializing localization setup...');
|
|
@@ -58,7 +52,7 @@ async function translateMissing(targetDir, srcDir) {
|
|
|
58
52
|
const target = parseTypeScriptFile(targetPath);
|
|
59
53
|
|
|
60
54
|
const stats = { count: 0, checked: 0, translatedKeys: [] };
|
|
61
|
-
await translateObject(enUS, target, targetLang, '', stats, { forceRetranslate });
|
|
55
|
+
await translateObject(enUS, target, targetLang, '', stats, { forceRetranslate: true });
|
|
62
56
|
|
|
63
57
|
// Clear progress line
|
|
64
58
|
process.stdout.write('\r' + ' '.repeat(80) + '\r');
|
|
@@ -87,8 +81,9 @@ async function translateMissing(targetDir, srcDir) {
|
|
|
87
81
|
}
|
|
88
82
|
|
|
89
83
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
90
|
-
const
|
|
91
|
-
const
|
|
84
|
+
const args = process.argv.slice(2).filter(arg => !arg.startsWith('--'));
|
|
85
|
+
const targetDir = args[0] || 'src/domains/localization/infrastructure/locales';
|
|
86
|
+
const srcDir = args[1];
|
|
92
87
|
console.log('🚀 Starting integrated translation workflow...');
|
|
93
88
|
translateMissing(targetDir, srcDir).catch(err => {
|
|
94
89
|
console.error('\n❌ Translation workflow failed:', err.message);
|