From 3bb3ac18c84bfcfddbc560143a323ddf64c92512 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 16 Jun 2024 15:28:28 -0300 Subject: content: don't shorthand capsule instead of workingCapsule --- src/content/dependencies/generateAlbumSidebarTrackSection.js | 10 +++++----- .../dependencies/generateArtistInfoPageTracksChunkItem.js | 10 +++++----- src/content/dependencies/generateTrackInfoPage.js | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/generateAlbumSidebarTrackSection.js b/src/content/dependencies/generateAlbumSidebarTrackSection.js index d59218b8..d0c46060 100644 --- a/src/content/dependencies/generateAlbumSidebarTrackSection.js +++ b/src/content/dependencies/generateAlbumSidebarTrackSection.js @@ -119,16 +119,16 @@ export default { colorStyle, html.tag('span', - language.encapsulate(capsule, 'group', capsule => { - const options = {group: sectionName}; + language.encapsulate(capsule, 'group', workingCapsule => { + const workingOptions = {group: sectionName}; if (data.hasTrackNumbers) { - capsule += '.withRange'; - options.range = + workingCapsule += '.withRange'; + workingOptions.range = `${data.firstTrackNumber}–${data.lastTrackNumber}`; } - return language.$(capsule, options); + return language.$(workingCapsule, workingOptions); }))), (data.hasTrackNumbers diff --git a/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js b/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js index d526f97a..96976826 100644 --- a/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js +++ b/src/content/dependencies/generateArtistInfoPageTracksChunkItem.js @@ -100,16 +100,16 @@ export default { : html.blank()), content: - language.encapsulate('artistPage.creditList.entry.track', capsule => { - const options = {track: relations.trackLink}; + language.encapsulate('artistPage.creditList.entry.track', workingCapsule => { + const workingOptions = {track: relations.trackLink}; if (data.duration) { - capsule += '.withDuration'; - options.duration = + workingCapsule += '.withDuration'; + workingOptions.duration = language.formatDuration(data.duration); } - return language.$(capsule, options); + return language.$(workingCapsule, workingOptions); }), }), }; diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 95eaf35b..7337b987 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -372,19 +372,19 @@ export default { { html: - language.encapsulate(pageCapsule, 'nav.track', capsule => { - const options = {}; + language.encapsulate(pageCapsule, 'nav.track', workingCapsule => { + const workingOptions = {}; - options.track = + workingOptions.track = relations.trackLink .slot('attributes', {class: 'current'}); if (data.hasTrackNumbers) { - capsule += '.withNumber'; - options.number = data.trackNumber; + workingCapsule += '.withNumber'; + workingOptions.number = data.trackNumber; } - return language.$(capsule, options); + return language.$(workingCapsule, workingOptions); }), }, ], -- cgit 1.3.0-6-gf8a5