From a18c4213548bbea7d4e8f15ecf416cb83173ef57 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Thu, 16 Apr 2020 13:48:24 -0600 Subject: [PATCH] Made the switch text translateable --- templates/partial/flex.html | 15 ++++++--------- translations/messages.pot | 7 ++++++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/templates/partial/flex.html b/templates/partial/flex.html index f444ef3..be5ca05 100644 --- a/templates/partial/flex.html +++ b/templates/partial/flex.html @@ -6,15 +6,12 @@ }} {% if THEME_COLOR_ENABLE_USER_OVERRIDE %} | - Switch to the - - dark - | - light - | - browser - - theme + {{ + _('Switch to the %(dark_url)s | %(light_url)s | %(browser_url)s theme', + dark_url='dark', + light_url='light', + browser_url='browser'|safe) + }} {% endif %}

{% if THEME_COLOR_ENABLE_USER_OVERRIDE %} diff --git a/translations/messages.pot b/translations/messages.pot index ae67d05..2b6660d 100644 --- a/translations/messages.pot +++ b/translations/messages.pot @@ -87,11 +87,16 @@ msgstr "" msgid "Please enable JavaScript to view comments." msgstr "" -#: templates/partial/flex.html:1 +#: templates/partial/flex.html:3 #, python-format msgid "Built with %(pelican_url)s using %(flex_url)s theme" msgstr "" +#: templates/partial/flex.html:10 +#, python-format +msgid "Switch to the %(dark_url)s | %(light_url)s | %(browser_url)s theme" +msgstr "" + #: templates/partial/neighbors.html:5 msgid "Previous Post" msgstr ""