浏览代码

[create]Fix -t params and add languages

dufu1991 3 年之前
父节点
当前提交
fe71bd596a

+ 3 - 0
packages/create-stdf/README.md

@@ -79,6 +79,9 @@ Template presets include:
 | ko_KR | Korean                |
 | es_ES | Spanish               |
 | ru_RU | Russian               |
+| fr_FR | French                |
+| de_DE | German                |
+| it_IT | Italian               |
 
 For example:
 

+ 3 - 0
packages/create-stdf/README_CN.md

@@ -78,6 +78,9 @@ npm create stdf@latest my-app -t vu
 | ko_KR | 韩语         |
 | es_ES | 西班牙语     |
 | ru_RU | 俄语         |
+| fr_FR | 法语         |
+| de_DE | 德语         |
+| it_IT | 意大利语     |
 
 例如:
 

+ 1 - 1
packages/create-stdf/package.json

@@ -1,6 +1,6 @@
 {
     "name": "create-stdf",
-    "version": "0.0.42",
+    "version": "0.0.43",
     "description": "A CLI for creating new STDF projects",
     "bin": {
         "create-stdf": "index.js"

+ 0 - 8
packages/create-stdf/src/index.js

@@ -79,8 +79,6 @@ else if (argvProjectName && argvTemplate) {
     if (!item) {
         p.intro(red(lang.pectn));
     } else if (
-        item.value === 'skt' ||
-        item.value === 'sku' ||
         item.value === 'vtt' ||
         item.value === 'vut' ||
         item.value === 'sktt' ||
@@ -169,12 +167,6 @@ else if (argvProjectName && argvTemplate) {
         process.exit(0);
     }
 
-    // 项目目录
-    // Project directory
-    // const projectDir = path.join(path.resolve(), projectName);
-
-    // spinner.start('🚀 ' + lang.cfsing);
-
     // 根据 template 的值,复制对应目录下的所有文件到当前目录
     // According to the value of template, copy all files under the corresponding directory to the current directory
     templateOptions.forEach(async item => {

+ 62 - 0
packages/create-stdf/src/lang.js

@@ -1,3 +1,4 @@
+// 英语 english
 export const en_US = {
     hnay: 'Has not adapted yet',
     pn: 'Please enter the project name',
@@ -15,6 +16,7 @@ export const en_US = {
     pectn: 'Please enter the correct template name!',
 };
 
+// 简体中文 chinese
 export const zh_CN = {
     hnay: '暂未适配',
     pn: '请输入项目名称',
@@ -32,6 +34,7 @@ export const zh_CN = {
     pectn: '请输入正确的模板名称!',
 };
 
+// 繁體中文 chinese traditional
 export const zh_TW = {
     hnay: '暫未適配',
     pn: '請輸入項目名稱',
@@ -49,6 +52,7 @@ export const zh_TW = {
     pectn: '請輸入正確的模板名稱!',
 };
 
+// 日语 japanese
 export const ja_JP = {
     hnay: 'まだ適応されていません',
     pn: 'プロジェクト名を入力してください',
@@ -66,6 +70,7 @@ export const ja_JP = {
     pectn: '正しいテンプレート名を入力してください!',
 };
 
+// 韩语 korean
 export const ko_KR = {
     hnay: '아직 적응하지 못했습니다',
     pn: '프로젝트 이름을 입력하십시오',
@@ -83,6 +88,7 @@ export const ko_KR = {
     pectn: '올바른 템플릿 이름을 입력하십시오!',
 };
 
+// 西班牙语 spanish
 export const es_ES = {
     hnay: 'Aún no se ha adaptado',
     pn: 'Por favor ingrese el nombre del proyecto',
@@ -100,6 +106,7 @@ export const es_ES = {
     pectn: '¡Por favor ingrese el nombre de la plantilla correcto!',
 };
 
+// 俄语 russian
 export const ru_RU = {
     hnay: 'Еще не адаптировано',
     pn: 'Пожалуйста, введите название проекта',
@@ -116,3 +123,58 @@ export const ru_RU = {
     cferror: 'Не удалось создать файл',
     pectn: 'Пожалуйста, введите правильное имя шаблона!',
 };
+
+// 法语 french
+export const fr_FR = {
+    hnay: 'N\'a pas encore adapté',
+    pn: 'Veuillez saisir le nom du projet',
+    pncbne: 'Le nom du projet ne peut pas être vide',
+    pane: 'Le nom du projet existe déjà',
+    psat: 'Veuillez sélectionner un modèle',
+    oc: 'Opération annulée',
+    pca: 'Veuillez choisir à nouveau',
+    cfsing: 'Création de fichier...',
+    pcsucc: 'Projet créé avec succès',
+    tgs: 'Pour commencer:',
+    pcyt_vt: 'Conseil: veuillez configurer votre système de couleurs dans le fichier tailwind.config.js',
+    pcyt_vu: 'Conseil: veuillez configurer votre système de couleurs dans le fichier uno.config.js',
+    cferror: 'Échec de la création du fichier',
+    pectn: 'Veuillez saisir le nom du modèle correct!',
+};
+
+// 德语 german
+export const de_DE = {
+    hnay: 'Noch nicht angepasst',
+    pn: 'Bitte geben Sie den Projektnamen ein',
+    pncbne: 'Projektname darf nicht leer sein',
+    pane: 'Projektname existiert bereits',
+    psat: 'Bitte wählen Sie eine Vorlage aus',
+    oc: 'Vorgang abgebrochen',
+    pca: 'Bitte wählen Sie erneut',
+    cfsing: 'Erstelle Datei...',
+    pcsucc: 'Projekt erfolgreich erstellt',
+    tgs: 'Um zu beginnen:',
+    pcyt_vt: 'Tipp: Bitte konfigurieren Sie Ihr Farbsystem in der Datei tailwind.config.js',
+    pcyt_vu: 'Tipp: Bitte konfigurieren Sie Ihr Farbsystem in der Datei uno.config.js',
+    cferror: 'Fehler beim Erstellen der Datei',
+    pectn: 'Bitte geben Sie den richtigen Vorlagennamen ein!',
+};
+
+// 意大利语 italian
+export const it_IT = {
+    hnay: 'Non ancora adattato',
+    pn: 'Inserisci il nome del progetto',
+    pncbne: 'Il nome del progetto non può essere vuoto',
+    pane: 'Il nome del progetto esiste già',
+    psat: 'Seleziona un modello',
+    oc: 'Operazione annullata',
+    pca: 'Seleziona di nuovo',
+    cfsing: 'Creazione del file in corso...',
+    pcsucc: 'Progetto creato con successo',
+    tgs: 'Per iniziare:',
+    pcyt_vt: 'Suggerimento: configura il tuo sistema di colori nel file tailwind.config.js',
+    pcyt_vu: 'Suggerimento: configura il tuo sistema di colori nel file uno.config.js',
+    cferror: 'Impossibile creare il file',
+    pectn: 'Inserisci il nome del modello corretto!',
+};
+