« get me outta code hell

content: generateTrackInfoPage: sticky tracksThatRef/Samp dynamics - 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>2024-06-09 16:59:44 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-09 17:53:29 -0300
commit7cf49b34db0a9aeee201594704798b69035c7036 (patch)
tree0dd3add80ec0f99ca27dcf63d8e8731135df3519
parenta99269edfb9673264f038178b58b942c5e6bc31a (diff)
content: generateTrackInfoPage: sticky tracksThatRef/Samp dynamics
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js18
-rw-r--r--src/strings-default.yaml17
2 files changed, 31 insertions, 4 deletions
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index 8e97b744..ec93ab71 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -419,26 +419,40 @@ export default {
             sec.referencedBy.heading
               .slots({
                 attributes: {id: 'referenced-by'},
+
                 title:
                   language.$('releaseInfo.tracksThatReference', {
                     track: html.tag('i', data.name),
                   }),
+
+                stickyTitle:
+                  language.$('releaseInfo.tracksThatReference.sticky'),
               }),
 
-            sec.referencedBy.list,
+            sec.referencedBy.list
+              .slots({
+                headingString: 'releaseInfo.tracksThatReference',
+              }),
           ],
 
           sec.sampledBy && [
             sec.sampledBy.heading
               .slots({
                 attributes: {id: 'referenced-by'},
+
                 title:
                   language.$('releaseInfo.tracksThatSample', {
                     track: html.tag('i', data.name),
                   }),
+
+                stickyTitle:
+                  language.$('releaseInfo.tracksThatSample.sticky'),
               }),
 
-            sec.sampledBy.list,
+            sec.sampledBy.list
+              .slots({
+                headingString: 'releaseInfo.tracksThatSample',
+              }),
           ],
 
           sec.flashesThatFeature && [
diff --git a/src/strings-default.yaml b/src/strings-default.yaml
index 359e8854..9c429d46 100644
--- a/src/strings-default.yaml
+++ b/src/strings-default.yaml
@@ -281,8 +281,21 @@ releaseInfo:
     _: "Tracks that {TRACK} samples:"
     sticky: "Tracks that this one samples:"
 
-  tracksThatReference: "Tracks that reference {TRACK}:"
-  tracksThatSample: "Tracks that sample {TRACK}:"
+  tracksThatReference:
+    _: "Tracks that reference {TRACK}:"
+
+    sticky:
+      _: "Tracks that reference this one:"
+      fromGroup: "Tracks from {GROUP} that reference this one:"
+      fromOther: "Tracks from somewhere else that reference this one:"
+
+  tracksThatSample:
+    _: "Tracks that sample {TRACK}:"
+
+    sticky:
+      _: "Tracks that sample this one:"
+      fromGroup: "Tracks from {GROUP} that sample this one:"
+      fromOther: "Tracks from somewhere else that sample this one:"
 
   flashesThatFeature:
     _: "Flashes & games that feature {TRACK}:"