Skip to content

Commit 7301439

Browse files
committed
chore: update i18n key template syntax
1 parent 2739ac5 commit 7301439

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"locals/locales/dist/backend",
6868
"locals/locales/dist"
6969
],
70+
"i18n-ally.regex.key": "[\\w\\d\\. \\-\\[\\]{}]*?",
7071

7172
"errorLens.followCursor": "allLines"
7273
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { i18nComposer } from '#src/helpers/i18n.js'
22

33
// This isa sample for structuring guide
4-
export const getHelloMessage = (from: string) => `${i18nComposer.t('hello-from-/x', { x: from })}! - ${Date.now()}`
4+
export const getHelloMessage = (from: string) => `${i18nComposer.t('hello-from-{x}', { x: from })}! - ${Date.now()}`

i18n.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,3 @@ checksums:
120120
tip.holdShift: 895a995e323b21fd1de51496a994103d
121121
welcome: 3180ad6b8de344b781637750259e0f53
122122
nickname: e15cefebe5e78fba87e455bf246cee89
123-
bd59d862767f00d421bd4cacc7522c6c:
124-
hello-from-%2Fx: de51bbd5a66af7e24e90466431fa9006
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
KEY,Description,en,es,fr,ru,vi,zh-CN
2-
hello-from-/x,,Hello from {x},Hola desde {x},Bonjour de {x},Привет от {x},Xin chào từ {x},来自{x}的问候
2+
hello-from-{x},,Hello from {x},Hola desde {x},Bonjour de {x},Привет от {x},Xin chào từ {x},来自{x}的问候

0 commit comments

Comments
 (0)