« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/listing-spec.js22
-rw-r--r--src/misc-templates.js2
-rw-r--r--src/page/album-commentary.js6
-rw-r--r--src/page/artist.js6
-rw-r--r--src/page/group.js4
-rw-r--r--src/page/listing.js4
-rw-r--r--src/page/tag.js2
-rw-r--r--src/util/strings.js2
8 files changed, 24 insertions, 24 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index f1e39163..3ee977d2 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -21,7 +21,7 @@ const listingSpec = [
         row(album, {link, strings}) {
             return strings('listingPage.listAlbums.byName.item', {
                 album: link.album(album),
-                tracks: strings.count.tracks(album.tracks.length, {unit: true})
+                tracks: language.countTracks(album.tracks.length, {unit: true})
             });
         }
     },
@@ -38,7 +38,7 @@ const listingSpec = [
         row(album, {link, strings}) {
             return strings('listingPage.listAlbums.byTracks.item', {
                 album: link.album(album),
-                tracks: strings.count.tracks(album.tracks.length, {unit: true})
+                tracks: language.countTracks(album.tracks.length, {unit: true})
             });
         }
     },
@@ -122,7 +122,7 @@ const listingSpec = [
         row({artist, contributions}, {link, strings}) {
             return strings('listingPage.listArtists.byName.item', {
                 artist: link.artist(artist),
-                contributions: strings.count.contributions(contributions, {unit: true})
+                contributions: language.countContributions(contributions, {unit: true})
             });
         }
     },
