-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Status: ProposalRequest for commentsRequest for commentsType: FeatureIncludes new featuresIncludes new featureshelp wantedExtra attention is neededExtra attention is neededtodo
Description
API
type Option = {
casing?: 'caml' | 'snake' | 'kebab'
}
sqeeze (basePath: string, files: SFCFileInfo[], option = { casing: 'caml' }: : Option): LocaleMessages
infuse (basePath: string, sources: SFCFileInfo[], messages: LocaleMessages, option = { casing: 'caml' }: : Option): SFCFileInfo[]CLI
vue-i18n-locale-message squeeze --target=./src --casing='kebab'
vue-i18n-locale-message infuse --target=./src --message=./message.json --casing='kebab'--casing is able to commit, default is 'caml'
if --casing is kebab, should be genrated the following:
{
"ja": { // for `ja` locale`
"app": { // src/App.vue
"title": "アプリケーション",
"lang": "言語切り替え"
},
"components": { // src/components
"modal": { // src/components/Modal.vue
"ok": "OK",
"cancel": "キャンセル"
}
},
"pages": { // src/pages
"login": { // src/pages/Login.vue
"id": "ユーザーID",
"password": "パスワード",
"confirm": "パスワードの確認入力",
"button": "ログイン"
}
}
},
"en": { // for `en` locale
"app": { // src/App.vue
"title": "Application",
"lang": "Change languages"
},
"components": { // src/components
"modal": { // src/components/Modal.vue
"ok": "OK",
"cancel": "Cancel"
},
"nest": { // src/components/nest
"ranking-table": { // src/components/nest/RankingTable.vue
"headers": {
"rank": "Rank",
"name": "Name",
"score": "Score"
}
}
}
}
}
}Metadata
Metadata
Assignees
Labels
Status: ProposalRequest for commentsRequest for commentsType: FeatureIncludes new featuresIncludes new featureshelp wantedExtra attention is neededExtra attention is neededtodo