diff --git a/frontend/components/media/MediaMap.vue b/frontend/components/media/MediaMap.vue index ac406ebe..37ed7b67 100644 --- a/frontend/components/media/MediaMap.vue +++ b/frontend/components/media/MediaMap.vue @@ -241,15 +241,50 @@ onMounted(() => { }), "top-left" ); - map.addControl(new maplibregl.FullscreenControl()); - map.addControl( - new maplibregl.GeolocateControl({ - positionOptions: { - enableHighAccuracy: true, - }, - trackUserLocation: true, - }) - ); + + // Add localized tooltips for NavigationControl buttons + const zoomInButton: HTMLElement | null = map + .getContainer() + .querySelector(".maplibregl-ctrl-zoom-in"); + if (zoomInButton) + zoomInButton.title = i18n.t("components.media_map.zoom_in"); + + const zoomOutButton: HTMLElement | null = map + .getContainer() + .querySelector(".maplibregl-ctrl-zoom-out"); + if (zoomOutButton) + zoomOutButton.title = i18n.t("components.media_map.zoom_out"); + + const compassButton: HTMLElement | null = map + .getContainer() + .querySelector(".maplibregl-ctrl-compass"); + if (compassButton) + compassButton.title = i18n.t("components.media_map.reset_north"); + + // Localize FullscreenControl + const fullscreenControl = new maplibregl.FullscreenControl(); + map.addControl(fullscreenControl); + + const fullscreenButton: HTMLElement | null = map + .getContainer() + .querySelector(".maplibregl-ctrl-fullscreen"); + if (fullscreenButton) + fullscreenButton.title = i18n.t("components.media_map.fullscreen"); + + // Localize GeolocateControl + const geolocateControl = new maplibregl.GeolocateControl({ + positionOptions: { + enableHighAccuracy: true, + }, + trackUserLocation: true, + }); + map.addControl(geolocateControl); + + const geolocateButton: HTMLElement | null = map + .getContainer() + .querySelector(".maplibregl-ctrl-geolocate"); + if (geolocateButton) + geolocateButton.title = i18n.t("components.media_map.geolocate"); const popup = new maplibregl.Popup({ offset: 25, diff --git a/frontend/i18n/check/run_i18n_checks.py b/frontend/i18n/check/run_i18n_checks.py index e094cd0f..44077058 100644 --- a/frontend/i18n/check/run_i18n_checks.py +++ b/frontend/i18n/check/run_i18n_checks.py @@ -15,13 +15,13 @@ def run_check(script_name): Parameters ---------- - script_name : str - The filename for the script to run. + script_name : str + The filename for the script to run. Raises ------- - subprocess.CalledProcessError - An error that the given check script has failed. + subprocess.CalledProcessError + An error that the given check script has failed. """ try: subprocess.run( diff --git a/frontend/i18n/de.json b/frontend/i18n/de.json index dd545344..dd55b798 100644 --- a/frontend/i18n/de.json +++ b/frontend/i18n/de.json @@ -75,8 +75,8 @@ "components._global.upvote_application_aria_label": "Stimmen Sie ab, um die Organisation zu unterstützen, die sich der Aktivistin anschließt", "components._global.working_groups_subtext": "Die folgenden Arbeitsgruppen sind innerhalb von {entity_name}", "components.btn_road_map.aria_label": "Erfahren Sie mehr über die Roadmap für Aktivist*innen", - "components.btn_share_icon.url_copied": "URL kopiert", "components.btn_share_icon.opening_signal": "Signal wird geöffnet", + "components.btn_share_icon.url_copied": "URL kopiert", "components.card.about._global.full_text": "Für den vollständigen Text anklicken", "components.card.about._global.full_text_aria_label": "Klicken Sie hier, um ein Popup mit dem vollständigen Text anzuzeigen", "components.card.about._global.members_lower": "Mitglieder", @@ -257,7 +257,12 @@ "components.landing_tech_banner.open_source_text": "Wir haben es uns zur Aufgabe gemacht, offen zu arbeiten, um Vertrauen zu unseren Partnerorganisationen und Mitaktivisten aufzubauen. Alle, die uns beim Bauen helfen wollen, sind herzlich willkommen!", "components.logo_activist.aria_label": "Das Aktivistenlogo, das auf die Startseite verweist", "components.media_image_carousel.img_alt_text": "Image der Organisation oder ihrer Arbeit.", + "components.media_map.fullscreen": "Vollbild", + "components.media_map.geolocate": "Geolokalisieren", "components.media_map.maplibre_gl_alert": "Ihr Browser unterstützt unseren Kartendienst MapLibre GL nicht, so dass wir keine Karten anzeigen können.", + "components.media_map.reset_north": "Zurücksetzen", + "components.media_map.zoom_in": "Vergrößern", + "components.media_map.zoom_out": "Verkleinern", "components.modal.edit._global.join_organization_link": "Link zum Beitritt zur Organisation", "components.modal.edit._global.remember_https": "Dies ist die URL, auf die die Schaltfläche \"Beitreten\" verlinkt wird. Bitte fügen Sie die vollständige URL mit https ein, damit der Link ordnungsgemäß funktioniert.", "components.modal.edit._global.update_texts": "Texte aktualisieren", diff --git a/frontend/i18n/en-US.json b/frontend/i18n/en-US.json index 611a2c4b..fe8fcb6e 100644 --- a/frontend/i18n/en-US.json +++ b/frontend/i18n/en-US.json @@ -261,7 +261,12 @@ "components.media_image_carousel.img_alt_text": "Image of the organization or their work.", "components.media_map.change_profile": "Change profile [p]", "components.media_map.clear_directions": "Clear directions", + "components.media_map.fullscreen": "Fullscreen", + "components.media_map.geolocate": "Geolocate", "components.media_map.maplibre_gl_alert": "Your browser does not support our mapping service MapLibre GL, so we won't be able to display maps.", + "components.media_map.reset_north": "Reset compass", + "components.media_map.zoom_in": "Zoom In", + "components.media_map.zoom_out": "Zoom Out", "components.modal.edit._global.join_organization_link": "Join organization link", "components.modal.edit._global.remember_https": "This is the URL that the join button will link to. Please include the full URL with https so the link works properly.", "components.modal.edit._global.update_texts": "Update texts", diff --git a/frontend/i18n/es.json b/frontend/i18n/es.json index 29a03b82..c26087c0 100644 --- a/frontend/i18n/es.json +++ b/frontend/i18n/es.json @@ -75,8 +75,8 @@ "components._global.upvote_application_aria_label": "Vota para apoyar a la organización que se une a los activistas", "components._global.working_groups_subtext": "Los siguientes son grupos de trabajo dentro de {entity_name}", "components.btn_road_map.aria_label": "Conozca la hoja de ruta de activist", - "components.btn_share_icon.url_copied": "URL copiada", "components.btn_share_icon.opening_signal": "Abriendo Signal", + "components.btn_share_icon.url_copied": "URL copiada", "components.card.about._global.full_text": "Click para texto completo", "components.card.about._global.full_text_aria_label": "Click para ver una ventana emergente con el texto completo", "components.card.about._global.members_lower": "miembros", @@ -258,7 +258,12 @@ "components.landing_tech_banner.open_source_text": "Nuestra misión es trabajar abiertamente para generar confianza con nuestras organizaciones asociadas y compañeros activistas. ¡Todo los que quieran ayudarnos son bienvenidos!", "components.logo_activist.aria_label": "El logotipo del activista que enlaza a la página de inicio", "components.media_image_carousel.img_alt_text": "Imagen de la organización o de su trabajo.", + "components.media_map.fullscreen": "Pantalla completa", + "components.media_map.geolocate": "Geolocalizar", "components.media_map.maplibre_gl_alert": "Su navegador no es compatible con nuestro servicio de mapas MapLibre GL, por lo que no podremos mostrar mapas.", + "components.media_map.reset_north": "Restablecer brújula", + "components.media_map.zoom_in": "Acercar", + "components.media_map.zoom_out": "Alejar", "components.modal.edit._global.join_organization_link": "Unirse al enlace de la organización", "components.modal.edit._global.remember_https": "Esta es la URL a la que se vinculará el botón para unirse. Incluya la URL completa con https para que el enlace funcione correctamente.", "components.modal.edit._global.update_texts": "Actualizar textos", diff --git a/frontend/i18n/fr.json b/frontend/i18n/fr.json index 2c76b7fd..e5c72e8a 100644 --- a/frontend/i18n/fr.json +++ b/frontend/i18n/fr.json @@ -75,8 +75,8 @@ "components._global.upvote_application_aria_label": "Voter pour soutenir l’organisation qui rejoint le mouvement", "components._global.working_groups_subtext": "Les groupes de travail suivants font partie de {entity_name}", "components.btn_road_map.aria_label": "En savoir plus sur la feuille de route d'Activist", - "components.btn_share_icon.url_copied": "URL copiée", "components.btn_share_icon.opening_signal": "Signal d'ouverture", + "components.btn_share_icon.url_copied": "URL copiée", "components.card.about._global.full_text": "Cliquer pour texte intégral", "components.card.about._global.full_text_aria_label": "Cliquez pour afficher une fenêtre contextuelle avec le texte intégral", "components.card.about._global.members_lower": "membres", @@ -258,7 +258,12 @@ "components.landing_tech_banner.open_source_text": "Nous sommes déterminés à travailler en toute transparence pour établir la confiance avec nos organisations partenaires et nos autres militants. Tous ceux/celles qui veulent nous aider à bâtir sont les bienvenu(e)s !", "components.logo_activist.aria_label": "Le logo d'activist qui renvoie à la page d’accueil", "components.media_image_carousel.img_alt_text": "Image de l’organisation ou de son travail.", + "components.media_map.fullscreen": "Plein écran", + "components.media_map.geolocate": "Géolocaliser", "components.media_map.maplibre_gl_alert": "Votre navigateur ne prend pas en charge notre service de cartographie MapLibre GL, nous ne pourrons donc pas afficher les cartes.", + "components.media_map.reset_north": "Boussole", + "components.media_map.zoom_in": "Zoom In", + "components.media_map.zoom_out": "Zoom Out", "components.modal.edit._global.join_organization_link": "Lien vers l'organisation à joindre", "components.modal.edit._global.remember_https": "C’est l’URL vers laquelle le bouton de connexion va se connecter. Veuillez inclure l’URL complète avec https pour que le lien fonctionne correctement.", "components.modal.edit._global.update_texts": "Mettre à jour les textes", diff --git a/frontend/i18n/pt.json b/frontend/i18n/pt.json index ab5b3b00..a063ca50 100644 --- a/frontend/i18n/pt.json +++ b/frontend/i18n/pt.json @@ -75,8 +75,8 @@ "components._global.upvote_application_aria_label": "Votar para apoiar a organização a juntar-se ao ativista", "components._global.working_groups_subtext": "Os seguintes são grupos de trabalho dentro de {entity_name}", "components.btn_road_map.aria_label": "Saber mais sobre o roadmap do ativista", - "components.btn_share_icon.url_copied": "URL copiado", "components.btn_share_icon.opening_signal": "A abrir o Signal", + "components.btn_share_icon.url_copied": "URL copiado", "components.card.about._global.full_text": "Clique para o texto completo", "components.card.about._global.full_text_aria_label": "Clique para ver um popup com o texto completo", "components.card.about._global.members_lower": "membros", @@ -258,7 +258,12 @@ "components.landing_tech_banner.open_source_text": "Estamos dedicados a trabalhar em aberto para construir confiança com as nossas organizações parceiras e colegas ativistas. Todos os que queiram ajudar-nos a construir são bem-vindos!", "components.logo_activist.aria_label": "O logótipo do ativista que liga para a página inicial", "components.media_image_carousel.img_alt_text": "Imagem da organização ou do seu trabalho.", + "components.media_map.fullscreen": "Ecrã inteiro", + "components.media_map.geolocate": "Geolocalizar", "components.media_map.maplibre_gl_alert": "O seu navegador não suporta o nosso serviço de mapeamento MapLibre GL, por isso não poderemos exibir mapas.", + "components.media_map.reset_north": "Repor bússola", + "components.media_map.zoom_in": "Ampliar", + "components.media_map.zoom_out": "Reduzir", "components.modal.edit._global.join_organization_link": "Link para juntar-se à organização", "components.modal.edit._global.remember_https": "Este é o URL para o qual o botão \"Juntar-se\" irá ligar. Por favor, inclua o URL completo com https para que o link funcione corretamente.", "components.modal.edit._global.update_texts": "Atualizar textos",