Skip to content

Commit

Permalink
Merge pull request #378 from wljrodrigues/master
Browse files Browse the repository at this point in the history
Portuguese translation of wegue
  • Loading branch information
chrismayer authored Apr 25, 2024
2 parents d211b88 + fcb01e9 commit 5ddd030
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 8 deletions.
75 changes: 75 additions & 0 deletions app-starter/locales/pt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"app": {
"title": "Vue.js / OpenLayers WebGIS",
"browserTitle": "Aplicativo de Demonstração Wegue",
"footerTextLeft": "Desenvolvido por <a href='https://meggsimum.de/wegue/' target='_blank'>Wegue WebGIS</a>",
"footerTextRight": "meggsimum",
"logo": "Logotipo do Aplicativo"
},

"mapLayers": {
"wgu-drag-drop-layer" : {
"name": "Dados Enviados"
},
"Shops": {
"name": "Shops DaSchau"
},
"gas-wfs": {
"name": "Estações de Gás WFS",
"attributions": "© <a href=\"https://www.openstreetmap.org/copyright\">Colaboradores do OpenStreetMap</a>"
},
"earthquakes": {
"name": "Terremotos 2012 (Magnitude 5)",
"attributions": "Serviço Geológico dos Estados Unidos"
},
"ahocevar-wms": {
"name": "WMS em Mosaico (ahocevar)"
},
"ahocevar-imagewms": {
"name": "WMS de Imagens (ahocevar)"
},
"ahocevar-vectortiles": {
"name": "Camada de Dados Vetoriais"
},
"opentopomap": {
"name": "OpenTopoMap",
"attributions": "Dados do mapa: <a href=\"https://openstreetmap.org/copyright\">© Colaboradores do OpenStreetMap</a>, SRTM | Representação do mapa: © <a href=\"http://opentopomap.org/\">OpenTopoMap</a> (<a href=\"https://creativecommons.org/licenses/by-sa/3.0/\">CC-BY-SA</a>)"
},
"osm-bg": {
"name": "OpenStreetMap"
},
"dutch-nat-parks" : {
"name": "WFS (Parques Nacionais Holandeses PDOK)",
"attributions": "<a href='https://www.pdok.nl' target='_blank'>PDOK</a> pelo Kadaster Holandês"
},
"pdok-natura2000-wms" : {
"name": "WMS - Áreas Natura 2000 - PDOK",
"attributions": "<a href='https://www.pdok.nl' target='_blank'>PDOK</a> pelo Kadaster Holandês"
},
"pdok-lufo-wms" : {
"name": "WMS - Mapa Aéreo Holandês - PDOK",
"attributions": "<a href='https://www.pdok.nl' target='_blank'>PDOK</a> pelo Kadaster Holandês"
},
"brtachtergrondkaart" : {
"name": "WMTS - Mapa de Base Topográfico - PDOK",
"attributions": "<a href='https://www.pdok.nl' target='_blank'>PDOK</a> pelo Kadaster Holandês"
},
"terrestris-osm-wms" : {
"name": "WMS do OSM",
"attributions": "<a href='https://www.openstreetmap.org/copyright' target='_blank'>© Colaboradores do OpenStreetMap</a>"
}
},

"wgu-helpwin": {
"title": "Sobre",
"textTitle": "Sobre Wegue",
"htmlContent": "<b>WebGIS com OpenLayers e Vue.js</b> Modelo e componentes reutilizáveis para aplicações de mapeamento web com OpenLayers e Vue.js",
"infoLinkUrl": "http://wegue.org/",
"infoLinkText": "Mais informações"
},

"sample-module": {
"title": "Módulo de Exemplo",
"text": "Olá Wegue"
}
}
3 changes: 2 additions & 1 deletion app-starter/static/app-conf-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lang": {
"supported": {
"en": "English",
"de": "Deutsch"
"de": "Deutsch",
"pt": "Portugues"
},
"fallback": "en"
},
Expand Down
3 changes: 2 additions & 1 deletion app-starter/static/app-conf-projected.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"lang": {
"supported": {
"en": "English",
"de": "Deutsch"
"de": "Deutsch",
"pt": "Portugues"
},
"fallback": "en"
},
Expand Down
3 changes: 2 additions & 1 deletion app-starter/static/app-conf-sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lang": {
"supported": {
"en": "English",
"de": "Deutsch"
"de": "Deutsch",
"pt": "Portugues"
},
"fallback": "en"
},
Expand Down
3 changes: 2 additions & 1 deletion app-starter/static/app-conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lang": {
"supported": {
"en": "English",
"de": "Deutsch"
"de": "Deutsch",
"pt": "Portugues"
},
"fallback": "en"
},
Expand Down
104 changes: 104 additions & 0 deletions src/locales/pt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"app": {
"title": "Vue.js / OpenLayers WebGIS",
"browserTitle": "Aplicativo de Demonstração Wegue",
"footerTextLeft": "Desenvolvido por <a href='https://meggsimum.de/wegue/' target='_blank'>Wegue WebGIS</a>",
"footerTextRight": "meggsimum",
"logo": "Logotipo do Aplicativo"
},

