smoonb 0.0.80 → 0.0.81
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
|
@@ -239,10 +239,12 @@ async function mapEnvVariablesInteractively(env, expectedKeys) {
|
|
|
239
239
|
const newI18n = initI18n(process.argv, { ...process.env, SMOONB_LANG: selectedLang });
|
|
240
240
|
Object.assign(global.smoonbI18n, newI18n);
|
|
241
241
|
|
|
242
|
-
// Atualizar getT para usar o novo idioma
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
242
|
+
// Atualizar getT para usar o novo idioma (não redeclarar, apenas atualizar a referência)
|
|
243
|
+
// getT já foi declarado no escopo da função, então apenas atualizamos o global.smoonbI18n
|
|
244
|
+
// e getT continuará funcionando através do global.smoonbI18n?.t
|
|
245
|
+
const updatedGetT = global.smoonbI18n?.t || t;
|
|
246
|
+
console.log(chalk.green(`✅ ${updatedGetT('env.language.saved', { lang: selectedLang })}`));
|
|
247
|
+
console.log(chalk.cyan(`🌐 ${updatedGetT('env.language.applied')}`));
|
|
246
248
|
}
|
|
247
249
|
|
|
248
250
|
return { finalEnv, dePara };
|