Skip to content

Commit 0f312ef

Browse files
committed
i18n: 翻译登录页文案
1 parent b5f9ff3 commit 0f312ef

File tree

4 files changed

+34
-12
lines changed

4 files changed

+34
-12
lines changed

components/auth/heros/ripple.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
<div class="max-w-7xl flex flex-col z-10">
44
<img src="~/assets/logo.svg" class="max-w-28" alt="" />
55
<div class="text-4xl my-6 font-semibold !text-primary px-0">
6-
<span>基于 Rust 的</span>
7-
<FlipWords :words="['高性能', '无限扩容', '安全可靠', '多云存储', '兼容 S3']" :duration="3000" class="text-4xl font-semibold !text-primary px-0" />
6+
<span :class="{ 'pr-1': locale !== 'zh' }">{{ t('Rust-based') }} </span>
7+
<FlipWords :words="[t('High Performance'), t('Infinite Scaling'), t('Secure & Reliable'), t('Multi-Cloud Storage'), t('S3 Compatible')]" :duration="3000"
8+
class="text-4xl font-semibold !text-primary px-0" />
89
<div class="text-muted-foreground mt-2">
9-
靠谱的分布式文件系统
10+
{{ t('Reliable distributed file system') }}
1011
</div>
1112
</div>
1213
</div>
13-
<a href="https://www.rustfs.com" class="z-10 text-primary-500 inline-flex w-min items-center gap-2 leading-none p-2 px-5 border rounded-full border-blue-500">
14-
<span>www.rustfs.com</span>
14+
<a href="https://www.rustfs.com" class="z-10 text-primary-500 inline-flex w-max items-center gap-2 leading-none p-2 px-5 border rounded-full border-blue-500">
15+
<span>{{ t('Visit website') }}</span>
1516
<Icon name="ri:arrow-right-long-fill" class="mr-2" />
1617
</a>
1718
<div class="h-full inset-0 absolute z-0">
@@ -22,8 +23,9 @@
2223
</template>
2324

2425
<script lang="ts" setup>
26+
import { useI18n } from 'vue-i18n'
2527
import FlipWords from '~/components/ui/flip-words/FlipWords.vue'
2628
import Ripple from '~/components/ui/ripple/Ripple.vue'
2729
28-
const mode = useColorMode();
30+
const { t, locale } = useI18n()
2931
</script>

components/auth/heros/wordmap.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,29 @@
33
<div class="max-w-7xl flex flex-col">
44
<img src="~/assets/logo.svg" class="max-w-28" alt="" />
55
<div class="text-4xl my-6 font-semibold !text-primary px-0">
6-
<span>基于 Rust 的</span>
7-
<FlipWords :words="['高性能', '无限扩容', '安全可靠', '多云存储', '兼容 S3']" :duration="3000" class="text-4xl font-semibold !text-primary px-0" />
6+
<span :class="{ 'pr-1': locale !== 'zh' }">{{ t('Rust-based') }} </span>
7+
<FlipWords :words="[t('High Performance'), t('Infinite Scaling'), t('Secure & Reliable'), t('Multi-Cloud Storage'), t('S3 Compatible')]" :duration="3000"
8+
class="text-4xl font-semibold !text-primary px-0" />
89
<div class="text-muted-foreground mt-2">
9-
靠谱的分布式文件系统
10+
{{ t('Reliable distributed file system') }}
1011
</div>
1112
</div>
1213
</div>
1314
<WorldMap class="absolute inset-0" :dots="dots" :map-color="isDark ? '#FFFFFF40' : '#00000040'" :map-bg-color="isDark ? 'black' : '#f9fafb'" />
1415
<a href=" https://www.rustfs.com" class="text-primary-500 inline-flex w-min items-center gap-2 leading-none p-2 px-5 border rounded-full border-blue-500">
15-
<span>www.rustfs.com</span>
16+
<span>{{ t('Visit website') }}</span>
1617
<Icon name="ri:arrow-right-long-fill" class="mr-2" />
1718
</a>
1819
</div>
1920
</template>
2021

2122
<script lang="ts" setup>
23+
import { useI18n } from 'vue-i18n'
2224
import FlipWords from "~/components/ui/flip-words/FlipWords.vue"
2325
import WorldMap from "~/components/ui/world-map/WorldMap.vue"
2426
27+
const { t, locale } = useI18n()
28+
2529
const dots = [
2630
{
2731
start: {

i18n/locales/en-US.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,5 +267,13 @@
267267
"Remote Site": "Remote Site",
268268
"Endpoint Required": "Endpoint Required",
269269
"Access Key Required": "Access Key Required",
270-
"Secret Key Required": "Secret Key Required"
270+
"Secret Key Required": "Secret Key Required",
271+
"Rust-based": "Rust-based",
272+
"High Performance": "High Performance",
273+
"Infinite Scaling": "Infinite Scaling",
274+
"Secure & Reliable": "Secure & Reliable",
275+
"Multi-Cloud Storage": "Multi-Cloud Storage",
276+
"S3 Compatible": "S3 Compatible",
277+
"Reliable distributed file system": "Reliable distributed file system",
278+
"Visit website": "Visit website"
271279
}

i18n/locales/zh-CN.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,5 +456,13 @@
456456
"Description": "描述",
457457
"Are you sure you want to delete all selected keys?": "您确定要删除所有选中的密钥吗?",
458458
"Please select at least one item": "请至少选择一项",
459-
"Get Data Failed": "获取数据失败"
459+
"Get Data Failed": "获取数据失败",
460+
"Rust-based": "基于 Rust 的",
461+
"High Performance": "高性能",
462+
"Infinite Scaling": "无限扩容",
463+
"Secure & Reliable": "安全可靠",
464+
"Multi-Cloud Storage": "多云存储",
465+
"S3 Compatible": "兼容 S3",
466+
"Reliable distributed file system": "靠谱的分布式文件系统",
467+
"Visit website": "访问官网"
460468
}

0 commit comments

Comments
 (0)