From b3a8c6d62356c4da09fab8b25664016e7cd42ece Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Fri, 10 Nov 2023 20:31:41 +0800 Subject: [PATCH 1/3] feat: add hint message translation --- index.ts | 1 + locales/en-US.json | 1 + locales/fr-FR.json | 1 + locales/zh-CN.json | 1 + utils/getLanguage.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/index.ts b/index.ts index 6856e461..38b9598f 100755 --- a/index.ts +++ b/index.ts @@ -229,6 +229,7 @@ async function init() { { name: 'needsE2eTesting', type: () => (isFeatureFlagsUsed ? null : 'select'), + hint: language.needsE2eTesting.hint, message: language.needsE2eTesting.message, initial: 0, choices: (prev, answers) => [ diff --git a/locales/en-US.json b/locales/en-US.json index 70be741a..6fcfbeb6 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -30,6 +30,7 @@ }, "needsE2eTesting": { "message": "Add an End-to-End Testing Solution?", + "hint": "- Use arrow-keys. Return to submit.", "selectOptions": { "negative": { "title": "No" }, "cypress": { diff --git a/locales/fr-FR.json b/locales/fr-FR.json index f3162e51..93680a6f 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -30,6 +30,7 @@ }, "needsE2eTesting": { "message": "Ajouter une solution de test de bout en bout (e2e)\u00a0?", + "hint": "Utilisez les touches fléchées. Retourner pour soumettre", "selectOptions": { "negative": { "title": "Non" }, "cypress": { diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 69d8b7b0..1043928c 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -30,6 +30,7 @@ }, "needsE2eTesting": { "message": "是否要引入一款端到端(End to End)测试工具?", + "hint": "- 使用箭头键选择提交。", "selectOptions": { "negative": { "title": "不需要" }, "cypress": { diff --git a/utils/getLanguage.ts b/utils/getLanguage.ts index 325cb574..31e85830 100644 --- a/utils/getLanguage.ts +++ b/utils/getLanguage.ts @@ -2,6 +2,7 @@ import * as fs from 'node:fs' import * as path from 'node:path' interface LanguageItem { + hint?: string message: string invalidMessage?: string dirForPrompts?: { From c4e13baefd4ccec066265063d10d13c834a387ab Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Fri, 10 Nov 2023 20:56:32 +0800 Subject: [PATCH 2/3] fix: update French translation --- locales/fr-FR.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/fr-FR.json b/locales/fr-FR.json index 93680a6f..96d6be94 100644 --- a/locales/fr-FR.json +++ b/locales/fr-FR.json @@ -30,7 +30,7 @@ }, "needsE2eTesting": { "message": "Ajouter une solution de test de bout en bout (e2e)\u00a0?", - "hint": "Utilisez les touches fléchées. Retourner pour soumettre", + "hint": "- Utilisez les flèches et appuyez sur la touche Entrée pour valider", "selectOptions": { "negative": { "title": "Non" }, "cypress": { From 91956481c1d8944265aeccd62f6c8c29f306dd03 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Fri, 10 Nov 2023 20:59:11 +0800 Subject: [PATCH 3/3] fix: update --- locales/zh-CN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/zh-CN.json b/locales/zh-CN.json index 1043928c..1cbf85ac 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -30,7 +30,7 @@ }, "needsE2eTesting": { "message": "是否要引入一款端到端(End to End)测试工具?", - "hint": "- 使用箭头键选择提交。", + "hint": "- 使用箭头切换按Enter确认。", "selectOptions": { "negative": { "title": "不需要" }, "cypress": {