From 9e2a601d523be407ff1e1117d5b26d620f32564f Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Tue, 21 Feb 2023 18:32:01 +0400 Subject: [PATCH] Translated filter-by-tag messages --- static/skin/i18n/en.json | 2 ++ static/skin/i18n/qqq.json | 2 ++ static/skin/i18n/test.json | 2 ++ static/skin/index.js | 4 ++-- test/server.cpp | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/static/skin/i18n/en.json b/static/skin/i18n/en.json index 1e6c97ad0..406e0def2 100644 --- a/static/skin/i18n/en.json +++ b/static/skin/i18n/en.json @@ -44,4 +44,6 @@ , "torrent-download-link-text": "Torrent file" , "torrent-download-alt-text": "download torrent" , "library-opds-feed": "Library OPDS Feed" + , "filter-by-tag": "Filter by tag \"{{TAG}}\"" + , "stop-filtering-by-tag": "Stop filtering by tag \"{{TAG}}\"" } diff --git a/static/skin/i18n/qqq.json b/static/skin/i18n/qqq.json index 1a7fe6ffb..62089d562 100644 --- a/static/skin/i18n/qqq.json +++ b/static/skin/i18n/qqq.json @@ -46,4 +46,6 @@ , "torrent-download-link-text": "Link text for downloading the torrent file" , "torrent-download-alt-text": "Hint for the icon of torrent download" , "library-opds-feed": "Hint for the library OPDS feed link" + , "filter-by-tag": "Hint for a link that would load results filtered by a single tag" + , "stop-filtering-by-tag": "Tooltip for the button that cancels filtering by tag" } diff --git a/static/skin/i18n/test.json b/static/skin/i18n/test.json index 46ccb8306..cc4a2acef 100644 --- a/static/skin/i18n/test.json +++ b/static/skin/i18n/test.json @@ -33,4 +33,6 @@ , "torrent-download-link-text": "Torrent [I18N TESTING] file" , "torrent-download-alt-text": "download [I18N TESTING] torrent" , "library-opds-feed": "Library [I18N] OPDS [TESTING] Feed" + , "filter-by-tag": "Filter [I18N] by [TESTING] tag \"{{TAG}}\"" + , "stop-filtering-by-tag": "[I18N] Stop filtering [TESTING] by tag \"{{TAG}}\"" } diff --git a/static/skin/index.js b/static/skin/index.js index c87a47878..52328eb54 100644 --- a/static/skin/index.js +++ b/static/skin/index.js @@ -106,7 +106,7 @@ function generateTagLink(tagValue) { tagValue = tagValue.toLowerCase(); const humanFriendlyTagValue = humanFriendlyTitle(tagValue); - const tagMessage = `Filter by tag "${humanFriendlyTagValue}"`; + const tagMessage = $t("filter-by-tag", {TAG: humanFriendlyTagValue}); return `${humanFriendlyTagValue}` } @@ -418,7 +418,7 @@ tagElement.style.display = 'inline-block'; const humanFriendlyTagValue = humanFriendlyTitle(tagValue); tagElement.innerHTML = `${humanFriendlyTagValue}`; - const tagMessage = `Stop filtering by tag "${humanFriendlyTagValue}"`; + const tagMessage = $t("stop-filtering-by-tag", {TAG: humanFriendlyTagValue}); tagElement.setAttribute('aria-label', tagMessage); tagElement.setAttribute('title', tagMessage); if (resetFilter) diff --git a/test/server.cpp b/test/server.cpp index c7cd17558..21c79ba18 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -63,7 +63,7 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=f0ee124c" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.js" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=7348b4df" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=042058df" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js?cacheid=ecde2bb3" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/isotope.pkgd.min.js" }, @@ -284,7 +284,7 @@ R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/index.css?cacheid=f0ee124c" - +