smoonb 0.0.79 → 0.0.80

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": "smoonb",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "description": "Complete Supabase backup and migration tool - EXPERIMENTAL VERSION - USE AT YOUR OWN RISK",
5
5
  "preferGlobal": false,
6
6
  "preventGlobalInstall": true,
@@ -266,6 +266,7 @@
266
266
  "env.language.english": "English",
267
267
  "env.language.portuguese": "Portuguese (pt-BR)",
268
268
  "env.language.saved": "Default language saved: {lang}",
269
+ "env.language.applied": "Language applied! The next messages will be displayed in the selected language.",
269
270
 
270
271
  "backup.components.edgeFunctions.title": "Edge Functions:",
271
272
  "backup.components.edgeFunctions.description1": "We will delete existing functions in the supabase/functions folder, reset the link",
@@ -266,6 +266,7 @@
266
266
  "env.language.english": "Inglês (English)",
267
267
  "env.language.portuguese": "Português (pt-BR)",
268
268
  "env.language.saved": "Idioma padrão salvo: {lang}",
269
+ "env.language.applied": "Idioma aplicado! As próximas mensagens serão exibidas no idioma selecionado.",
269
270
 
270
271
  "backup.components.edgeFunctions.title": "Edge Functions:",
271
272
  "backup.components.edgeFunctions.description1": "Vamos apagar as funções existentes na pasta supabase/functions, fazer um reset no link",
@@ -233,7 +233,16 @@ async function mapEnvVariablesInteractively(env, expectedKeys) {
233
233
  }]);
234
234
 
235
235
  finalEnv.SMOONB_LANG = selectedLang;
236
+
237
+ // Re-inicializar i18n com o novo idioma para aplicar mudança em tempo real
238
+ const { initI18n } = require('../i18n');
239
+ const newI18n = initI18n(process.argv, { ...process.env, SMOONB_LANG: selectedLang });
240
+ Object.assign(global.smoonbI18n, newI18n);
241
+
242
+ // Atualizar getT para usar o novo idioma
243
+ const getT = global.smoonbI18n?.t || t;
236
244
  console.log(chalk.green(`✅ ${getT('env.language.saved', { lang: selectedLang })}`));
245
+ console.log(chalk.cyan(`🌐 ${getT('env.language.applied')}`));
237
246
  }
238
247
 
239
248
  return { finalEnv, dePara };