@scoutello/i18n-magic 0.57.3 → 0.57.4
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/commands/sync-locales.d.ts.map +1 -1
- package/dist/commands/sync-locales.js +117 -97
- package/dist/commands/sync-locales.js.map +1 -1
- package/dist/lib/languges.d.ts.map +1 -1
- package/dist/lib/languges.js +5 -0
- package/dist/lib/languges.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/sync-locales.ts +242 -231
- package/src/lib/languges.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-locales.d.ts","sourceRoot":"","sources":["../../src/commands/sync-locales.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAepD,eAAO,MAAM,WAAW,GAAU,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"sync-locales.d.ts","sourceRoot":"","sources":["../../src/commands/sync-locales.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAepD,eAAO,MAAM,WAAW,GAAU,QAAQ,aAAa,kBAuUtD,CAAA"}
|
|
@@ -14,46 +14,20 @@ export const syncLocales = async (config) => {
|
|
|
14
14
|
console.log(chalk.dim(` Default locale: ${chalk.white(getLanguageLabel(defaultLocale))}`));
|
|
15
15
|
console.log(chalk.dim(` Namespaces: ${chalk.white(namespaces.join(", "))}`));
|
|
16
16
|
console.log(chalk.dim(` Target languages: ${chalk.white(localesToProcess.length)}\n`));
|
|
17
|
-
//
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const emptyBar = options.barIncompleteString?.substring(0, options.barsize - bar.length) || "";
|
|
26
|
-
// Color the bar based on progress
|
|
27
|
-
let coloredBar;
|
|
28
|
-
if (params.progress >= 1) {
|
|
29
|
-
coloredBar = chalk.green(bar) + chalk.gray(emptyBar);
|
|
30
|
-
}
|
|
31
|
-
else if (params.progress >= 0.5) {
|
|
32
|
-
coloredBar = chalk.yellow(bar) + chalk.gray(emptyBar);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
coloredBar = chalk.cyan(bar) + chalk.gray(emptyBar);
|
|
36
|
-
}
|
|
37
|
-
const percentage = Math.round(params.progress * 100);
|
|
38
|
-
const paddedLang = lang.padEnd(12);
|
|
39
|
-
const paddedStatus = status.padEnd(20);
|
|
40
|
-
return ` ${chalk.white(paddedLang)} ${coloredBar} ${chalk.dim(percentage.toString().padStart(3))}% ${chalk.dim(paddedStatus)}`;
|
|
41
|
-
},
|
|
17
|
+
// Track results for each locale
|
|
18
|
+
const localeResults = {};
|
|
19
|
+
for (const locale of localesToProcess) {
|
|
20
|
+
localeResults[locale] = { status: "pending", translated: 0, reused: 0 };
|
|
21
|
+
}
|
|
22
|
+
// Create a single progress bar for overall progress
|
|
23
|
+
const progressBar = new cliProgress.SingleBar({
|
|
24
|
+
format: ` Progress |${chalk.cyan("{bar}")}| {percentage}% | {current}/{total} languages | {status}`,
|
|
42
25
|
barCompleteChar: "█",
|
|
43
26
|
barIncompleteChar: "░",
|
|
44
|
-
|
|
27
|
+
hideCursor: true,
|
|
28
|
+
clearOnComplete: false,
|
|
45
29
|
}, cliProgress.Presets.shades_classic);
|
|
46
|
-
|
|
47
|
-
const progressBars = {};
|
|
48
|
-
const localeStats = {};
|
|
49
|
-
for (const locale of localesToProcess) {
|
|
50
|
-
const langLabel = getLanguageLabel(locale);
|
|
51
|
-
progressBars[locale] = multibar.create(100, 0, {
|
|
52
|
-
language: langLabel,
|
|
53
|
-
status: "Waiting...",
|
|
54
|
-
});
|
|
55
|
-
localeStats[locale] = { missing: 0, reused: 0, translated: 0 };
|
|
56
|
-
}
|
|
30
|
+
progressBar.start(localesToProcess.length, 0, { status: "Starting...", current: 0 });
|
|
57
31
|
try {
|
|
58
32
|
// Helper to ensure a locale/namespace file exists before we add keys
|
|
59
33
|
const ensureLocaleNamespaceFile = async (locale, namespace) => {
|
|
@@ -68,16 +42,18 @@ export const syncLocales = async (config) => {
|
|
|
68
42
|
};
|
|
69
43
|
// Ensure all default-locale namespace files exist first
|
|
70
44
|
await Promise.all(namespaces.map((namespace) => ensureLocaleNamespaceFile(defaultLocale, namespace)));
|
|
71
|
-
// Process
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const
|
|
45
|
+
// Process locales sequentially for clean output
|
|
46
|
+
let completedCount = 0;
|
|
47
|
+
for (const locale of localesToProcess) {
|
|
48
|
+
const langLabel = getLanguageLabel(locale);
|
|
49
|
+
localeResults[locale].status = "processing";
|
|
50
|
+
progressBar.update(completedCount, {
|
|
51
|
+
status: `Processing ${chalk.white(langLabel)}...`,
|
|
52
|
+
current: completedCount
|
|
53
|
+
});
|
|
75
54
|
try {
|
|
76
|
-
//
|
|
77
|
-
bar.update(5, { status: "Loading files..." });
|
|
78
|
-
// Ensure all namespace files for this locale exist before filling keys
|
|
55
|
+
// Ensure all namespace files for this locale exist
|
|
79
56
|
await Promise.all(namespaces.map((namespace) => ensureLocaleNamespaceFile(locale, namespace)));
|
|
80
|
-
bar.update(10, { status: "Analyzing keys..." });
|
|
81
57
|
// Collect all missing keys for this locale across all namespaces
|
|
82
58
|
const allMissingKeys = {};
|
|
83
59
|
const namespaceKeys = {};
|
|
@@ -91,20 +67,16 @@ export const syncLocales = async (config) => {
|
|
|
91
67
|
localeKeys,
|
|
92
68
|
};
|
|
93
69
|
}));
|
|
94
|
-
bar.update(20, { status: "Finding missing..." });
|
|
95
70
|
// Process results and collect missing keys
|
|
96
71
|
for (const result of namespaceResults) {
|
|
97
72
|
const { namespace, defaultLocaleKeys, localeKeys } = result;
|
|
98
73
|
namespaceKeys[namespace] = localeKeys;
|
|
99
|
-
// Check which keys from default locale are missing in current locale
|
|
100
74
|
for (const [key, value] of Object.entries(defaultLocaleKeys)) {
|
|
101
75
|
if (!localeKeys[key]) {
|
|
102
76
|
if (allMissingKeys[key]) {
|
|
103
|
-
// Key already exists, add this namespace to the list
|
|
104
77
|
allMissingKeys[key].namespaces.push(namespace);
|
|
105
78
|
}
|
|
106
79
|
else {
|
|
107
|
-
// New missing key
|
|
108
80
|
allMissingKeys[key] = {
|
|
109
81
|
value,
|
|
110
82
|
namespaces: [namespace],
|
|
@@ -114,33 +86,37 @@ export const syncLocales = async (config) => {
|
|
|
114
86
|
}
|
|
115
87
|
}
|
|
116
88
|
const missingKeysList = Object.keys(allMissingKeys);
|
|
117
|
-
stats.missing = missingKeysList.length;
|
|
118
89
|
if (missingKeysList.length === 0) {
|
|
119
|
-
|
|
120
|
-
|
|
90
|
+
localeResults[locale].status = "done";
|
|
91
|
+
completedCount++;
|
|
92
|
+
progressBar.update(completedCount, {
|
|
93
|
+
status: `${chalk.white(langLabel)} ${chalk.green("✓")} up to date`,
|
|
94
|
+
current: completedCount
|
|
95
|
+
});
|
|
96
|
+
continue;
|
|
121
97
|
}
|
|
122
|
-
//
|
|
123
|
-
bar.update(25, { status: `Checking ${missingKeysList.length} keys...` });
|
|
98
|
+
// Check for existing translations
|
|
124
99
|
const keysToTranslate = {};
|
|
125
100
|
const existingTranslations = {};
|
|
126
101
|
const existingTranslationResults = await findExistingTranslations(missingKeysList, namespaces, locale, loadPath, { silent: true });
|
|
127
|
-
bar.update(40, { status: "Processing results..." });
|
|
128
102
|
for (const key of missingKeysList) {
|
|
129
103
|
const existingValue = existingTranslationResults[key];
|
|
130
|
-
// Use explicit null check instead of truthy check to handle empty string values
|
|
131
104
|
if (existingValue !== null) {
|
|
132
105
|
existingTranslations[key] = existingValue;
|
|
133
|
-
|
|
106
|
+
localeResults[locale].reused++;
|
|
134
107
|
}
|
|
135
108
|
else {
|
|
136
109
|
keysToTranslate[key] = allMissingKeys[key].value;
|
|
137
110
|
}
|
|
138
111
|
}
|
|
139
112
|
let translatedValues = {};
|
|
140
|
-
//
|
|
113
|
+
// Translate if needed
|
|
141
114
|
if (Object.keys(keysToTranslate).length > 0) {
|
|
142
115
|
const keysCount = Object.keys(keysToTranslate).length;
|
|
143
|
-
|
|
116
|
+
progressBar.update(completedCount, {
|
|
117
|
+
status: `${chalk.white(langLabel)} translating ${keysCount} keys...`,
|
|
118
|
+
current: completedCount
|
|
119
|
+
});
|
|
144
120
|
try {
|
|
145
121
|
translatedValues = await translateKey({
|
|
146
122
|
inputLanguage: defaultLocale,
|
|
@@ -150,18 +126,21 @@ export const syncLocales = async (config) => {
|
|
|
150
126
|
openai,
|
|
151
127
|
model: config.model,
|
|
152
128
|
});
|
|
153
|
-
|
|
129
|
+
localeResults[locale].translated = Object.keys(translatedValues).length;
|
|
154
130
|
}
|
|
155
131
|
catch (error) {
|
|
156
|
-
|
|
157
|
-
|
|
132
|
+
localeResults[locale].status = "error";
|
|
133
|
+
localeResults[locale].error = error instanceof Error ? error.message : "Translation failed";
|
|
134
|
+
completedCount++;
|
|
135
|
+
progressBar.update(completedCount, {
|
|
136
|
+
status: `${chalk.white(langLabel)} ${chalk.red("✗")} translation failed`,
|
|
137
|
+
current: completedCount
|
|
138
|
+
});
|
|
139
|
+
continue;
|
|
158
140
|
}
|
|
159
141
|
}
|
|
160
|
-
|
|
161
|
-
// Stage 4: Save (80-100%)
|
|
162
|
-
// Combine existing translations with new translations
|
|
142
|
+
// Combine and save
|
|
163
143
|
const allTranslations = { ...existingTranslations, ...translatedValues };
|
|
164
|
-
// Distribute translations to all relevant namespaces in parallel
|
|
165
144
|
await Promise.all(namespaces.map(async (namespace) => {
|
|
166
145
|
let hasChanges = false;
|
|
167
146
|
const updatedKeys = { ...namespaceKeys[namespace] };
|
|
@@ -173,52 +152,93 @@ export const syncLocales = async (config) => {
|
|
|
173
152
|
}
|
|
174
153
|
}
|
|
175
154
|
if (hasChanges) {
|
|
176
|
-
|
|
177
|
-
await writeLocalesFile(savePath, locale, namespace, updatedKeys);
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
throw new TranslationError(`Failed to save translations for locale "${locale}" (namespace: ${namespace})`, locale, namespace, error instanceof Error ? error : undefined);
|
|
181
|
-
}
|
|
155
|
+
await writeLocalesFile(savePath, locale, namespace, updatedKeys);
|
|
182
156
|
}
|
|
183
157
|
}));
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
158
|
+
localeResults[locale].status = "done";
|
|
159
|
+
completedCount++;
|
|
160
|
+
const translated = localeResults[locale].translated;
|
|
161
|
+
const reused = localeResults[locale].reused;
|
|
162
|
+
const statusText = translated > 0
|
|
163
|
+
? `+${translated} translated`
|
|
164
|
+
: `${reused} reused`;
|
|
165
|
+
progressBar.update(completedCount, {
|
|
166
|
+
status: `${chalk.white(langLabel)} ${chalk.green("✓")} ${statusText}`,
|
|
167
|
+
current: completedCount
|
|
168
|
+
});
|
|
189
169
|
}
|
|
190
170
|
catch (error) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
171
|
+
localeResults[locale].status = "error";
|
|
172
|
+
localeResults[locale].error = error instanceof Error ? error.message : "Unknown error";
|
|
173
|
+
completedCount++;
|
|
174
|
+
progressBar.update(completedCount, {
|
|
175
|
+
status: `${chalk.white(langLabel)} ${chalk.red("✗")} error`,
|
|
176
|
+
current: completedCount
|
|
177
|
+
});
|
|
196
178
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
multibar.stop();
|
|
179
|
+
}
|
|
180
|
+
progressBar.stop();
|
|
200
181
|
// Print summary
|
|
201
182
|
console.log("");
|
|
202
183
|
console.log(chalk.green("✨ Sync complete!\n"));
|
|
203
|
-
//
|
|
204
|
-
let totalMissing = 0;
|
|
205
|
-
let totalReused = 0;
|
|
184
|
+
// Count totals
|
|
206
185
|
let totalTranslated = 0;
|
|
186
|
+
let totalReused = 0;
|
|
187
|
+
let totalErrors = 0;
|
|
207
188
|
for (const locale of localesToProcess) {
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
totalReused +=
|
|
211
|
-
|
|
189
|
+
const result = localeResults[locale];
|
|
190
|
+
totalTranslated += result.translated;
|
|
191
|
+
totalReused += result.reused;
|
|
192
|
+
if (result.status === "error")
|
|
193
|
+
totalErrors++;
|
|
194
|
+
}
|
|
195
|
+
// Show summary table
|
|
196
|
+
console.log(chalk.dim(" Results by language:"));
|
|
197
|
+
console.log("");
|
|
198
|
+
// Group results into columns for compact display
|
|
199
|
+
const doneLocales = localesToProcess.filter(l => localeResults[l].status === "done");
|
|
200
|
+
const errorLocales = localesToProcess.filter(l => localeResults[l].status === "error");
|
|
201
|
+
// Show successful languages in a compact grid
|
|
202
|
+
if (doneLocales.length > 0) {
|
|
203
|
+
const columns = 4;
|
|
204
|
+
const rows = Math.ceil(doneLocales.length / columns);
|
|
205
|
+
for (let row = 0; row < rows; row++) {
|
|
206
|
+
let line = " ";
|
|
207
|
+
for (let col = 0; col < columns; col++) {
|
|
208
|
+
const idx = row + col * rows;
|
|
209
|
+
if (idx < doneLocales.length) {
|
|
210
|
+
const locale = doneLocales[idx];
|
|
211
|
+
const result = localeResults[locale];
|
|
212
|
+
const label = getLanguageLabel(locale).substring(0, 12).padEnd(12);
|
|
213
|
+
const count = result.translated > 0
|
|
214
|
+
? chalk.cyan(`+${result.translated}`.padStart(4))
|
|
215
|
+
: chalk.dim(`${result.reused}`.padStart(4));
|
|
216
|
+
line += `${chalk.green("✓")} ${label} ${count} `;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
console.log(line);
|
|
220
|
+
}
|
|
212
221
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
console.log(chalk.dim(` • ${chalk.white(totalTranslated)} keys translated`));
|
|
216
|
-
console.log(chalk.dim(` • ${chalk.white(totalReused)} keys reused from other namespaces`));
|
|
222
|
+
// Show errors if any
|
|
223
|
+
if (errorLocales.length > 0) {
|
|
217
224
|
console.log("");
|
|
225
|
+
console.log(chalk.red(" Errors:"));
|
|
226
|
+
for (const locale of errorLocales) {
|
|
227
|
+
const result = localeResults[locale];
|
|
228
|
+
console.log(chalk.red(` ✗ ${getLanguageLabel(locale)}: ${result.error}`));
|
|
229
|
+
}
|
|
218
230
|
}
|
|
231
|
+
console.log("");
|
|
232
|
+
console.log(chalk.dim(" Summary:"));
|
|
233
|
+
console.log(chalk.dim(` • ${chalk.white(totalTranslated)} keys translated`));
|
|
234
|
+
console.log(chalk.dim(` • ${chalk.white(totalReused)} keys reused`));
|
|
235
|
+
if (totalErrors > 0) {
|
|
236
|
+
console.log(chalk.dim(` • ${chalk.red(totalErrors)} languages failed`));
|
|
237
|
+
}
|
|
238
|
+
console.log("");
|
|
219
239
|
}
|
|
220
240
|
catch (error) {
|
|
221
|
-
|
|
241
|
+
progressBar.stop();
|
|
222
242
|
if (error instanceof TranslationError) {
|
|
223
243
|
throw error;
|
|
224
244
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-locales.js","sourceRoot":"","sources":["../../src/commands/sync-locales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAU,EAAE;IAClD,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAA;IACtD,OAAO,IAAI,EAAE,KAAK,IAAI,MAAM,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,EAAE,MAAqB,EAAE,EAAE;IACzD,MAAM,EACJ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,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;QACtE,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAEjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,IAAI,EAAE,CAAA;QAClB,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;YACtC,MAAM,KAAK,CAAA;QACb,CAAC;QACD,MAAM,IAAI,gBAAgB,CACxB,iDAAiD,EACjD,SAAS,EACT,SAAS,EACT,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAA;IACH,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languges.d.ts","sourceRoot":"","sources":["../../src/lib/languges.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"languges.d.ts","sourceRoot":"","sources":["../../src/lib/languges.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;GAkJrB,CAAA"}
|
package/dist/lib/languges.js
CHANGED
package/dist/lib/languges.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"languges.js","sourceRoot":"","sources":["../../src/lib/languges.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,SAAS;QAChB,IA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KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,IAAI;KACZ;CACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"languges.js","sourceRoot":"","sources":["../../src/lib/languges.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,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AE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,IAAI;KACZ;IACD;QACE,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACZ;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scoutello/i18n-magic",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Intelligent CLI toolkit that automates internationalization workflows with AI-powered translations for JavaScript/TypeScript projects",
|
|
@@ -34,53 +34,29 @@ export const syncLocales = async (config: Configuration) => {
|
|
|
34
34
|
console.log(chalk.dim(` Namespaces: ${chalk.white(namespaces.join(", "))}`))
|
|
35
35
|
console.log(chalk.dim(` Target languages: ${chalk.white(localesToProcess.length)}\n`))
|
|
36
36
|
|
|
37
|
-
//
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const status = payload.status || ""
|
|
45
|
-
const bar = options.barCompleteString?.substring(0, Math.round(params.progress * options.barsize!)) || ""
|
|
46
|
-
const emptyBar = options.barIncompleteString?.substring(0, options.barsize! - bar.length) || ""
|
|
47
|
-
|
|
48
|
-
// Color the bar based on progress
|
|
49
|
-
let coloredBar: string
|
|
50
|
-
if (params.progress >= 1) {
|
|
51
|
-
coloredBar = chalk.green(bar) + chalk.gray(emptyBar)
|
|
52
|
-
} else if (params.progress >= 0.5) {
|
|
53
|
-
coloredBar = chalk.yellow(bar) + chalk.gray(emptyBar)
|
|
54
|
-
} else {
|
|
55
|
-
coloredBar = chalk.cyan(bar) + chalk.gray(emptyBar)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const percentage = Math.round(params.progress * 100)
|
|
59
|
-
const paddedLang = lang.padEnd(12)
|
|
60
|
-
const paddedStatus = status.padEnd(20)
|
|
61
|
-
|
|
62
|
-
return ` ${chalk.white(paddedLang)} ${coloredBar} ${chalk.dim(percentage.toString().padStart(3))}% ${chalk.dim(paddedStatus)}`
|
|
63
|
-
},
|
|
64
|
-
barCompleteChar: "█",
|
|
65
|
-
barIncompleteChar: "░",
|
|
66
|
-
barsize: 25,
|
|
67
|
-
},
|
|
68
|
-
cliProgress.Presets.shades_classic,
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
// Create a progress bar for each locale
|
|
72
|
-
const progressBars: Record<string, cliProgress.SingleBar> = {}
|
|
73
|
-
const localeStats: Record<string, { missing: number; reused: number; translated: number }> = {}
|
|
37
|
+
// Track results for each locale
|
|
38
|
+
const localeResults: Record<string, {
|
|
39
|
+
status: "pending" | "processing" | "done" | "error"
|
|
40
|
+
translated: number
|
|
41
|
+
reused: number
|
|
42
|
+
error?: string
|
|
43
|
+
}> = {}
|
|
74
44
|
|
|
75
45
|
for (const locale of localesToProcess) {
|
|
76
|
-
|
|
77
|
-
progressBars[locale] = multibar.create(100, 0, {
|
|
78
|
-
language: langLabel,
|
|
79
|
-
status: "Waiting...",
|
|
80
|
-
})
|
|
81
|
-
localeStats[locale] = { missing: 0, reused: 0, translated: 0 }
|
|
46
|
+
localeResults[locale] = { status: "pending", translated: 0, reused: 0 }
|
|
82
47
|
}
|
|
83
48
|
|
|
49
|
+
// Create a single progress bar for overall progress
|
|
50
|
+
const progressBar = new cliProgress.SingleBar({
|
|
51
|
+
format: ` Progress |${chalk.cyan("{bar}")}| {percentage}% | {current}/{total} languages | {status}`,
|
|
52
|
+
barCompleteChar: "█",
|
|
53
|
+
barIncompleteChar: "░",
|
|
54
|
+
hideCursor: true,
|
|
55
|
+
clearOnComplete: false,
|
|
56
|
+
}, cliProgress.Presets.shades_classic)
|
|
57
|
+
|
|
58
|
+
progressBar.start(localesToProcess.length, 0, { status: "Starting...", current: 0 })
|
|
59
|
+
|
|
84
60
|
try {
|
|
85
61
|
// Helper to ensure a locale/namespace file exists before we add keys
|
|
86
62
|
const ensureLocaleNamespaceFile = async (
|
|
@@ -104,224 +80,259 @@ export const syncLocales = async (config: Configuration) => {
|
|
|
104
80
|
),
|
|
105
81
|
)
|
|
106
82
|
|
|
107
|
-
// Process
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
} else {
|
|
172
|
-
// New missing key
|
|
173
|
-
allMissingKeys[key] = {
|
|
174
|
-
value,
|
|
175
|
-
namespaces: [namespace],
|
|
176
|
-
}
|
|
83
|
+
// Process locales sequentially for clean output
|
|
84
|
+
let completedCount = 0
|
|
85
|
+
|
|
86
|
+
for (const locale of localesToProcess) {
|
|
87
|
+
const langLabel = getLanguageLabel(locale)
|
|
88
|
+
localeResults[locale].status = "processing"
|
|
89
|
+
progressBar.update(completedCount, {
|
|
90
|
+
status: `Processing ${chalk.white(langLabel)}...`,
|
|
91
|
+
current: completedCount
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
// Ensure all namespace files for this locale exist
|
|
96
|
+
await Promise.all(
|
|
97
|
+
namespaces.map((namespace) =>
|
|
98
|
+
ensureLocaleNamespaceFile(locale, namespace),
|
|
99
|
+
),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
// Collect all missing keys for this locale across all namespaces
|
|
103
|
+
const allMissingKeys: Record<
|
|
104
|
+
string,
|
|
105
|
+
{ value: string; namespaces: string[] }
|
|
106
|
+
> = {}
|
|
107
|
+
const namespaceKeys: Record<string, Record<string, string>> = {}
|
|
108
|
+
|
|
109
|
+
// Load existing keys for all namespaces in parallel
|
|
110
|
+
const namespaceResults = await Promise.all(
|
|
111
|
+
namespaces.map(async (namespace) => {
|
|
112
|
+
const defaultLocaleKeys = await loadLocalesFile(
|
|
113
|
+
loadPath,
|
|
114
|
+
defaultLocale,
|
|
115
|
+
namespace,
|
|
116
|
+
{ silent: true },
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
const localeKeys = await loadLocalesFile(
|
|
120
|
+
loadPath,
|
|
121
|
+
locale,
|
|
122
|
+
namespace,
|
|
123
|
+
{ silent: true },
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
namespace,
|
|
128
|
+
defaultLocaleKeys,
|
|
129
|
+
localeKeys,
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
// Process results and collect missing keys
|
|
135
|
+
for (const result of namespaceResults) {
|
|
136
|
+
const { namespace, defaultLocaleKeys, localeKeys } = result
|
|
137
|
+
namespaceKeys[namespace] = localeKeys
|
|
138
|
+
|
|
139
|
+
for (const [key, value] of Object.entries(defaultLocaleKeys)) {
|
|
140
|
+
if (!localeKeys[key]) {
|
|
141
|
+
if (allMissingKeys[key]) {
|
|
142
|
+
allMissingKeys[key].namespaces.push(namespace)
|
|
143
|
+
} else {
|
|
144
|
+
allMissingKeys[key] = {
|
|
145
|
+
value,
|
|
146
|
+
namespaces: [namespace],
|
|
177
147
|
}
|
|
178
148
|
}
|
|
179
149
|
}
|
|
180
150
|
}
|
|
151
|
+
}
|
|
181
152
|
|
|
182
|
-
|
|
183
|
-
stats.missing = missingKeysList.length
|
|
184
|
-
|
|
185
|
-
if (missingKeysList.length === 0) {
|
|
186
|
-
bar.update(100, { status: chalk.green("✓ Up to date") })
|
|
187
|
-
return
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Stage 2: Check for existing translations (20-40%)
|
|
191
|
-
bar.update(25, { status: `Checking ${missingKeysList.length} keys...` })
|
|
192
|
-
|
|
193
|
-
const keysToTranslate: Record<string, string> = {}
|
|
194
|
-
const existingTranslations: Record<string, string> = {}
|
|
195
|
-
|
|
196
|
-
const existingTranslationResults = await findExistingTranslations(
|
|
197
|
-
missingKeysList,
|
|
198
|
-
namespaces,
|
|
199
|
-
locale,
|
|
200
|
-
loadPath,
|
|
201
|
-
{ silent: true },
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
bar.update(40, { status: "Processing results..." })
|
|
153
|
+
const missingKeysList = Object.keys(allMissingKeys)
|
|
205
154
|
|
|
206
|
-
|
|
207
|
-
|
|
155
|
+
if (missingKeysList.length === 0) {
|
|
156
|
+
localeResults[locale].status = "done"
|
|
157
|
+
completedCount++
|
|
158
|
+
progressBar.update(completedCount, {
|
|
159
|
+
status: `${chalk.white(langLabel)} ${chalk.green("✓")} up to date`,
|
|
160
|
+
current: completedCount
|
|
161
|
+
})
|
|
162
|
+
continue
|
|
163
|
+
}
|
|
208
164
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
165
|
+
// Check for existing translations
|
|
166
|
+
const keysToTranslate: Record<string, string> = {}
|
|
167
|
+
const existingTranslations: Record<string, string> = {}
|
|
168
|
+
|
|
169
|
+
const existingTranslationResults = await findExistingTranslations(
|
|
170
|
+
missingKeysList,
|
|
171
|
+
namespaces,
|
|
172
|
+
locale,
|
|
173
|
+
loadPath,
|
|
174
|
+
{ silent: true },
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
for (const key of missingKeysList) {
|
|
178
|
+
const existingValue = existingTranslationResults[key]
|
|
179
|
+
if (existingValue !== null) {
|
|
180
|
+
existingTranslations[key] = existingValue
|
|
181
|
+
localeResults[locale].reused++
|
|
182
|
+
} else {
|
|
183
|
+
keysToTranslate[key] = allMissingKeys[key].value
|
|
216
184
|
}
|
|
185
|
+
}
|
|
217
186
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
187
|
+
let translatedValues: Record<string, string> = {}
|
|
188
|
+
|
|
189
|
+
// Translate if needed
|
|
190
|
+
if (Object.keys(keysToTranslate).length > 0) {
|
|
191
|
+
const keysCount = Object.keys(keysToTranslate).length
|
|
192
|
+
progressBar.update(completedCount, {
|
|
193
|
+
status: `${chalk.white(langLabel)} translating ${keysCount} keys...`,
|
|
194
|
+
current: completedCount
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
translatedValues = await translateKey({
|
|
199
|
+
inputLanguage: defaultLocale,
|
|
200
|
+
outputLanguage: locale,
|
|
201
|
+
context,
|
|
202
|
+
object: keysToTranslate,
|
|
203
|
+
openai,
|
|
204
|
+
model: config.model,
|
|
205
|
+
})
|
|
206
|
+
localeResults[locale].translated = Object.keys(translatedValues).length
|
|
207
|
+
} catch (error) {
|
|
208
|
+
localeResults[locale].status = "error"
|
|
209
|
+
localeResults[locale].error = error instanceof Error ? error.message : "Translation failed"
|
|
210
|
+
completedCount++
|
|
211
|
+
progressBar.update(completedCount, {
|
|
212
|
+
status: `${chalk.white(langLabel)} ${chalk.red("✗")} translation failed`,
|
|
213
|
+
current: completedCount
|
|
214
|
+
})
|
|
215
|
+
continue
|
|
244
216
|
}
|
|
217
|
+
}
|
|
245
218
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
// Stage 4: Save (80-100%)
|
|
249
|
-
// Combine existing translations with new translations
|
|
250
|
-
const allTranslations = { ...existingTranslations, ...translatedValues }
|
|
219
|
+
// Combine and save
|
|
220
|
+
const allTranslations = { ...existingTranslations, ...translatedValues }
|
|
251
221
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
const updatedKeys = { ...namespaceKeys[namespace] }
|
|
222
|
+
await Promise.all(
|
|
223
|
+
namespaces.map(async (namespace) => {
|
|
224
|
+
let hasChanges = false
|
|
225
|
+
const updatedKeys = { ...namespaceKeys[namespace] }
|
|
257
226
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
227
|
+
for (const key of missingKeysList) {
|
|
228
|
+
if (allMissingKeys[key].namespaces.includes(namespace)) {
|
|
229
|
+
const translation = allTranslations[key] || ""
|
|
230
|
+
updatedKeys[key] = translation
|
|
231
|
+
hasChanges = true
|
|
264
232
|
}
|
|
233
|
+
}
|
|
265
234
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
`Failed to save translations for locale "${locale}" (namespace: ${namespace})`,
|
|
272
|
-
locale,
|
|
273
|
-
namespace,
|
|
274
|
-
error instanceof Error ? error : undefined,
|
|
275
|
-
)
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}),
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
// Complete!
|
|
282
|
-
const statusMsg = stats.translated > 0
|
|
283
|
-
? chalk.green(`✓ +${stats.translated} translated`)
|
|
284
|
-
: chalk.green(`✓ ${stats.reused} reused`)
|
|
285
|
-
bar.update(100, { status: statusMsg })
|
|
286
|
-
|
|
287
|
-
} catch (error) {
|
|
288
|
-
if (error instanceof TranslationError) {
|
|
289
|
-
throw error
|
|
290
|
-
}
|
|
291
|
-
bar.update(100, { status: chalk.red("✗ Error") })
|
|
292
|
-
throw error
|
|
293
|
-
}
|
|
294
|
-
}),
|
|
295
|
-
)
|
|
235
|
+
if (hasChanges) {
|
|
236
|
+
await writeLocalesFile(savePath, locale, namespace, updatedKeys)
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
)
|
|
296
240
|
|
|
297
|
-
|
|
298
|
-
|
|
241
|
+
localeResults[locale].status = "done"
|
|
242
|
+
completedCount++
|
|
243
|
+
|
|
244
|
+
const translated = localeResults[locale].translated
|
|
245
|
+
const reused = localeResults[locale].reused
|
|
246
|
+
const statusText = translated > 0
|
|
247
|
+
? `+${translated} translated`
|
|
248
|
+
: `${reused} reused`
|
|
249
|
+
|
|
250
|
+
progressBar.update(completedCount, {
|
|
251
|
+
status: `${chalk.white(langLabel)} ${chalk.green("✓")} ${statusText}`,
|
|
252
|
+
current: completedCount
|
|
253
|
+
})
|
|
254
|
+
|
|
255
|
+
} catch (error) {
|
|
256
|
+
localeResults[locale].status = "error"
|
|
257
|
+
localeResults[locale].error = error instanceof Error ? error.message : "Unknown error"
|
|
258
|
+
completedCount++
|
|
259
|
+
progressBar.update(completedCount, {
|
|
260
|
+
status: `${chalk.white(langLabel)} ${chalk.red("✗")} error`,
|
|
261
|
+
current: completedCount
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
progressBar.stop()
|
|
299
267
|
|
|
300
268
|
// Print summary
|
|
301
269
|
console.log("")
|
|
302
270
|
console.log(chalk.green("✨ Sync complete!\n"))
|
|
303
271
|
|
|
304
|
-
//
|
|
305
|
-
let totalMissing = 0
|
|
306
|
-
let totalReused = 0
|
|
272
|
+
// Count totals
|
|
307
273
|
let totalTranslated = 0
|
|
274
|
+
let totalReused = 0
|
|
275
|
+
let totalErrors = 0
|
|
308
276
|
|
|
309
277
|
for (const locale of localesToProcess) {
|
|
310
|
-
const
|
|
311
|
-
|
|
312
|
-
totalReused +=
|
|
313
|
-
|
|
278
|
+
const result = localeResults[locale]
|
|
279
|
+
totalTranslated += result.translated
|
|
280
|
+
totalReused += result.reused
|
|
281
|
+
if (result.status === "error") totalErrors++
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Show summary table
|
|
285
|
+
console.log(chalk.dim(" Results by language:"))
|
|
286
|
+
console.log("")
|
|
287
|
+
|
|
288
|
+
// Group results into columns for compact display
|
|
289
|
+
const doneLocales = localesToProcess.filter(l => localeResults[l].status === "done")
|
|
290
|
+
const errorLocales = localesToProcess.filter(l => localeResults[l].status === "error")
|
|
291
|
+
|
|
292
|
+
// Show successful languages in a compact grid
|
|
293
|
+
if (doneLocales.length > 0) {
|
|
294
|
+
const columns = 4
|
|
295
|
+
const rows = Math.ceil(doneLocales.length / columns)
|
|
296
|
+
|
|
297
|
+
for (let row = 0; row < rows; row++) {
|
|
298
|
+
let line = " "
|
|
299
|
+
for (let col = 0; col < columns; col++) {
|
|
300
|
+
const idx = row + col * rows
|
|
301
|
+
if (idx < doneLocales.length) {
|
|
302
|
+
const locale = doneLocales[idx]
|
|
303
|
+
const result = localeResults[locale]
|
|
304
|
+
const label = getLanguageLabel(locale).substring(0, 12).padEnd(12)
|
|
305
|
+
const count = result.translated > 0
|
|
306
|
+
? chalk.cyan(`+${result.translated}`.padStart(4))
|
|
307
|
+
: chalk.dim(`${result.reused}`.padStart(4))
|
|
308
|
+
line += `${chalk.green("✓")} ${label} ${count} `
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
console.log(line)
|
|
312
|
+
}
|
|
314
313
|
}
|
|
315
314
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
console.log(chalk.dim(` • ${chalk.white(totalTranslated)} keys translated`))
|
|
319
|
-
console.log(chalk.dim(` • ${chalk.white(totalReused)} keys reused from other namespaces`))
|
|
315
|
+
// Show errors if any
|
|
316
|
+
if (errorLocales.length > 0) {
|
|
320
317
|
console.log("")
|
|
318
|
+
console.log(chalk.red(" Errors:"))
|
|
319
|
+
for (const locale of errorLocales) {
|
|
320
|
+
const result = localeResults[locale]
|
|
321
|
+
console.log(chalk.red(` ✗ ${getLanguageLabel(locale)}: ${result.error}`))
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
console.log("")
|
|
326
|
+
console.log(chalk.dim(" Summary:"))
|
|
327
|
+
console.log(chalk.dim(` • ${chalk.white(totalTranslated)} keys translated`))
|
|
328
|
+
console.log(chalk.dim(` • ${chalk.white(totalReused)} keys reused`))
|
|
329
|
+
if (totalErrors > 0) {
|
|
330
|
+
console.log(chalk.dim(` • ${chalk.red(totalErrors)} languages failed`))
|
|
321
331
|
}
|
|
332
|
+
console.log("")
|
|
322
333
|
|
|
323
334
|
} catch (error) {
|
|
324
|
-
|
|
335
|
+
progressBar.stop()
|
|
325
336
|
if (error instanceof TranslationError) {
|
|
326
337
|
throw error
|
|
327
338
|
}
|