From 17884716641ec3321a623347151b731d0729f238 Mon Sep 17 00:00:00 2001 From: kara Diaby Date: Tue, 1 Sep 2020 16:41:02 +0200 Subject: [PATCH] carto hack : traduce edition buttons in french --- app/javascript/components/MapEditor/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/javascript/components/MapEditor/index.js b/app/javascript/components/MapEditor/index.js index 3bb828e29..c8bb44555 100644 --- a/app/javascript/components/MapEditor/index.js +++ b/app/javascript/components/MapEditor/index.js @@ -40,6 +40,19 @@ function MapEditor({ featureCollection, url, preview, hasCadastres, ign }) { hasCadastres ]); + const translations = [ + ['.mapbox-gl-draw_line', 'Tracer une ligne'], + ['.mapbox-gl-draw_polygon', 'Dessiner un polygone'], + ['.mapbox-gl-draw_point', 'Ajouter un point'], + ['.mapbox-gl-draw_trash', 'Supprimer'] + ]; + for (const [selector, translation] of translations) { + const element = document.querySelector(selector); + if (element) { + element.setAttribute('title', translation); + } + } + const onFeatureFocus = useCallback( ({ detail }) => { const { id } = detail;