From 210175ba44ddf0e8f3a4c0a348d7171cd271d78f Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Fri, 29 Oct 2021 12:30:42 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Add=20i18n=20strings=20for=20app?= =?UTF-8?q?earance=20toggle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/en.yaml | 2 ++ i18n/fr.yaml | 4 +++- i18n/zh.yaml | 3 +++ layouts/partials/footer.html | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 323877b4..1c539b3b 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -16,6 +16,8 @@ error: 404_description: "It seems that the page you've requested does not exist." footer: + dark_appearance: "Switch to dark appearance" + light_appearance: "Switch to light appearance" powered_by: "Powered by {{ .Hugo }} & {{ .Congo }}" list: diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 014cdf5c..bfe438fd 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -1,7 +1,7 @@ article: anchor_label: "Ancre" draft: "Brouillon" - edit_title: "Editer" + edit_title: "Editer" reading_time: one: "{{ .Count }} min" other: "{{ .Count }} mins" @@ -16,6 +16,8 @@ error: 404_description: "Il semble que la page que vous cherchiez n'existe pas." footer: + # dark_appearance: "Switch to dark appearance" + # light_appearance: "Switch to light appearance" powered_by: "Propulsé par {{ .Hugo }} & {{ .Congo }}" list: diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 8237c110..18bb1e52 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -15,6 +15,8 @@ error: 404_description: "您请求的页面似乎不存在。" footer: + # dark_appearance: "Switch to dark appearance" + # light_appearance: "Switch to light appearance" powered_by: "由 {{ .Hugo }} & {{ .Congo }} 强力驱动" list: @@ -25,6 +27,7 @@ sharing: email: "通过电子邮件发送" facebook: "分享到 Facebook" linkedin: "分享到 LinkedIn" + # pinterest: "Pin on Pinterest" reddit: "提交到 Reddit" twitter: "分享到 Twitter" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 018efad0..33c773ab 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -47,7 +47,7 @@ onclick="setPreferredAppearance('dark');" oncontextmenu="setPreferredAppearance('default'); return false;" class="inline px-2 py-1 border rounded-md border-neutral-200 dark:hidden hover:text-primary-500 hover:border-primary-400" - title="Switch to dark appearance" + title="{{ i18n "footer.dark_appearance" }}" > {{ partial "icon.html" "moon" }} @@ -56,7 +56,7 @@ onclick="setPreferredAppearance('light');" oncontextmenu="setPreferredAppearance('default'); return false;" class="hidden px-2 py-1 border rounded-md cursor-pointer dark:inline border-neutral-700 hover:text-primary-400 hover:border-primary-500" - title="Switch to light appearance" + title="{{ i18n "footer.light_appearance" }}" > {{ partial "icon.html" "sun" }}