« get me outta code hell

content: listRandomPageLinks: update chooseLinkLine wording - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-10-29 10:00:52 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-10-29 10:00:52 -0300
commite71230340181a3b7b38ff05ba23504b264f5b26c (patch)
tree5f5fa67eadef5274988ae69981cc1cd40e4d7a40
parentd2903c800b6a005a447cc26f9431fe5fe4fb08b6 (diff)
content: listRandomPageLinks: update chooseLinkLine wording
-rw-r--r--src/content/dependencies/listRandomPageLinks.js10
-rw-r--r--src/strings-default.json5
2 files changed, 13 insertions, 2 deletions
diff --git a/src/content/dependencies/listRandomPageLinks.js b/src/content/dependencies/listRandomPageLinks.js
index ce90a153..599a82d3 100644
--- a/src/content/dependencies/listRandomPageLinks.js
+++ b/src/content/dependencies/listRandomPageLinks.js
@@ -37,7 +37,15 @@ export default {
       type: 'custom',
       content: [
         html.tag('p',
-          language.$('listingPage.other.randomPages.chooseLinkLine')),
+          language.$('listingPage.other.randomPages.chooseLinkLine', {
+            fromPart:
+              (empty(relations.groupSections)
+                ? language.$('listingPage.other.randomPages.chooseLinkLine.fromPart.notDividedByGroups')
+                : language.$('listingPage.other.randomPages.chooseLinkLine.fromPart.dividedByGroups')),
+
+            browserSupportPart:
+              language.$('listingPage.other.randomPages.chooseLinkLine.browserSupportPart'),
+          })),
 
         html.tag('p',
           {class: 'js-hide-once-data'},
diff --git a/src/strings-default.json b/src/strings-default.json
index 81bf5d48..b0b68a57 100644
--- a/src/strings-default.json
+++ b/src/strings-default.json
@@ -485,7 +485,10 @@
   "listingPage.other.allAdditionalFiles.file.withMultipleFiles": "{TITLE} ({FILES})",
   "listingPage.other.randomPages.title": "Random Pages",
   "listingPage.other.randomPages.title.short": "Random Pages",
-  "listingPage.other.randomPages.chooseLinkLine": "Choose a link to go to a random page in that category or album! If your browser doesn't support relatively modern JavaScript or you've disabled it, these links won't work - sorry.",
+  "listingPage.other.randomPages.chooseLinkLine": "{FROM_PART} {BROWSER_SUPPORT_PART}",
+  "listingPage.other.randomPages.chooseLinkLine.fromPart.dividedByGroups": "Choose a link to go to a random page in that group or album!",
+  "listingPage.other.randomPages.chooseLinkLine.fromPart.notDividedByGroups": "Choose a link to go to a random page in that album!",
+  "listingPage.other.randomPages.chooseLinkLine.browserSupportPart": "If your browser doesn't support relatively modern JavaScript or you've disabled it, these links won't work - sorry.",
   "listingPage.other.randomPages.dataLoadingLine": "(Data files are downloading in the background! Please wait for data to load.)",
   "listingPage.other.randomPages.dataLoadedLine": "(Data files have finished being downloaded. The links should work!)",
   "listingPage.other.randomPages.misc": "Miscellaneous:",