From 366fa92fc6616148a7bad933c9776c2c65fcd6e4 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Tue, 5 Sep 2023 15:21:34 +0200 Subject: [PATCH] PW-103: Make download button description translatable --- website/frontend/messages.pot | 14 +++++++++++++- website/frontend/templates/index.html | 6 +++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/website/frontend/messages.pot b/website/frontend/messages.pot index ed869d1..75841c0 100644 --- a/website/frontend/messages.pot +++ b/website/frontend/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-08-27 10:07+0200\n" +"POT-Creation-Date: 2023-09-05 15:36+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -433,6 +433,18 @@ msgid "" " your own." msgstr "" +#: website/frontend/templates/index.html:148 +msgid "v{version} for Windows (64-bit)" +msgstr "" + +#: website/frontend/templates/index.html:153 +msgid "v{version} for Linux Distributions" +msgstr "" + +#: website/frontend/templates/index.html:158 +msgid "v{version} for macOS 10.14+" +msgstr "" + #: website/frontend/templates/plugins.html:3 msgid "Available Plugins" msgstr "" diff --git a/website/frontend/templates/index.html b/website/frontend/templates/index.html index 61190dd..a7e7889 100644 --- a/website/frontend/templates/index.html +++ b/website/frontend/templates/index.html @@ -145,17 +145,17 @@

{{ _("Plugin Support") }}

if (/^Win/.test(platform) || /Windows/.test(navigator.userAgent)) { downloadURL = "https://musicbrainz.osuosl.org/pub/musicbrainz/picard/picard-setup-{{tag}}.exe"; iconClass = "fa-windows"; - infoText = "v{{tag}} for Windows (64-bit)"; + infoText = {{_('v{version} for Windows (64-bit)')|expand({'version': tag})|tojson}}; } else if (/Linux/.test(platform)) { downloadURL = "{{ url_for('frontend.show_downloads') }}#linux"; iconClass = "fa-linux"; - infoText = "v{{tag}} for Linux Distributions"; + infoText = {{_('v{version} for Linux Distributions')|expand({'version': tag})|tojson}}; } else if (platform === "MacIntel" || platform === "MacPPC") { downloadURL = "https://musicbrainz.osuosl.org/pub/musicbrainz/picard/MusicBrainz-Picard-{{tag}}-macOS-10.14.dmg"; iconClass = "fa-apple"; - infoText = "v{{tag}} for macOS 10.14+"; + infoText = {{_('v{version} for macOS 10.14+')|expand({'version': tag})|tojson}}; } if (downloadURL) {