Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit eed086e

Browse files
orangelckcayangweb
authored andcommitted
chore: add safe type and powerful vsc-plugin
1 parent 125f705 commit eed086e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.vscode/extensions.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"recommendations": [
3-
"Vue.volar",
3+
"vue.volar",
44
"tauri-apps.tauri-vscode",
5-
"rust-lang.rust-analyzer"
5+
"rust-lang.rust-analyzer",
6+
"lokalise.i18n-ally"
67
]
7-
}
8+
}

src/utils/i18n.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { createI18n } from 'vue-i18n'
2+
import type { Locales } from '@/types'
3+
24
import en from '@/locales/en.json'
35
import zh from '@/locales/zh.json'
46

5-
const i18n = createI18n({
7+
type MessageSchema = typeof en
8+
9+
const i18n = createI18n<[MessageSchema], Locales>({
610
locale: 'en',
711
fallbackLocale: 'en',
812
messages: {

0 commit comments

Comments
 (0)