fix(ui/i18n): translate nav footer (#213)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
zio/stable
Chris 2022-11-29 14:31:12 +08:00 committed by GitHub
parent 22e90b5ffd
commit 0caf7339ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 5 deletions

View File

@ -1,4 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
const { t } = useI18n()
const buildTime = import.meta.env.__BUILD_TIME__ as string const buildTime = import.meta.env.__BUILD_TIME__ as string
const buildTimeAgo = useTimeAgo(buildTime) const buildTimeAgo = useTimeAgo(buildTime)
</script> </script>
@ -6,10 +7,10 @@ const buildTimeAgo = useTimeAgo(buildTime)
<template> <template>
<footer p4 text-sm text-secondary-light flex="~ col"> <footer p4 text-sm text-secondary-light flex="~ col">
<div flex="~ gap2" items-center mb4> <div flex="~ gap2" items-center mb4>
<CommonTooltip content="Toggle theme"> <CommonTooltip :content="t('nav_footer.toggle_theme')">
<button flex i-ri-sun-line dark:i-ri-moon-line text-lg @click="toggleDark()" /> <button flex i-ri-sun-line dark:i-ri-moon-line text-lg @click="toggleDark()" />
</CommonTooltip> </CommonTooltip>
<CommonTooltip content="Zen mode"> <CommonTooltip :content="t('nav_footer.zen_mode')">
<button <button
flex flex
text-lg text-lg

View File

@ -12,7 +12,9 @@
}, },
"nav_footer": { "nav_footer": {
"select_language": "Sprache auswählen", "select_language": "Sprache auswählen",
"select_feature_flags": "Feature-Flags umschalten" "select_feature_flags": "Feature-Flags umschalten",
"toggle_theme": "Thema umschalten",
"zen_mode": "Zen mode"
}, },
"timeline": "Timeline", "timeline": "Timeline",
"title": { "title": {

View File

@ -12,7 +12,9 @@
}, },
"nav_footer": { "nav_footer": {
"select_language": "Select Language", "select_language": "Select Language",
"select_feature_flags": "Toggle Feature Flags" "select_feature_flags": "Toggle Feature Flags",
"toggle_theme": "Toggle Theme",
"zen_mode": "Zen Mode"
}, },
"timeline": "Timeline", "timeline": "Timeline",
"title": { "title": {

View File

@ -12,7 +12,9 @@
}, },
"nav_footer": { "nav_footer": {
"select_language": "选择语言", "select_language": "选择语言",
"select_feature_flags": "功能开关" "select_feature_flags": "功能开关",
"toggle_theme": "切换主题",
"zen_mode": "禅模式"
}, },
"timeline": "时间轴", "timeline": "时间轴",
"title": { "title": {