From 871076f2d97287af453a21a682b9278a4a6ffc95 Mon Sep 17 00:00:00 2001 From: Ayaka Rizumu <464388324@qq.com> Date: Mon, 28 Nov 2022 14:58:29 +0800 Subject: [PATCH] feat: install and configure i18n features (#177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Shinigami Co-authored-by: 三咲智子 Kevin Deng Co-authored-by: Daniel Roe --- .vscode/settings.json | 7 ++++- components/nav/NavFooter.vue | 15 +++++---- components/nav/NavSide.vue | 24 ++++++++------ components/nav/SelectLanguage.vue | 36 +++++++++++++++++++++ locales/en-US.json | 13 ++++++++ locales/zh-CN.json | 13 ++++++++ package.json | 1 + plugins/i18n.ts | 25 +++++++++++++++ pnpm-lock.yaml | 52 +++++++++++++++++++++++++++++++ 9 files changed, 170 insertions(+), 16 deletions(-) create mode 100644 components/nav/SelectLanguage.vue create mode 100644 locales/en-US.json create mode 100644 locales/zh-CN.json create mode 100644 plugins/i18n.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 6d6475d4..c3b518dc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,10 @@ "cSpell.words": [ "masto", "Nuxtodon" - ] + ], + "i18n-ally.localesPaths": [ + "locales" + ], + "i18n-ally.keystyle": "nested", + "i18n-ally.sourceLanguage": "en-US" } diff --git a/components/nav/NavFooter.vue b/components/nav/NavFooter.vue index 5ce5f787..35182589 100644 --- a/components/nav/NavFooter.vue +++ b/components/nav/NavFooter.vue @@ -5,17 +5,20 @@ const buildTimeAgo = useTimeAgo(buildTime)