feat(i18n): add landing page navbar translations for en and zh-tw

This commit is contained in:
neilchen0812 committed 2026-09-21 01:55:43 +09:30
1 parent 0fddc05443
commit 4aeba17a1d
3 files changed
+40 -9

No files matched your search

@@ -1,6 +1,9 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n'
import { bugReportUrl } from '../../config'
const { t } = useI18n()
const scrollToSection = (sectionId: string) => {
const section = document.getElementById(sectionId)
if (section) {
@@ -21,22 +24,25 @@ const scrollToSection = (sectionId: string) => {
@click="scrollToSection('intro')"
style="font-size: 2vh"
>
前言
{{ t('nav.intro') }}
</button>
<button
id="Feature"
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
@click="scrollToSection('feature')"
style="font-size: 2vh"
>
特色</button
><button
{{ t('nav.features') }}
</button>
<button
id="Info"
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
@click="scrollToSection('about')"
style="font-size: 2vh"
>
關於
{{ t('nav.about') }}
</button>
<button
@@ -45,18 +51,27 @@ const scrollToSection = (sectionId: string) => {
@click="scrollToSection('contact')"
style="font-size: 2vh"
>
聯絡我們
{{ t('nav.contact') }}
</button>
<RouterLink
title="Sign In"
id="SignIn"
to="/register"
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
style="font-size: 2vh"
>
登入
{{ t('nav.login') }}
</RouterLink>
<a title="Bug Report" :href="bugReportUrl" target="_blank" class="h-5 w-5">
<font-awesome-icon :icon="['fas', 'bug']" class="text-text-primary" />
<a
:title="t('nav.reportBug')"
:href="bugReportUrl"
target="_blank"
class="h-5 w-5"
>
<font-awesome-icon
:icon="['fas', 'bug']"
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
/>
</a>
</template>
+8
View File
@@ -3,5 +3,13 @@
"change": "Change language",
"traditionalChinese": "繁體中文",
"english": "English"
},
"nav": {
"intro": "Introduction",
"features": "Features",
"about": "About",
"contact": "Contact",
"login": "Sign in",
"reportBug": "Report a bug"
}
}
+8
View File
@@ -3,5 +3,13 @@
"change": "切換語言",
"traditionalChinese": "繁體中文",
"english": "English"
},
"nav": {
"intro": "前言",
"features": "特色",
"about": "關於",
"contact": "聯絡我們",
"login": "登入",
"reportBug": "回報錯誤"
}
}