Skip to content

Commit 000dddc

Browse files
committed
chore: add some i18 field
1 parent 616b8da commit 000dddc

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/locales/en-US.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"persistPiniaState": "🍍 Persistent Pinia state",
99
"unocssExample": "🎨 Unocss example",
1010
"keepAlive": "🧡 KeepAlive Demo",
11-
"login": "🔒 Login"
11+
"login": "🔒 Login",
12+
"basicSettings": "Basic Settings",
13+
"exampleComponents": "Example components"
1214
},
1315
"mock": {
1416
"fromAsyncData": "Data from asynchronous requests",

src/locales/zh-CN.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"404Demo": "🙅 404页 演示",
99
"unocssExample": "🎨 Unocss 示例",
1010
"keepAlive": "🧡 KeepAlive 演示",
11-
"login": "🔒 用户登陆"
11+
"login": "🔒 用户登陆",
12+
"basicSettings": "基本设置",
13+
"exampleComponents": "示例组件"
1214
},
1315
"mock": {
1416
"fromAsyncData": "来自异步请求的数据",

src/pages/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const menuItems = computed(() => ([
4141
</script>
4242

4343
<template>
44-
<VanCellGroup title="基本设置" :border="false" :inset="true">
44+
<VanCellGroup :title="t('home.basicSettings')" :border="false" :inset="true">
4545
<VanCell center :title="t('home.darkMode')">
4646
<template #right-icon>
4747
<VanSwitch v-model="checked" size="20px" aria-label="on/off Dark Mode" @click="toggle()" />
@@ -56,7 +56,7 @@ const menuItems = computed(() => ([
5656
/>
5757
</VanCellGroup>
5858

59-
<VanCellGroup title="示例组件" :border="false" :inset="true">
59+
<VanCellGroup :title="t('home.exampleComponents')" :border="false" :inset="true">
6060
<template v-for="item in menuItems" :key="item.route">
6161
<VanCell :title="item.title" :to="item.route" is-link />
6262
</template>

src/pages/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function asyncLogin(values: any) {
5252
</van-cell-group>
5353
<div class="m-16">
5454
<van-button :loading="loading" round block type="primary" native-type="submit">
55-
{{ t('login.logout') }}
55+
{{ t('login.login') }}
5656
</van-button>
5757
</div>
5858
</van-form>

0 commit comments

Comments
 (0)