From 9a8066d6cb85e97c72b9867216b214b26fe2cf30 Mon Sep 17 00:00:00 2001 From: sronveaux Date: Tue, 10 Sep 2024 15:49:51 +0200 Subject: [PATCH 1/2] Added french translations --- app-starter/locales/fr.json | 80 ++++++++++++++ app-starter/static/app-conf-minimal.json | 3 +- app-starter/static/app-conf-projected.json | 3 +- app-starter/static/app-conf-sidebar.json | 3 +- app-starter/static/app-conf.json | 3 +- src/locales/fr.json | 103 ++++++++++++++++++ .../localeswitcher/LocaleSwitcher.spec.js | 8 +- tests/unit/specs/util/Locale.spec.js | 12 +- 8 files changed, 204 insertions(+), 11 deletions(-) create mode 100644 app-starter/locales/fr.json create mode 100644 src/locales/fr.json diff --git a/app-starter/locales/fr.json b/app-starter/locales/fr.json new file mode 100644 index 00000000..b87951ad --- /dev/null +++ b/app-starter/locales/fr.json @@ -0,0 +1,80 @@ +{ + "app": { + "title": "Vue.js / OpenLayers WebGIS", + "browserTitle": "Application de Démonstration Wegue", + "footerTextLeft": "Powered by Wegue WebGIS", + "footerTextRight": "meggsimum", + "logo": "Logo de l'Application" + }, + + "mapLayers": { + "wgu-drag-drop-layer" : { + "name": "Données Téléchargées" + }, + "Shops": { + "name": "Magasins DaSchau" + }, + "gas-wfs": { + "name": "Pompes à Essence WFS", + "attributions": "© OpenStreetMap contributeurs." + }, + "earthquakes": { + "name": "Tremblements de Terre 2012 (Mag 5)", + "attributions": "U.S. Geological Survey" + }, + "ahocevar-wms": { + "name": "Tuiles WMS (ahocevar)" + }, + "ahocevar-imagewms": { + "name": "Images WMS (ahocevar)" + }, + "ahocevar-vectortiles": { + "name": "Couche de Tuiles Vectorielles" + }, + "opentopomap": { + "name": "OpenTopoMap", + "attributions": "Données cartographiques: © OpenStreetMap-contributeurs, SRTM | Représentation cartographique: © OpenTopoMap (CC-BY-SA)" + }, + "osm-bg": { + "name": "OpenStreetMap", + "attributions": "© OpenStreetMap contributeurs." + }, + "dutch-nat-parks" : { + "name": "WFS (Parcs Nationaux Néerlandaiss PDOK)", + "attributions": "PDOK par le Cadastre Néerlandais" + }, + "pdok-natura2000-wms" : { + "name": "WMS - Zones Natura 2000 - PDOK", + "attributions": "PDOK par le Cadastre Néerlandais" + }, + "pdok-lufo-wms" : { + "name": "WMS - Orthophotos Néerlandaises - PDOK", + "attributions": "PDOK par le Cadastre Néerlandais" + }, + "brtachtergrondkaart" : { + "name": "WMTS - Fond de Plan Topographique - PDOK", + "attributions": "PDOK par le Cadastre Néerlandais" + }, + "terrestris-osm-wms" : { + "name": "OSM WMS", + "attributions": "© OpenStreetMap-contributeurs" + }, + "test_arcgisrest" : { + "name": "Couche test de tuiles Arcgis REST", + "attributions": "© Commune de Padova" + } + }, + + "wgu-helpwin": { + "title": "À Propos de", + "textTitle": "À Propos de Wegue", + "htmlContent": "WebGIS basé sur OpenLayers et Vue.js
Modèle et composants réutilisables pour applications de cartographie avec OpenLayers et Vue.js", + "infoLinkUrl": "http://wegue.org/", + "infoLinkText": "Plus d'informations" + }, + + "sample-module": { + "title": "Module d'Exemple", + "text": "Bonjour Wegue" + } +} diff --git a/app-starter/static/app-conf-minimal.json b/app-starter/static/app-conf-minimal.json index a55a053c..f0c4c943 100644 --- a/app-starter/static/app-conf-minimal.json +++ b/app-starter/static/app-conf-minimal.json @@ -18,7 +18,8 @@ "supported": { "en": "English", "de": "Deutsch", - "pt": "Portugues" + "pt": "Portugues", + "fr": "Français" }, "fallback": "en" }, diff --git a/app-starter/static/app-conf-projected.json b/app-starter/static/app-conf-projected.json index 6fb449c8..5fab8444 100644 --- a/app-starter/static/app-conf-projected.json +++ b/app-starter/static/app-conf-projected.json @@ -23,7 +23,8 @@ "supported": { "en": "English", "de": "Deutsch", - "pt": "Portugues" + "pt": "Portugues", + "fr": "Français" }, "fallback": "en" }, diff --git a/app-starter/static/app-conf-sidebar.json b/app-starter/static/app-conf-sidebar.json index 23fc066e..dcfc0fcd 100644 --- a/app-starter/static/app-conf-sidebar.json +++ b/app-starter/static/app-conf-sidebar.json @@ -14,7 +14,8 @@ "supported": { "en": "English", "de": "Deutsch", - "pt": "Portugues" + "pt": "Portugues", + "fr": "Français" }, "fallback": "en" }, diff --git a/app-starter/static/app-conf.json b/app-starter/static/app-conf.json index 8d9e9e39..4cfe67f5 100644 --- a/app-starter/static/app-conf.json +++ b/app-starter/static/app-conf.json @@ -14,7 +14,8 @@ "supported": { "en": "English", "de": "Deutsch", - "pt": "Portugues" + "pt": "Portugues", + "fr": "Français" }, "fallback": "en" }, diff --git a/src/locales/fr.json b/src/locales/fr.json new file mode 100644 index 00000000..33dea7e3 --- /dev/null +++ b/src/locales/fr.json @@ -0,0 +1,103 @@ +{ + "app": { + "title": "Vue.js / OpenLayers WebGIS", + "browserTitle": "Application de Démonstration Wegue", + "footerTextLeft": "Powered by Wegue WebGIS", + "footerTextRight": "meggsimum", + "logo": "Logo de l'Application" + }, + + "mapLayers": { + "wgu-geolocator-layer": { + "name": "Position Actuelle" + }, + "wgu-measure-layer": { + "name": "Résultats des Mesures" + }, + "wgu-drag-drop-layer" : { + "name": "Données Glissées" + } + }, + + "wgu-toolbar-menu": { + "title": "Ouvrir le menu de la barre d'outils" + }, + + "wgu-attributetable": { + "title": "Table d'Attributs", + "selectorLabel": "Choisissez une couche", + "loadingText": "Chargement... Veuillez déplacer la vue vers une zone où la couche est visible" + }, + + "wgu-bglayerswitcher": { + "title": "Changer la couche de fond" + }, + + "wgu-overviewmap": { + "title": "Montrer le plan d'ensemble" + }, + + "wgu-geocoder": { + "title": "Chercher une adresse", + "placeHolder": "Chercher après une adresse" + }, + + "wgu-geolocator": { + "title": "Géolocalisation" + }, + + "wgu-helpwin": { + "title": "À Propos de", + "textTitle": "À Propos de Wegue", + "htmlContent": "WebGIS basé sur OpenLayers et Vue.js
Modèle et composants réutilisables pour applications de cartographie avec OpenLayers et Vue.js", + "infoLinkUrl": "http://wegue.org/", + "infoLinkText": "Plus d'informations" + }, + + "wgu-infoclick": { + "title": "Informations sur la zone cliquée", + "mapClick": "Cliquez sur la carte pour obtenir de l'information sur la zone cliquée.", + "mediaClick": "Cliquez sur une entité de la carte pour afficher les informations multimédia associées.", + "mediaInfoLinkText": null + }, + + "wgu-layerlist": { + "title": "Couches" + }, + + "wgu-maprecorder": { + "title": "Capture vidéo", + "options": "Options", + "videoFormat": "Format vidéo", + "frameRate": "Cadence d'image (images/s)", + "bitRate": "Débit binaire (MBits/s)", + "fileName": "Nom du fichier", + "start": "Démarrage", + "stop": "Arrêt", + "error": "Erreur lors du démarrage de l'enregistrement." + }, + + "wgu-zoomtomaxextent": { + "title": "Réinitialiser l'étendue de la carte" + }, + + "wgu-measuretool": { + "title": "Mesure", + "distance": "Distance", + "length": "Longueur", + "area": "Surface", + "angle": "Angle", + "lengthKm": "{0} km", + "lengthMeter": "{0} m", + "areaSquareKm": "{0} km²", + "areaSquareMeter": "{0} m²" + }, + + "wgu-localeswitcher": { + "title": "Paramètres de Langue" + }, + + "wgu-themeswitcher": { + "title": "Mode sombre" + } +} diff --git a/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js b/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js index f097c52c..127b8822 100644 --- a/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js +++ b/tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js @@ -9,10 +9,11 @@ const appConfig = { lang: { supported: { en: 'English', + de: 'Deutsch', pt: 'Portugues', - de: 'Deutsch' + fr: 'Français' }, - fallback: 'pt' + fallback: 'de' } }; @@ -50,10 +51,11 @@ describe('localeswitcher/LocaleSwitcher.vue', () => { it('has correct default data', () => { expect(typeof LocaleSwitcher.data).to.equal('function'); expect(vm.lang).to.be.an('object'); - expect(Object.keys(vm.lang).length).to.eql(3); + expect(Object.keys(vm.lang).length).to.eql(4); expect(vm.lang.en).to.eql('English'); expect(vm.lang.de).to.eql('Deutsch'); expect(vm.lang.pt).to.eql('Portugues'); + expect(vm.lang.fr).to.eql('Français'); }); afterEach(() => { diff --git a/tests/unit/specs/util/Locale.spec.js b/tests/unit/specs/util/Locale.spec.js index e9cd931c..c7b2e75b 100644 --- a/tests/unit/specs/util/Locale.spec.js +++ b/tests/unit/specs/util/Locale.spec.js @@ -6,7 +6,8 @@ const appConfig = { supported: { en: 'English', de: 'Deutsch', - pt: 'Portugues' + pt: 'Portugues', + fr: 'Français' }, fallback: 'de' } @@ -32,10 +33,11 @@ describe('LocaleUtil', () => { it('getSupportedLanguages returns correct languages', () => { const supported = LocaleUtil.getSupportedLanguages(appConfig); expect(supported).to.be.an('object'); - expect(Object.keys(supported).length).to.eql(3); + expect(Object.keys(supported).length).to.eql(4); expect(supported.en).to.eql('English'); expect(supported.de).to.eql('Deutsch'); expect(supported.pt).to.eql('Portugues'); + expect(supported.fr).to.eql('Français'); }); it('getSupportedLanguages returns correct fallback language when lang is unconfigured', () => { @@ -58,12 +60,14 @@ describe('LocaleUtil', () => { it('isLanguageSupported returns correct results', () => { const enSupported = LocaleUtil.isLanguageSupported('en', appConfig); const deSupported = LocaleUtil.isLanguageSupported('de', appConfig); - const frSupported = LocaleUtil.isLanguageSupported('fr', appConfig); + const nlSupported = LocaleUtil.isLanguageSupported('nl', appConfig); const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig); + const frSupported = LocaleUtil.isLanguageSupported('fr', appConfig); expect(enSupported).to.be.true; expect(deSupported).to.be.true; - expect(frSupported).to.be.false; + expect(nlSupported).to.be.false; expect(ptSupported).to.be.true; + expect(frSupported).to.be.true; }); it('isLanguageSupported returns correct results when lang is unconfigured', () => { From d62143bcfebc08fe738a14d83dc1fdbbbe08aefc Mon Sep 17 00:00:00 2001 From: sronveaux Date: Wed, 11 Sep 2024 10:46:33 +0200 Subject: [PATCH 2/2] Corrected minor typos --- app-starter/locales/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-starter/locales/fr.json b/app-starter/locales/fr.json index b87951ad..99030c24 100644 --- a/app-starter/locales/fr.json +++ b/app-starter/locales/fr.json @@ -16,7 +16,7 @@ }, "gas-wfs": { "name": "Pompes à Essence WFS", - "attributions": "© OpenStreetMap contributeurs." + "attributions": "© OpenStreetMap-contributeurs" }, "earthquakes": { "name": "Tremblements de Terre 2012 (Mag 5)", @@ -37,7 +37,7 @@ }, "osm-bg": { "name": "OpenStreetMap", - "attributions": "© OpenStreetMap contributeurs." + "attributions": "© OpenStreetMap-contributeurs" }, "dutch-nat-parks" : { "name": "WFS (Parcs Nationaux Néerlandaiss PDOK)",