@@ -176,7 +176,7 @@ const listingSpec = [
                             ${(toTracks
                                 .map(({ artist, contributions }) => strings('listingPage.listArtists.byContribs.item', {
                                     artist: link.artist(artist),
-                                    contributions: strings.count.contributions(contributions, {unit: true})
+                                    contributions: language.countContributions(contributions, {unit: true})
                                 }))
                                 .map(row => `<li>${row}</li>`)
                                 .join('\n'))}
@@ -191,7 +191,7 @@ const listingSpec = [
                             ${(toArtAndFlashes
                                 .map(({ artist, contributions }) => strings('listingPage.listArtists.byContribs.item', {
                                     artist: link.artist(artist),
-                                    contributions: strings.count.contributions(contributions, {unit: true})
+                                    contributions: language.countContributions(contributions, {unit: true})
                                 }))
                                 .map(row => `<li>${row}</li>`)
                                 .join('\n'))}
@@ -219,7 +219,7 @@ const listingSpec = [
         row({artist, entries}, {link, strings}) {
             return strings('listingPage.listArtists.byCommentary.item', {
                 artist: link.artist(artist),
-                entries: strings.count.commentaryEntries(entries, {unit: true})
+                entries: language.countCommentaryEntries(entries, {unit: true})
             });
         }
     },
@@ -388,7 +388,7 @@ const listingSpec = [
         row({group, albums}, {link, strings}) {
             return strings('listingPage.listGroups.byAlbums.item', {
                 group: link.groupInfo(group),
-                albums: strings.count.albums(albums, {unit: true})
+                albums: language.countAlbums(albums, {unit: true})
             });
         }
     },
@@ -407,7 +407,7 @@ const listingSpec = [
         row({group, tracks}, {link, strings}) {
             return strings('listingPage.listGroups.byTracks.item', {
                 group: link.groupInfo(group),
-                tracks: strings.count.tracks(tracks, {unit: true})
+                tracks: language.countTracks(tracks, {unit: true})
             });
         }
     },
@@ -612,7 +612,7 @@ const listingSpec = [
         row({track, timesReferenced}, {link, strings}) {
             return strings('listingPage.listTracks.byTimesReferenced.item', {
                 track: link.track(track),
-                timesReferenced: strings.count.timesReferenced(timesReferenced, {unit: true})
+                timesReferenced: language.countTimesReferenced(timesReferenced, {unit: true})
             });
         }
     },
@@ -724,7 +724,7 @@ const listingSpec = [
         row({tag, timesUsed}, {link, strings}) {
             return strings('listingPage.listTags.byName.item', {
                 tag: link.tag(tag),
-                timesUsed: strings.count.timesUsed(timesUsed, {unit: true})
+                timesUsed: language.countTimesUsed(timesUsed, {unit: true})
             });
         }
     },
@@ -744,7 +744,7 @@ const listingSpec = [
         row({tag, timesUsed}, {link, strings}) {
             return strings('listingPage.listTags.byUses.item', {
                 tag: link.tag(tag),
-                timesUsed: strings.count.timesUsed(timesUsed, {unit: true})
+                timesUsed: language.countTimesUsed(timesUsed, {unit: true})
             });
         }
     },
diff --git a/src/misc-templates.js b/src/misc-templates.js
index 6289a737..9a00d3b5 100644
--- a/src/misc-templates.js
+++ b/src/misc-templates.js
@@ -306,7 +306,7 @@ export function getAlbumGridHTML({
         srcFn: getAlbumCover,
         linkFn: link.album,
         detailsFn: details && (album => strings('misc.albumGrid.details', {
-            tracks: strings.count.tracks(album.tracks.length, {unit: true}),
+            tracks: language.countTracks(album.tracks.length, {unit: true}),
             time: strings.count.duration(getTotalDuration(album.tracks))
         })),
         noSrcTextFn: album => strings('misc.albumGrid.noCoverArt', {
diff --git a/src/page/album-commentary.js b/src/page/album-commentary.js
index c03ae3db..90b36fc2 100644
--- a/src/page/album-commentary.js
+++ b/src/page/album-commentary.js
@@ -48,7 +48,7 @@ export function write(album, {wikiData}) {
                         })}</h1>
                         <p>${strings('albumCommentaryPage.infoLine', {
                             words: `<b>${strings.count.words(words, {unit: true})}</b>`,
-                            entries: `<b>${strings.count.commentaryEntries(entries.length, {unit: true})}</b>`
+                            entries: `<b>${language.countCommentaryEntries(entries.length, {unit: true})}</b>`
                         })}</p>
                         ${album.commentary && fixWS`
                             <h3>${strings('albumCommentaryPage.entry.title.albumCommentary')}</h3>
@@ -117,7 +117,7 @@ export function writeTargetless({wikiData}) {
                         <h1>${strings('commentaryIndex.title')}</h1>
                         <p>${strings('commentaryIndex.infoLine', {
                             words: `<b>${strings.count.words(totalWords, {unit: true})}</b>`,
-                            entries: `<b>${strings.count.commentaryEntries(totalEntries, {unit: true})}</b>`
+                            entries: `<b>${language.countCommentaryEntries(totalEntries, {unit: true})}</b>`
                         })}</p>
                         <p>${strings('commentaryIndex.albumList.title')}</p>
                         <ul>
@@ -126,7 +126,7 @@ export function writeTargetless({wikiData}) {
                                     <li>${strings('commentaryIndex.albumList.item', {
                                         album: link.albumCommentary(album),
                                         words: strings.count.words(words, {unit: true}),
-                                        entries: strings.count.commentaryEntries(entries.length, {unit: true})
+                                        entries: language.countCommentaryEntries(entries.length, {unit: true})
                                     })}</li>
                                 `)
                                 .join('\n')}
diff --git a/src/page/artist.js b/src/page/artist.js
index 146b75a5..0383c68d 100644
--- a/src/page/artist.js
+++ b/src/page/artist.js
@@ -325,7 +325,7 @@ export function write(artist, {wikiData}) {
                                 groups: strings.list.unit(musicGroups
                                     .map(({ group, contributions }) => strings('artistPage.groupsLine.item', {
                                         group: link.groupInfo(group),
-                                        contributions: strings.count.contributions(contributions)
+                                        contributions: language.countContributions(contributions)
                                     })))
                             })}</p>
                             ${generateTrackList(trackListChunks)}
@@ -341,7 +341,7 @@ export function write(artist, {wikiData}) {
                                 groups: strings.list.unit(artGroups
                                     .map(({ group, contributions }) => strings('artistPage.groupsLine.item', {
                                         group: link.groupInfo(group),
-                                        contributions: strings.count.contributions(contributions)
+                                        contributions: language.countContributions(contributions)
                                     })))
                             })}</p>
                             <dl>
