« get me outta code hell

content: gRIContributionsLine: wiki edit annotations - 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-08-15 13:10:58 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-08-15 13:38:20 -0300
commita99f53466600ddf00945d111409179e50af00a67 (patch)
tree0b69b5f2383a61d1e2d559f63fbb3193b95554bc
parenta121af54628ed4449d5c9a3eb0284f6f732254df (diff)
content: gRIContributionsLine: wiki edit annotations
-rw-r--r--src/content/dependencies/generateReleaseInfoContributionsLine.js4
-rw-r--r--src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js20
-rw-r--r--src/strings-default.yaml2
3 files changed, 13 insertions, 13 deletions
diff --git a/src/content/dependencies/generateReleaseInfoContributionsLine.js b/src/content/dependencies/generateReleaseInfoContributionsLine.js
index 195b94f3..c2eb6a46 100644
--- a/src/content/dependencies/generateReleaseInfoContributionsLine.js
+++ b/src/content/dependencies/generateReleaseInfoContributionsLine.js
@@ -11,11 +11,11 @@ export default {
   query: (contributions) => ({
     normalContributions:
       contributions
-        .filter(contrib => contrib.annotation !== 'edits for wiki'),
+        .filter(contrib => !contrib.annotation?.startsWith(`edits for wiki`)),
 
     wikiEditContributions:
       contributions
-        .filter(contrib => contrib.annotation === 'edits for wiki'),
+        .filter(contrib => contrib.annotation?.startsWith(`edits for wiki`)),
   }),
 
   relations: (relation, query, _contributions) => ({
diff --git a/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js b/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js
index c5c52fa0..a2a103b6 100644
--- a/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js
+++ b/src/content/dependencies/generateReleaseInfoContributionsLineWikiEditsPart.js
@@ -5,7 +5,7 @@ export default {
     'linkContribution',
   ],
 
-  extraDependencies: ['html', 'language'],
+  extraDependencies: ['language'],
 
   relations: (relation, contributions) => ({
     textWithTooltip:
@@ -19,7 +19,7 @@ export default {
         .map(contrib => relation('linkContribution', contrib)),
   }),
 
-  generate: (relations, {html, language}) =>
+  generate: (relations, {language}) =>
     language.encapsulate('misc.artistLink.withEditsForWiki', capsule =>
       relations.textWithTooltip.slots({
         attributes:
@@ -34,18 +34,18 @@ export default {
               {class: 'wiki-edits-tooltip'},
 
             content:
-              html.tags(
-                relations.contributionLinks.map(link =>
-                  language.$(capsule, 'editsLine', {
-                    artist:
+              language.$(capsule, 'editsLine', {
+                [language.onlyIfOptions]: ['artists'],
+
+                artists:
+                  language.formatConjunctionList(
+                    relations.contributionLinks.map(link =>
                       link.slots({
                         showAnnotation: true,
                         trimAnnotation: true,
                         preventTooltip: true,
-                      }),
-                  })),
-
-                {[html.joinChildren]: html.tag('br')}),
+                      }))),
+                }),
           }),
       })),
 };
diff --git a/src/strings-default.yaml b/src/strings-default.yaml
index 144c1dd1..0dc86ef0 100644
--- a/src/strings-default.yaml
+++ b/src/strings-default.yaml
@@ -496,7 +496,7 @@ misc:
     withEditsForWiki:
       _: "{ARTISTS} ({EDITS})"
       edits: "+ edits"
-      editsLine: "Edits for wiki by {ARTIST}"
+      editsLine: "Edits for wiki by {ARTISTS}"
 
     # Displayed in an artist's tooltip, if one of their URLs
     # isn't a specially detected web platform.