From c39451635c3e0ae07dca54b7a4a7294ea10a7362 Mon Sep 17 00:00:00 2001 From: Mark G <122887340+LlGC-mag@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:11:10 +0000 Subject: [PATCH] Changes attribution close button label. Fixes #1075 (#1169) --- src/content-handlers/iiif/BaseConfig.ts | 1 + .../iiif/extensions/uv-aleph-extension/config/config.json | 6 ++++-- .../iiif/extensions/uv-av-extension/config/config.json | 4 +++- .../iiif/extensions/uv-default-extension/config/config.json | 6 ++++-- .../iiif/extensions/uv-ebook-extension/config/config.json | 6 ++++-- .../extensions/uv-mediaelement-extension/config/config.json | 6 ++++-- .../extensions/uv-model-viewer-extension/config/config.json | 4 +++- .../uv-openseadragon-extension/config/config.json | 4 +++- .../iiif/extensions/uv-pdf-extension/config/config.json | 4 +++- .../iiif/modules/uv-shared-module/CenterPanel.ts | 2 +- src/locales/cy-GB.json | 1 + src/locales/en-GB.json | 1 + src/locales/fr-FR.json | 1 + src/locales/pl-PL.json | 1 + src/locales/sv-SE.json | 1 + 15 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/content-handlers/iiif/BaseConfig.ts b/src/content-handlers/iiif/BaseConfig.ts index 72ac74e48..2fdcb175f 100644 --- a/src/content-handlers/iiif/BaseConfig.ts +++ b/src/content-handlers/iiif/BaseConfig.ts @@ -157,6 +157,7 @@ export type CenterPanelOptions = { export type CenterPanelContent = { attribution: string; close: string; + closeAttribution: string; }; type CenterPanel = ModuleConfig & { diff --git a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json index e56ece38a..715decf6b 100644 --- a/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-aleph-extension/config/config.json @@ -200,7 +200,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "alephCenterPanel": { @@ -213,7 +214,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "settingsDialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json index 40ab3c15b..f2632c896 100644 --- a/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-av-extension/config/config.json @@ -227,7 +227,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "avCenterPanel": { @@ -250,6 +251,7 @@ "content": { "attribution": "$attribution", "close": "$close", + "closeAttribution": "$closeAttribution", "currentTime": "$currentTime", "delimiter": " - ", "duration": "$duration", diff --git a/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json index ad126c184..61ec559b0 100644 --- a/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-default-extension/config/config.json @@ -94,7 +94,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "fileLinkCenterPanel": { @@ -106,7 +107,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "footerPanel": { diff --git a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json index ee2bfe9c0..c99228b14 100644 --- a/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-ebook-extension/config/config.json @@ -196,7 +196,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "ebookCenterPanel": { @@ -208,7 +209,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "settingsDialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json index 52a815ed4..c28a4a972 100644 --- a/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-mediaelement-extension/config/config.json @@ -154,7 +154,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "mediaelementCenterPanel": { @@ -169,7 +170,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "restrictedDialogue": { diff --git a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json index db84edfc1..c348b49ca 100644 --- a/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-model-viewer-extension/config/config.json @@ -245,7 +245,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "modelViewerCenterPanel": { @@ -262,6 +263,7 @@ "content": { "attribution": "$attribution", "close": "$close", + "closeAttribution": "$closeAttribution", "zoomIn": "$zoomIn", "zoomOut": "$zoomOut", "vr": "$vr" diff --git a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json index b6b995404..4feec62f1 100644 --- a/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-openseadragon-extension/config/config.json @@ -334,7 +334,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "openSeadragonCenterPanel": { @@ -364,6 +365,7 @@ "content": { "attribution": "$attribution", "close": "$close", + "closeAttribution": "$closeAttribution", "goHome": "$goHome", "imageUnavailable": "$imageUnavailable", "next": "$next", diff --git a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json index 57e13394f..dce1c1957 100644 --- a/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json +++ b/src/content-handlers/iiif/extensions/uv-pdf-extension/config/config.json @@ -186,7 +186,8 @@ }, "content": { "attribution": "$attribution", - "close": "$close" + "close": "$close", + "closeAttribution": "$closeAttribution" } }, "pdfCenterPanel": { @@ -200,6 +201,7 @@ "content": { "attribution": "$attribution", "close": "$close", + "closeAttribution": "$closeAttribution", "next": "$next", "previous": "$previous" } diff --git a/src/content-handlers/iiif/modules/uv-shared-module/CenterPanel.ts b/src/content-handlers/iiif/modules/uv-shared-module/CenterPanel.ts index bd9b9995d..481dd1cd0 100644 --- a/src/content-handlers/iiif/modules/uv-shared-module/CenterPanel.ts +++ b/src/content-handlers/iiif/modules/uv-shared-module/CenterPanel.ts @@ -73,7 +73,7 @@ export class CenterPanel< this.closeAttribution(); this.$closeAttributionButton = this.$attribution.find(".header .close"); - this.$closeAttributionButton.attr("aria-label", this.content.close); + this.$closeAttributionButton.attr("aria-label", this.content.closeAttribution); this.$closeAttributionButton.on("click", (e) => { e.preventDefault(); this.closeAttribution(); diff --git a/src/locales/cy-GB.json b/src/locales/cy-GB.json index 8ed674c6b..c99fb7ff3 100644 --- a/src/locales/cy-GB.json +++ b/src/locales/cy-GB.json @@ -13,6 +13,7 @@ "$contents": "Cynnwys", "$volume": "cyfrol", "$close": "Cau", + "$closeAttribution": "Cau panel priodoledd", "$allPages": "Pob Tudalen", "$currentViewAsJpg": "Delwedd ddethol {0} x {1}px (jpg)", "$openNewWindow": "Agor mewn dwy ffenest newydd.", diff --git a/src/locales/en-GB.json b/src/locales/en-GB.json index 76efdbb4a..f1e3a7f96 100644 --- a/src/locales/en-GB.json +++ b/src/locales/en-GB.json @@ -13,6 +13,7 @@ "$contents": "Contents", "$volume": "volume", "$close": "Close", + "$closeAttribution": "Close attribution panel", "$allPages": "All Pages", "$currentViewAsJpg": "Current view {0} x {1}px (jpg)", "$openNewWindow": "Opens in a new window", diff --git a/src/locales/fr-FR.json b/src/locales/fr-FR.json index 1bcadc608..886d13f31 100644 --- a/src/locales/fr-FR.json +++ b/src/locales/fr-FR.json @@ -13,6 +13,7 @@ "$contents": "Contenus", "$volume": "volume", "$close": "Fermer", + "$closeAttribution": "Fermer le panneau d'attribution", "$allPages": "Toutes les pages", "$currentViewAsJpg": "Vue actuelle {0} x {1}px (jpg)", "$openNewWindow": "Ouvre une nouvelle fenêtre", diff --git a/src/locales/pl-PL.json b/src/locales/pl-PL.json index 3ee119b0e..cc7e76f3b 100644 --- a/src/locales/pl-PL.json +++ b/src/locales/pl-PL.json @@ -13,6 +13,7 @@ "$contents": "Zawartość", "$volume": "tom", "$close": "Zamknij", + "$closeAttribution": "Zamknij panel atrybucji", "$allPages": "Wszystkie strony", "$currentViewAsJpg": "Aktualny widok {0} x {1}px (jpg)", "$openNewWindow": "Otwiera się w nowym oknie", diff --git a/src/locales/sv-SE.json b/src/locales/sv-SE.json index 073092de9..75222336b 100644 --- a/src/locales/sv-SE.json +++ b/src/locales/sv-SE.json @@ -13,6 +13,7 @@ "$contents": "Innehåll", "$volume": "volym", "$close": "Stäng", + "$closeAttribution": "Stäng upphovspanelen", "$allPages": "Alla sidor", "$currentViewAsJpg": "Aktuell vy {0} x {1}px (jpg)", "$openNewWindow": "Öppnas i nytt fönster",