vako 1.3.15 → 1.3.16
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/bin/commands/setup-executor.js +64 -2
- package/bin/commands/setup.js +15 -1
- package/bin/vako.js +1 -1
- package/package.json +1 -1
|
@@ -317,8 +317,9 @@ module.exports = router;
|
|
|
317
317
|
`;
|
|
318
318
|
|
|
319
319
|
// views/index.ejs
|
|
320
|
+
const langAttr = language === 'multi' ? 'fr' : language;
|
|
320
321
|
files['views/index.ejs'] = `<!DOCTYPE html>
|
|
321
|
-
<html lang="
|
|
322
|
+
<html lang="${langAttr}">
|
|
322
323
|
<head>
|
|
323
324
|
<meta charset="UTF-8">
|
|
324
325
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -326,11 +327,30 @@ module.exports = router;
|
|
|
326
327
|
</head>
|
|
327
328
|
<body>
|
|
328
329
|
<h1><%= title %></h1>
|
|
329
|
-
<p
|
|
330
|
+
<p>${translations.welcome || 'Welcome to your Vako application!'}</p>
|
|
330
331
|
</body>
|
|
331
332
|
</html>
|
|
332
333
|
`;
|
|
333
334
|
|
|
335
|
+
// Créer les fichiers de traduction
|
|
336
|
+
if (language === 'multi') {
|
|
337
|
+
files['locales/fr.json'] = JSON.stringify({
|
|
338
|
+
welcome: 'Bienvenue dans votre application Vako!',
|
|
339
|
+
title: 'Bienvenue sur ${projectName}'
|
|
340
|
+
}, null, 2);
|
|
341
|
+
files['locales/en.json'] = JSON.stringify({
|
|
342
|
+
welcome: 'Welcome to your Vako application!',
|
|
343
|
+
title: 'Welcome to ${projectName}'
|
|
344
|
+
}, null, 2);
|
|
345
|
+
files['locales/es.json'] = JSON.stringify({
|
|
346
|
+
welcome: '¡Bienvenido a tu aplicación Vako!',
|
|
347
|
+
title: 'Bienvenido a ${projectName}'
|
|
348
|
+
}, null, 2);
|
|
349
|
+
} else {
|
|
350
|
+
// Fichier de traduction pour une seule langue
|
|
351
|
+
files[`locales/${language}.json`] = JSON.stringify(translations, null, 2);
|
|
352
|
+
}
|
|
353
|
+
|
|
334
354
|
// public/css/style.css
|
|
335
355
|
files['public/css/style.css'] = `body {
|
|
336
356
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
@@ -790,6 +810,48 @@ module.exports = router;
|
|
|
790
810
|
}
|
|
791
811
|
}
|
|
792
812
|
|
|
813
|
+
getTranslations(language) {
|
|
814
|
+
const translations = {
|
|
815
|
+
fr: {
|
|
816
|
+
welcome: 'Bienvenue dans votre application Vako!',
|
|
817
|
+
title: 'Bienvenue sur',
|
|
818
|
+
description: 'Une application web moderne construite avec Vako'
|
|
819
|
+
},
|
|
820
|
+
en: {
|
|
821
|
+
welcome: 'Welcome to your Vako application!',
|
|
822
|
+
title: 'Welcome to',
|
|
823
|
+
description: 'A modern web application built with Vako'
|
|
824
|
+
},
|
|
825
|
+
es: {
|
|
826
|
+
welcome: '¡Bienvenido a tu aplicación Vako!',
|
|
827
|
+
title: 'Bienvenido a',
|
|
828
|
+
description: 'Una aplicación web moderna construida con Vako'
|
|
829
|
+
},
|
|
830
|
+
de: {
|
|
831
|
+
welcome: 'Willkommen in Ihrer Vako-Anwendung!',
|
|
832
|
+
title: 'Willkommen bei',
|
|
833
|
+
description: 'Eine moderne Webanwendung, die mit Vako erstellt wurde'
|
|
834
|
+
},
|
|
835
|
+
it: {
|
|
836
|
+
welcome: 'Benvenuto nella tua applicazione Vako!',
|
|
837
|
+
title: 'Benvenuto in',
|
|
838
|
+
description: 'Un\'applicazione web moderna costruita con Vako'
|
|
839
|
+
},
|
|
840
|
+
pt: {
|
|
841
|
+
welcome: 'Bem-vindo à sua aplicação Vako!',
|
|
842
|
+
title: 'Bem-vindo a',
|
|
843
|
+
description: 'Uma aplicação web moderna construída com Vako'
|
|
844
|
+
},
|
|
845
|
+
nl: {
|
|
846
|
+
welcome: 'Welkom bij uw Vako-applicatie!',
|
|
847
|
+
title: 'Welkom bij',
|
|
848
|
+
description: 'Een moderne webapplicatie gebouwd met Vako'
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
return translations[language] || translations.en;
|
|
853
|
+
}
|
|
854
|
+
|
|
793
855
|
sleep(ms) {
|
|
794
856
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
795
857
|
}
|
package/bin/commands/setup.js
CHANGED
|
@@ -93,6 +93,8 @@ class SetupWizard {
|
|
|
93
93
|
console.clear();
|
|
94
94
|
await this.showWelcome();
|
|
95
95
|
await this.gatherProjectInfo();
|
|
96
|
+
await this.selectCodeType();
|
|
97
|
+
await this.selectLanguage();
|
|
96
98
|
await this.selectTemplate();
|
|
97
99
|
await this.selectFeatures();
|
|
98
100
|
await this.configureDatabase();
|
|
@@ -651,19 +653,31 @@ class SetupWizard {
|
|
|
651
653
|
* Génération du résumé de configuration
|
|
652
654
|
*/
|
|
653
655
|
generateSummary() {
|
|
654
|
-
const { projectName, template, features, database, auth, plugins, styling, theme, codeType } = this.config;
|
|
656
|
+
const { projectName, template, features, database, auth, plugins, styling, theme, codeType, language } = this.config;
|
|
655
657
|
|
|
656
658
|
const codeTypeLabels = {
|
|
657
659
|
'ejs': '📄 EJS',
|
|
658
660
|
'typescript': '📘 TypeScript',
|
|
659
661
|
'nextjs': '⚛️ Next.js'
|
|
660
662
|
};
|
|
663
|
+
|
|
664
|
+
const languageLabels = {
|
|
665
|
+
'fr': '🇫🇷 Français',
|
|
666
|
+
'en': '🇬🇧 English',
|
|
667
|
+
'es': '🇪🇸 Español',
|
|
668
|
+
'de': '🇩🇪 Deutsch',
|
|
669
|
+
'it': '🇮🇹 Italiano',
|
|
670
|
+
'pt': '🇵🇹 Português',
|
|
671
|
+
'nl': '🇳🇱 Nederlands',
|
|
672
|
+
'multi': '🌐 Multi-language'
|
|
673
|
+
};
|
|
661
674
|
|
|
662
675
|
return chalk.white(`
|
|
663
676
|
🏷️ Project: ${chalk.cyan.bold(projectName)}
|
|
664
677
|
📝 Description: ${chalk.gray(this.config.description)}
|
|
665
678
|
👤 Author: ${chalk.green(this.config.author)}
|
|
666
679
|
💻 Code Type: ${chalk.cyan(codeTypeLabels[codeType] || codeType)}
|
|
680
|
+
🌍 Language: ${chalk.magenta(languageLabels[language] || language)}
|
|
667
681
|
🎨 Template: ${chalk.yellow(template)}
|
|
668
682
|
🗄️ Database: ${chalk.blue(database)}
|
|
669
683
|
🔐 Auth: ${chalk.magenta(auth.enabled ? '✅ Enabled' : '❌ Disabled')}
|
package/bin/vako.js
CHANGED
package/package.json
CHANGED