From 15ef511cd7b1afed7a2b531a0f01ecc7d7bee781 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 15 Apr 2022 19:31:57 -0300 Subject: use strings.list.unit to join contribs This is kind of a pain to support. --- src/page/artist.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/page/artist.js b/src/page/artist.js index 9d17b483..38ca76d6 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -96,10 +96,10 @@ export function write(artist, {wikiData}) { : track.contributorContribs.filter(({ who }) => who !== artist)), contrib: { who: artist, - what: [ + whatArray: [ track.artistContribs.find(({ who }) => who === artist)?.what, track.contributorContribs.find(({ who }) => who === artist)?.what - ].filter(Boolean).join(', ') + ].filter(Boolean) } })), ['date', 'album']) .map(({date, album, chunk}) => ({ @@ -154,20 +154,20 @@ export function write(artist, {wikiData}) { (aka ? strings('artistPage.creditList.entry.rerelease', {entry}) : (artists.length - ? (contrib.what + ? ((contrib.what || contrib.whatArray?.length) ? strings('artistPage.creditList.entry.withArtists.withContribution', { entry, artists: getArtistString(artists), - contribution: contrib.what + contribution: (contrib.whatArray ? strings.list.unit(contrib.whatArray) : contrib.what) }) : strings('artistPage.creditList.entry.withArtists', { entry, artists: getArtistString(artists) })) - : (contrib.what + : ((contrib.what || contrib.whatArray?.length) ? strings('artistPage.creditList.entry.withContribution', { entry, - contribution: contrib.what + contribution: (contrib.whatArray ? strings.list.unit(contrib.whatArray) : contrib.what) }) : entry))); -- cgit 1.3.0-6-gf8a5