diff options
Diffstat (limited to 'src/content/dependencies')
6 files changed, 12 insertions, 21 deletions
diff --git a/src/content/dependencies/generateAlbumCoverArtwork.js b/src/content/dependencies/generateAlbumCoverArtwork.js index 3f2066b4..99003034 100644 --- a/src/content/dependencies/generateAlbumCoverArtwork.js +++ b/src/content/dependencies/generateAlbumCoverArtwork.js @@ -1,5 +1,6 @@ export default { contentDependencies: ['generateCoverArtwork'], + extraDependencies: ['language'], relations: (relation, album) => ({ coverArtwork: @@ -17,10 +18,11 @@ export default { album.coverArtDimensions, }), - generate: (data, relations) => + generate: (data, relations, {language}) => relations.coverArtwork.slots({ path: data.path, color: data.color, dimensions: data.dimensions, + alt: language.$('misc.alt.albumCover'), }), }; diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js index 22c6edcb..a291dedb 100644 --- a/src/content/dependencies/generateAlbumInfoPage.js +++ b/src/content/dependencies/generateAlbumInfoPage.js @@ -108,12 +108,7 @@ export default { additionalNames: relations.additionalNamesBox, - cover: - relations.cover - ?.slots({ - alt: language.$('misc.alt.albumCover'), - }) - ?? null, + cover: relations.cover, mainContent: [ relations.releaseInfo, diff --git a/src/content/dependencies/generateFlashCoverArtwork.js b/src/content/dependencies/generateFlashCoverArtwork.js index 7b996827..bcf2a55c 100644 --- a/src/content/dependencies/generateFlashCoverArtwork.js +++ b/src/content/dependencies/generateFlashCoverArtwork.js @@ -1,5 +1,6 @@ export default { contentDependencies: ['generateCoverArtwork'], + extraDependencies: ['language'], relations: (relation) => ({ coverArtwork: @@ -17,10 +18,11 @@ export default { flash.coverArtDimensions, }), - generate: (data, relations) => + generate: (data, relations, {language}) => relations.coverArtwork.slots({ path: data.path, color: data.color, dimensions: data.dimensions, + alt: language.$('misc.alt.flashArt'), }), }; diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js index 95a6c686..990951f4 100644 --- a/src/content/dependencies/generateFlashInfoPage.js +++ b/src/content/dependencies/generateFlashInfoPage.js @@ -90,12 +90,7 @@ export default { color: data.color, headingMode: 'sticky', - cover: - (relations.cover - ? relations.cover.slots({ - alt: language.$('misc.alt.flashArt'), - }) - : null), + cover: relations.cover, mainContent: [ html.tag('p', diff --git a/src/content/dependencies/generateTrackCoverArtwork.js b/src/content/dependencies/generateTrackCoverArtwork.js index df4e37a4..64690c71 100644 --- a/src/content/dependencies/generateTrackCoverArtwork.js +++ b/src/content/dependencies/generateTrackCoverArtwork.js @@ -1,5 +1,6 @@ export default { contentDependencies: ['generateCoverArtwork'], + extraDependencies: ['language'], relations: (relation, track) => ({ coverArtwork: @@ -27,11 +28,12 @@ export default { : track.album.coverArtDimensions), }), - generate: (data, relations) => + generate: (data, relations, {language}) => relations.coverArtwork.slots({ path: data.path, color: data.color, dimensions: data.dimensions, + alt: language.$('misc.alt.trackCover'), }), }; diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 160acc32..ea13032a 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -139,12 +139,7 @@ export default { color: data.color, styleRules: [relations.albumStyleRules], - cover: - (relations.cover - ? relations.cover.slots({ - alt: language.$('misc.alt.trackCover'), - }) - : null), + cover: relations.cover, mainContent: [ relations.releaseInfo, |