Skip to content

Commit

Permalink
feat: add hint message translation (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Nov 10, 2023
1 parent 8106cd7 commit 57fef55
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => [
Expand Down
1 change: 1 addition & 0 deletions locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"needsE2eTesting": {
"message": "Ajouter une solution de test de bout en bout (e2e)\u00a0?",
"hint": "- Utilisez les flèches et appuyez sur la touche Entrée pour valider",
"selectOptions": {
"negative": { "title": "Non" },
"cypress": {
Expand Down
1 change: 1 addition & 0 deletions locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"needsE2eTesting": {
"message": "是否要引入一款端到端(End to End)测试工具?",
"hint": "- 使用箭头切换按Enter确认。",
"selectOptions": {
"negative": { "title": "不需要" },
"cypress": {
Expand Down
1 change: 1 addition & 0 deletions utils/getLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?: {
Expand Down

0 comments on commit 57fef55

Please sign in to comment.