mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat(i18n): add landing page navbar translations for en and zh-tw
This commit is contained in:
1 parent
0fddc05443
commit
4aeba17a1d
3 files changed
+40
-9
No files matched your search
@@ -1,6 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import { bugReportUrl } from '../../config'
|
import { bugReportUrl } from '../../config'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const scrollToSection = (sectionId: string) => {
|
const scrollToSection = (sectionId: string) => {
|
||||||
const section = document.getElementById(sectionId)
|
const section = document.getElementById(sectionId)
|
||||||
if (section) {
|
if (section) {
|
||||||
@@ -21,22 +24,25 @@ const scrollToSection = (sectionId: string) => {
|
|||||||
@click="scrollToSection('intro')"
|
@click="scrollToSection('intro')"
|
||||||
style="font-size: 2vh"
|
style="font-size: 2vh"
|
||||||
>
|
>
|
||||||
前言
|
{{ t('nav.intro') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
id="Feature"
|
id="Feature"
|
||||||
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
||||||
@click="scrollToSection('feature')"
|
@click="scrollToSection('feature')"
|
||||||
style="font-size: 2vh"
|
style="font-size: 2vh"
|
||||||
>
|
>
|
||||||
特色</button
|
{{ t('nav.features') }}
|
||||||
><button
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
id="Info"
|
id="Info"
|
||||||
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
||||||
@click="scrollToSection('about')"
|
@click="scrollToSection('about')"
|
||||||
style="font-size: 2vh"
|
style="font-size: 2vh"
|
||||||
>
|
>
|
||||||
關於
|
{{ t('nav.about') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@@ -45,18 +51,27 @@ const scrollToSection = (sectionId: string) => {
|
|||||||
@click="scrollToSection('contact')"
|
@click="scrollToSection('contact')"
|
||||||
style="font-size: 2vh"
|
style="font-size: 2vh"
|
||||||
>
|
>
|
||||||
聯絡我們
|
{{ t('nav.contact') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<RouterLink
|
<RouterLink
|
||||||
title="Sign In"
|
|
||||||
id="SignIn"
|
id="SignIn"
|
||||||
to="/register"
|
to="/register"
|
||||||
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
class="text-text inline-block font-bold whitespace-nowrap pt-1 px-2 hover:text-text-primary"
|
||||||
style="font-size: 2vh"
|
style="font-size: 2vh"
|
||||||
>
|
>
|
||||||
登入
|
{{ t('nav.login') }}
|
||||||
</RouterLink>
|
</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>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
@@ -3,5 +3,13 @@
|
|||||||
"change": "Change language",
|
"change": "Change language",
|
||||||
"traditionalChinese": "繁體中文",
|
"traditionalChinese": "繁體中文",
|
||||||
"english": "English"
|
"english": "English"
|
||||||
|
},
|
||||||
|
"nav": {
|
||||||
|
"intro": "Introduction",
|
||||||
|
"features": "Features",
|
||||||
|
"about": "About",
|
||||||
|
"contact": "Contact",
|
||||||
|
"login": "Sign in",
|
||||||
|
"reportBug": "Report a bug"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,5 +3,13 @@
|
|||||||
"change": "切換語言",
|
"change": "切換語言",
|
||||||
"traditionalChinese": "繁體中文",
|
"traditionalChinese": "繁體中文",
|
||||||
"english": "English"
|
"english": "English"
|
||||||
|
},
|
||||||
|
"nav": {
|
||||||
|
"intro": "前言",
|
||||||
|
"features": "特色",
|
||||||
|
"about": "關於",
|
||||||
|
"contact": "聯絡我們",
|
||||||
|
"login": "登入",
|
||||||
|
"reportBug": "回報錯誤"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user