"mapLayers": {
"wgu-geolocator-layer": {
"name": "Posição Atual"
},
"wgu-measure-layer": {
"name": "Camada de Medição"
},
"wgu-drag-drop-layer" : {
"name": "Arraste/Descarregue Dados"
}
},

"wgu-toolbar-menu": {
"title": "Abrir menu de barra de ferramentas"
},

"wgu-attributetable": {
"title": "Tabela de Atributos",
"selectorLabel": "Escolha uma camada",
"loadingText": "Carregando... Por favor, mova-se para uma área onde a camada seja visível"
},

"wgu-bglayerswitcher": {
"title": "Alterar mapa de fundo"
},

"wgu-overviewmap": {
"title": "Mostrar mapa de visão geral"
},

"wgu-geocoder": {
"title": "Busca de Endereço",
"placeHolder": "Pesquisar por um endereço"
},

"wgu-geolocator": {
"title": "Geolocalização"
},

"wgu-helpwin": {
"title": "Sobre",
"textTitle": "Sobre Wegue",
"htmlContent": "<b>WebGIS com OpenLayers e Vue.js</b> Modelo e componentes reutilizáveis para aplicações de mapeamento web com OpenLayers e Vue.js",
"infoLinkUrl": "http://wegue.org/",
"infoLinkText": "Mais informações"
},

"wgu-infoclick": {
"title": "Informações de Clique no Mapa",
"mapClick": "Clique no mapa para obter informações sobre a posição clicada.",
"mediaClick": "Clique em um recurso no mapa para mostrar informações de mídia conectadas.",
"mediaInfoLinkText": null
},

"wgu-layerlist": {
"title": "Camadas"
},

"wgu-maprecorder": {
"title": "Gravador de Mapa",
"options": "Opções",
"videoFormat": "Formato de Vídeo",
"frameRate": "Taxa de quadros (frames/s)",
"bitRate": "Taxa de bits (MBits/s)",
"fileName": "Nome do Arquivo",
"start": "Iniciar",
"stop": "Parar",
"error": "Falha ao iniciar a gravação."
},

"wgu-zoomtomaxextent": {
"title": "Redefinir Extensão do Mapa"
},

"wgu-measuretool": {
"title": "Medir",
"distance": "Distância",
"length": "Comprimento",
"area": "Área",
"angle": "Ângulo",
"lengthKm": "{0} km",
"lengthMeter": "{0} m",
"areaSquareKm": "{0} km²",
"areaSquareMeter": "{0} m²"
},

"wgu-localeswitcher": {
"title": "Configurações de Idioma"
},

"wgu-themeswitcher": {
"title": "Modo Escuro"
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const appConfig = {
lang: {
supported: {
en: 'English',
pt: 'Portugues',
de: 'Deutsch'
},
fallback: 'de'
fallback: 'pt'
}
};

Expand Down Expand Up @@ -49,9 +50,10 @@ 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(2);
expect(Object.keys(vm.lang).length).to.eql(3);
expect(vm.lang.en).to.eql('English');
expect(vm.lang.de).to.eql('Deutsch');
expect(vm.lang.pt).to.eql('Portugues');
});

afterEach(() => {
Expand Down
8 changes: 6 additions & 2 deletions tests/unit/specs/util/Locale.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const appConfig = {
lang: {
supported: {
en: 'English',
de: 'Deutsch'
de: 'Deutsch',
pt: 'Portugues'
},
fallback: 'de'
}
Expand All @@ -28,9 +29,10 @@ 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(2);
expect(Object.keys(supported).length).to.eql(3);
expect(supported.en).to.eql('English');
expect(supported.de).to.eql('Deutsch');
expect(supported.pt).to.eql('Portugues');
});

it('getSupportedLanguages returns correct fallback language when lang is unconfigured', () => {
Expand All @@ -54,9 +56,11 @@ describe('LocaleUtil', () => {
const enSupported = LocaleUtil.isLanguageSupported('en', appConfig);
const deSupported = LocaleUtil.isLanguageSupported('de', appConfig);
const frSupported = LocaleUtil.isLanguageSupported('fr', appConfig);
const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig);
expect(enSupported).to.be.true;
expect(deSupported).to.be.true;
expect(frSupported).to.be.false;
expect(ptSupported).to.be.true;
});

it('isLanguageSupported returns correct results when lang is unconfigured', () => {
Expand Down

0 comments on commit 5ddd030

Please sign in to comment.