@@ -446,7 +446,7 @@ export function write(artist, {wikiData}) {
                 content: fixWS`
                     <h1>${strings('artistGalleryPage.title', {artist: name})}</h1>
                     <p class="quick-info">${strings('artistGalleryPage.infoLine', {
-                        coverArts: strings.count.coverArts(artThingsGallery.length, {unit: true})
+                        coverArts: language.countCoverArts(artThingsGallery.length, {unit: true})
                     })}</p>
                     <div class="grid-listing">
                         ${getGridHTML({
diff --git a/src/page/group.js b/src/page/group.js
index 0a6cee1e..7ffade67 100644
--- a/src/page/group.js
+++ b/src/page/group.js
@@ -127,8 +127,8 @@ export function write(group, {wikiData}) {
                     <h1>${strings('groupGalleryPage.title', {group: group.name})}</h1>
                     <p class="quick-info">${
                         strings('groupGalleryPage.infoLine', {
-                            tracks: `<b>${strings.count.tracks(tracks.length, {unit: true})}</b>`,
-                            albums: `<b>${strings.count.albums(albums.length, {unit: true})}</b>`,
+                            tracks: `<b>${language.countTracks(tracks.length, {unit: true})}</b>`,
+                            albums: `<b>${language.countAlbums(albums.length, {unit: true})}</b>`,
                             time: `<b>${strings.count.duration(totalDuration, {unit: true})}</b>`
                         })
                     }</p>
diff --git a/src/page/listing.js b/src/page/listing.js
index 8a6d3526..dbac4b73 100644
--- a/src/page/listing.js
+++ b/src/page/listing.js
@@ -112,8 +112,8 @@ export function writeTargetless({wikiData}) {
                     <h1>${strings('listingIndex.title')}</h1>
                     <p>${strings('listingIndex.infoLine', {
                         wiki: wikiInfo.name,
-                        tracks: `<b>${strings.count.tracks(trackData.length, {unit: true})}</b>`,
-                        albums: `<b>${strings.count.albums(albumData.length, {unit: true})}</b>`,
+                        tracks: `<b>${language.countTracks(trackData.length, {unit: true})}</b>`,
+                        albums: `<b>${language.countAlbums(albumData.length, {unit: true})}</b>`,
                         duration: `<b>${strings.count.duration(totalDuration, {approximate: true, unit: true})}</b>`
                     })}</p>
                     <hr>
diff --git a/src/page/tag.js b/src/page/tag.js
index f911d84b..09d0beb9 100644
--- a/src/page/tag.js
+++ b/src/page/tag.js
@@ -45,7 +45,7 @@ export function write(tag, {wikiData}) {
                 content: fixWS`
                     <h1>${strings('tagPage.title', {tag: tag.name})}</h1>
                     <p class="quick-info">${strings('tagPage.infoLine', {
-                        coverArts: strings.count.coverArts(things.length, {unit: true})
+                        coverArts: language.countCoverArts(things.length, {unit: true})
                     })}</p>
                     <div class="grid-listing">
                         ${getGridHTML({
diff --git a/src/util/strings.js b/src/util/strings.js
index ffd257b1..c596bd89 100644
--- a/src/util/strings.js
+++ b/src/util/strings.js
@@ -32,7 +32,7 @@ import { bindOpts } from './sugar.js';
 //
 // ...you can just do:
 //
-//     strings.count.tracks(album.tracks.length)
+//     language.countTracks(album.tracks.length)
 //
 // Definitely note bindUtilities expects an OBJECT, not an array, otherwise
 // it won't 8e a8le to know what keys to attach the utilities 8y!