« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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:",