From 72d5e35669a353c51809a00ad031065dd94161eb Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 6 Jul 2021 13:21:07 +0200 Subject: [PATCH 01/12] Update Development_deployment.md --- Docs/Development_deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Development_deployment.md b/Docs/Development_deployment.md index 7762c7a9f5..013bbd20dc 100644 --- a/Docs/Development_deployment.md +++ b/Docs/Development_deployment.md @@ -25,7 +25,7 @@ 0. Make sure you have a recent version of nodejs - at least 12.0, preferably 15 0. Make a fork and clone the repository. 1. Install `npm`. Linux: `sudo apt install npm` (or your favourite package manager), Windows: install nodeJS: https://nodejs.org/en/download/ -2. Run `npm install` to install the package dependencies +2. Run `npm ci` to install the package dependencies 3. Run `npm run init` and generate some additional dependencies and generated files 4. Run `npm run start` to host a local testversion at http://localhost:1234/index.html 5. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename` or `userlayout=true#` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version. From 4a7bbdab8c8dabb1ae1fb7659ec41f042333e05a Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 6 Jul 2021 13:22:01 +0200 Subject: [PATCH 02/12] Update Development_deployment.md --- Docs/Development_deployment.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Docs/Development_deployment.md b/Docs/Development_deployment.md index 013bbd20dc..21b924b698 100644 --- a/Docs/Development_deployment.md +++ b/Docs/Development_deployment.md @@ -25,8 +25,7 @@ 0. Make sure you have a recent version of nodejs - at least 12.0, preferably 15 0. Make a fork and clone the repository. 1. Install `npm`. Linux: `sudo apt install npm` (or your favourite package manager), Windows: install nodeJS: https://nodejs.org/en/download/ -2. Run `npm ci` to install the package dependencies -3. Run `npm run init` and generate some additional dependencies and generated files +3. Run `npm run init` and generate some additional dependencies and generated files. Note that it'll install the dependencies too 4. Run `npm run start` to host a local testversion at http://localhost:1234/index.html 5. By default, a landing page with available themes is served. In order to load a single theme, use `layout=themename` or `userlayout=true#` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version. From c739fe54244d2dca8949a841840f51b88dfa6cb8 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 6 Jul 2021 14:00:52 +0200 Subject: [PATCH 03/12] Update Development_deployment.md --- Docs/Development_deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Development_deployment.md b/Docs/Development_deployment.md index 21b924b698..ffa69eab3f 100644 --- a/Docs/Development_deployment.md +++ b/Docs/Development_deployment.md @@ -18,7 +18,7 @@ Development ----------- - **Windows users**: All scripts are made for linux devices. Use the Ubuntu terminal for Windows (or even better - make the switch ;) ) + **Windows users**: All scripts are made for linux devices. Use the Ubuntu terminal for Windows (or even better - make the switch ;) ). If you are using Visual Studio, open everything in a 'new WSL Window'. To develop and build MapComplete, yo From 72d29ad0e6202a13d900542ed55d746b44c0603d Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 6 Jul 2021 14:01:29 +0200 Subject: [PATCH 04/12] Remove broken batch file --- run.bat | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 run.bat diff --git a/run.bat b/run.bat deleted file mode 100644 index eb358b2ece..0000000000 --- a/run.bat +++ /dev/null @@ -1,2 +0,0 @@ -npm run start -cmd /k From 07d39d0f3624115b585f66beb50aa51598bcb56d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 6 Jul 2021 15:32:39 +0200 Subject: [PATCH 05/12] Update LayoutConfigJson.ts --- Customizations/JSON/LayoutConfigJson.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Customizations/JSON/LayoutConfigJson.ts b/Customizations/JSON/LayoutConfigJson.ts index 6d079dc94c..ed9d5975e2 100644 --- a/Customizations/JSON/LayoutConfigJson.ts +++ b/Customizations/JSON/LayoutConfigJson.ts @@ -120,7 +120,7 @@ export interface LayoutConfigJson { * * E.g.: if there are two layers defined: * ``` - * "layers"[ + * "layers":[ * {"title": ..., "tagRenderings": [...], "osmSource":{"tags": ...}}, * {"title", ..., "tagRenderings", [...], "osmSource":{"tags" ...}} * ] @@ -132,13 +132,19 @@ export interface LayoutConfigJson { * "osmSource":{"geoJsonSource":"xyz"} * } * then the result will be that all the layers will have these properties applied and result in: - * "layers"[ + * "layers":[ * {"title": ..., "tagRenderings": [...], "osmSource":{"tags": ..., "geoJsonSource":"xyz"}}, * {"title", ..., "tagRenderings", [...], "osmSource":{"tags" ..., "geoJsonSource":"xyz"}} * ] * ``` * - * If the overrideAll contains a list where the keys starts with a plus, the values will be appended (instead of discarding the old list) + * If the overrideAll contains a list where the keys starts with a plus, the values will be appended (instead of discarding the old list), for example + * + * "overrideAll": { + * "+tagRenderings": [ { ... some tagrendering ... }] + * } + * + * In the above scenario, `sometagrendering` will be added at the beginning of the tagrenderings of every layer */ overrideAll?: any; From dc189b98aa1475bf45806f9ebbe59586d7e66f60 Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Tue, 6 Jul 2021 03:15:37 +0000 Subject: [PATCH 06/12] Translated using Weblate (Portuguese (Brazil)) Currently translated at 96.3% (160 of 166 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/pt_BR/ --- langs/pt_BR.json | 87 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/langs/pt_BR.json b/langs/pt_BR.json index 54a94fe778..638ab0d39a 100644 --- a/langs/pt_BR.json +++ b/langs/pt_BR.json @@ -23,7 +23,12 @@ }, "general": { "questions": { - "phoneNumberOf": "Qual é o número de telefone de {category}?" + "phoneNumberOf": "Qual é o número de telefone de {category}?", + "emailIs": "O endereço de e-mail deste {category} é {email}", + "emailOf": "Qual é o endereço de e-mail de {category}?", + "websiteIs": "Site: {website}", + "websiteOf": "Qual é o site de {category}?", + "phoneNumberIs": "O número de telefone deste {category} é {phone}" }, "noNameCategory": "{category} sem nome", "nameInlineQuestion": "O nome desta {category} é $$$", @@ -57,12 +62,90 @@ }, "loginToStart": "Faça login para responder a esta pergunta", "welcomeBack": "Você está logado, seja bem-vindo de volta!", - "loginWithOpenStreetMap": "Entrar com OpenStreetMap" + "loginWithOpenStreetMap": "Entrar com OpenStreetMap", + "opening_hours": { + "ph_open": "aberto", + "ph_closed": "fechado", + "ph_not_known": " ", + "open_24_7": "Aberto 24 horas por dia", + "closed_permanently": "Fechado por tempo desconhecido", + "closed_until": "Fechado até {date}", + "not_all_rules_parsed": "O horário de funcionamento desta loja é complicado. As seguintes regras são ignoradas na entrada:", + "openTill": "até", + "opensAt": "desde", + "open_during_ph": "Durante um feriado, esse serviço está", + "error_loading": "Erro: não foi possível visualizar este horário de funcionamento." + }, + "weekdays": { + "sunday": "Domingo", + "saturday": "Sábado", + "friday": "Sexta", + "thursday": "Quinta", + "wednesday": "Quanta", + "tuesday": "Terça", + "monday": "Segunda", + "abbreviations": { + "sunday": "Dom", + "saturday": "Sab", + "friday": "Sex", + "thursday": "Qui", + "wednesday": "Qua", + "tuesday": "Ter", + "monday": "Seg" + } + }, + "layerSelection": { + "title": "Selecionar camadas", + "zoomInToSeeThisLayer": "Amplie para ver esta camada" + }, + "backgroundMap": "Mapa de fundo", + "customThemeIntro": "

Temas personalizados

Esses são temas gerados pelo usuário visitados anteriormente.", + "noTagsSelected": "Nenhuma tag selecionada", + "getStartedNewAccount": " ou crie uma nova conta", + "getStartedLogin": "Entrar com OpenStreetMap para começar", + "goToInbox": "Abrir mensagens", + "fewChangesBefore": "Por favor, responda algumas perguntas de pontos existentes antes de adicionar um novo ponto.", + "readYourMessages": "Por favor, leia todas as suas mensagens do OpenStreetMap antes de adicionar um novo ponto.", + "sharescreen": { + "fsIncludeCurrentLocation": "Incluir localização atual", + "fsIncludeCurrentLayers": "Incluir as opções de camada atuais", + "fsIncludeCurrentBackgroundMap": "Incluir a escolha de fundo atual {name}", + "fsGeolocation": "Ative o botão 'localizar-me geograficamente' (apenas para celular)", + "fsAddNew": "Habilite o botão 'adicionar novo POI'", + "fsLayerControlToggle": "Iniciar com o controle de camada expandido", + "fsLayers": "Ativar o controle de camada", + "fsWelcomeMessage": "Mostra o pop-up da mensagem de boas-vindas e as guias associadas", + "fsSearch": "Ativar a barra de pesquisa", + "fsUserbadge": "Habilite o botão de login", + "editThemeDescription": "Adicione ou altere perguntas a este tema do mapa", + "editThisTheme": "Editar neste tema", + "thanksForSharing": "Obrigado por compartilhar!", + "copiedToClipboard": "Link copiado para a área de transferência", + "addToHomeScreen": "

Adicionar à sua tela inicial

Você pode adicionar facilmente este site à tela inicial do smartphone para uma sensação nativa. Clique no botão 'adicionar à tela inicial' na barra de URL para fazer isso.", + "intro": "

Compartilhe este mapa

Compartilhe este mapa copiando o link abaixo e enviando-o para amigos e familiares:" + } }, "index": { "pickTheme": "Escolha um tema abaixo para começar.", "intro": "MapComplete é um visualizador e editor do OpenStreetMap, que mostra informações sobre um tema específico.", "title": "Bem-vindo(a) ao MapComplete", "#": "Estes textos são mostrados acima dos botões do tema quando nenhum tema é carregado" + }, + "reviews": { + "plz_login": "Entrar para deixar um comentário", + "saved": "Comentário salvo. Obrigado por compartilhar!", + "saving_review": "Salvando…", + "i_am_affiliated": "Eu sou afiliado a este objeto

Verifique se você é proprietário, criador, funcionário, …
", + "posting_as": "Postando como", + "no_rating": "Nenhuma classificação dada", + "write_a_comment": "Deixe um comentário…", + "no_reviews_yet": "Não há comentários ainda. Seja o primeiro a escrever um e ajude a abrir os dados e os negócios!", + "name_required": "É necessário um nome para exibir e criar comentários", + "title_singular": "Um comentário", + "title": "{count} comentários" + }, + "favourite": { + "reload": "Recarregar dados", + "panelIntro": "

Seu tema pessoal

Ative suas camadas favoritas de todos os temas oficiais" } } From 7cebdb311ad663233658e0cf2b6c1302de27a921 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 6 Jul 2021 12:56:42 +0000 Subject: [PATCH 07/12] Translated using Weblate (Russian) Currently translated at 99.3% (165 of 166 strings) Translation: MapComplete/Core Translate-URL: https://hosted.weblate.org/projects/mapcomplete/core/ru/ --- langs/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langs/ru.json b/langs/ru.json index 003a940d86..6d24b6ec49 100644 --- a/langs/ru.json +++ b/langs/ru.json @@ -40,7 +40,7 @@ }, "loginToStart": "Войдите, чтобы ответить на этот вопрос", "welcomeBack": "Вы вошли, с возвращением!", - "loginWithOpenStreetMap": "Войти с OpenStreetMap", + "loginWithOpenStreetMap": "Войти с помощью OpenStreetMap", "opening_hours": { "ph_not_known": " ", "ph_open": "открыта", @@ -81,7 +81,7 @@ "customThemeIntro": "

Пользовательские темы

Это ранее просмотренные темы, созданные пользователями.", "noTagsSelected": "Теги не выбраны", "getStartedNewAccount": " или создать новую учетную запись", - "getStartedLogin": "Войти с OpenStreetMap, чтобы начать работу", + "getStartedLogin": "Войти с помощью OpenStreetMap, чтобы начать работу", "goToInbox": "Открыть входящие сообщения", "fewChangesBefore": "Пожалуйста, ответьте на несколько вопросов о существующих точках, прежде чем добавить новую точку.", "readYourMessages": "Пожалуйста, прочитайте все ваши сообщения на сайте OpenStreetMap перед тем как добавлять новую точку.", From 411d432662bb355962a5bbc6faa5a0c699badc89 Mon Sep 17 00:00:00 2001 From: Eduardo Addad de Oliveira Date: Tue, 6 Jul 2021 03:24:09 +0000 Subject: [PATCH 08/12] Translated using Weblate (Portuguese (Brazil)) Currently translated at 7.3% (41 of 557 strings) Translation: MapComplete/Layer translations Translate-URL: https://hosted.weblate.org/projects/mapcomplete/layer-translations/pt_BR/ --- langs/layers/pt_BR.json | 144 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) diff --git a/langs/layers/pt_BR.json b/langs/layers/pt_BR.json index 0967ef424b..81011c1805 100644 --- a/langs/layers/pt_BR.json +++ b/langs/layers/pt_BR.json @@ -1 +1,143 @@ -{} +{ + "bicycle_tube_vending_machine": { + "tagRenderings": { + "1": { + "mappings": { + "2": { + "then": "Esta máquina de venda automática está fechada" + }, + "1": { + "then": "Esta máquina de venda automática está quebrada" + }, + "0": { + "then": "Esta máquina de venda automática funciona" + } + }, + "question": "Esta máquina de venda automática ainda está operacional?" + } + }, + "presets": { + "0": { + "title": "Máquina de venda automática de tubos de bicicleta" + } + }, + "title": { + "render": "Máquina de venda automática de tubos de bicicleta" + }, + "name": "Máquina de venda automática de tubos de bicicleta" + }, + "bicycle_library": { + "tagRenderings": { + "7": { + "mappings": { + "2": { + "then": "Bicicletas para deficientes físicos disponíveis" + }, + "1": { + "then": "Bicicletas para adulto disponíveis" + }, + "0": { + "then": "Bicicletas para crianças disponíveis" + } + }, + "question": "Quem pode emprestar bicicletas aqui?" + }, + "6": { + "mappings": { + "0": { + "then": "Emprestar uma bicicleta é grátis" + } + }, + "render": "Custos de empréstimo de bicicleta {charge}", + "question": "Quanto custa um empréstimo de bicicleta?" + } + }, + "description": "Uma instalação onde as bicicletas podem ser emprestadas por períodos mais longos" + }, + "bench_at_pt": { + "tagRenderings": { + "1": { + "render": "{name}" + } + }, + "title": { + "mappings": { + "1": { + "then": "Banco em abrigo" + }, + "0": { + "then": "Banco em ponto de transporte público" + } + }, + "render": "Banco" + }, + "name": "Bancos em pontos de transporte público" + }, + "bench": { + "presets": { + "0": { + "description": "Adicionar um novo banco", + "title": "Banco" + } + }, + "tagRenderings": { + "6": { + "render": "Esta bancada foi pesquisada pela última vez em {survey:date}", + "question": "Quando esta bancada foi pesquisada pela última vez?" + }, + "5": { + "mappings": { + "7": { + "then": "Cor: amarelo" + }, + "6": { + "then": "Cor: azul" + }, + "5": { + "then": "Cor: preto" + }, + "4": { + "then": "Cor: vermelho" + }, + "3": { + "then": "Cor: branco" + }, + "2": { + "then": "Cor: cinza" + }, + "1": { + "then": "Cor: verde" + }, + "0": { + "then": "Cor: marrom" + } + }, + "question": "Qual a cor dessa bancada?", + "render": "Cor: {colour}" + }, + "4": { + "question": "Em que direção você olha quando está sentado no banco?" + }, + "3": { + "question": "De que é feito o banco (assento)?", + "mappings": { + "5": { + "then": "Material: aço" + }, + "4": { + "then": "Material: plástico" + }, + "3": { + "then": "Material: concreto" + }, + "2": { + "then": "Material: pedra" + }, + "0": { + "then": "Material: madeira" + } + } + } + } + } +} From fe747dbfb4c054f84eec3d3057f9bb5f6de47dbe Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 6 Jul 2021 17:23:22 +0200 Subject: [PATCH 09/12] Duplicate elements in layerselection to fix dissapearing elements --- Models/Constants.ts | 2 +- UI/BigComponents/LayerSelection.ts | 29 +++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Models/Constants.ts b/Models/Constants.ts index 0a048b1380..f4fc0ba69a 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.8.3"; + public static vNumber = "0.8.3a"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/UI/BigComponents/LayerSelection.ts b/UI/BigComponents/LayerSelection.ts index bb82a18a5c..e282947096 100644 --- a/UI/BigComponents/LayerSelection.ts +++ b/UI/BigComponents/LayerSelection.ts @@ -6,6 +6,7 @@ import Combine from "../Base/Combine"; import Translations from "../i18n/Translations"; import LayerConfig from "../../Customizations/JSON/LayerConfig"; import BaseUIElement from "../BaseUIElement"; +import {Translation} from "../i18n/Translation"; /** * Shows the panel with all layers and a toggle for each of them @@ -29,18 +30,21 @@ export default class LayerSelection extends Combine { const leafletStyle = layer.layerDef.GenerateLeafletStyle( new UIEventSource({id: "node/-1"}), false) + const leafletStyleNa = layer.layerDef.GenerateLeafletStyle( + new UIEventSource({id: "node/-1"}), + false) const icon = new Combine([leafletStyle.icon.html]).SetClass("single-layer-selection-toggle") - let iconUnselected: BaseUIElement = new Combine([leafletStyle.icon.html]) + let iconUnselected: BaseUIElement = new Combine([leafletStyleNa.icon.html]) .SetClass("single-layer-selection-toggle") .SetStyle("opacity:0.2;"); - const name = Translations.WT(layer.layerDef.name)?.Clone() - ?.SetStyle("font-size:large;margin-left: 0.5em;"); - - if ((name ?? "") === "") { - continue + if (layer.layerDef.name === undefined) { + continue; } + const name: Translation = Translations.WT(layer.layerDef.name)?.Clone() + name.SetStyle("font-size:large;margin-left: 0.5em;"); + const zoomStatus = new VariableUiElement(State.state.locationControl.map(location => { if (location.zoom < layer.layerDef.minzoom) { return Translations.t.general.layerSelection.zoomInToSeeThisLayer.Clone() @@ -49,12 +53,21 @@ export default class LayerSelection extends Combine { } return "" })) + const zoomStatusNonActive = new VariableUiElement(State.state.locationControl.map(location => { + if (location.zoom < layer.layerDef.minzoom) { + return Translations.t.general.layerSelection.zoomInToSeeThisLayer.Clone() + .SetClass("alert") + .SetStyle("display: block ruby;width:min-content;") + } + return "" + })) + const style = "display:flex;align-items:center;" const styleWhole = "display:flex; flex-wrap: wrap" checkboxes.push(new Toggle( - new Combine([new Combine([icon, name]).SetStyle(style), zoomStatus]) + new Combine([new Combine([icon, name.Clone()]).SetStyle(style), zoomStatus]) .SetStyle(styleWhole), - new Combine([new Combine([iconUnselected, "", name, ""]).SetStyle(style), zoomStatus]) + new Combine([new Combine([iconUnselected, "", name.Clone(), ""]).SetStyle(style), zoomStatusNonActive]) .SetStyle(styleWhole), layer.isDisplayed).ToggleOnClick() .SetStyle("margin:0.3em;") From caacb6a3ef0e5fa6cc0bc1c6759de0d6016c33b5 Mon Sep 17 00:00:00 2001 From: karelleketers Date: Wed, 7 Jul 2021 18:07:29 +0200 Subject: [PATCH 10/12] Added builtin for multiple layers --- Customizations/JSON/LayoutConfig.ts | 89 ++++++++++++++++--------- Customizations/JSON/LayoutConfigJson.ts | 17 ++++- 2 files changed, 72 insertions(+), 34 deletions(-) diff --git a/Customizations/JSON/LayoutConfig.ts b/Customizations/JSON/LayoutConfig.ts index 2ea37e3809..83e6a7d975 100644 --- a/Customizations/JSON/LayoutConfig.ts +++ b/Customizations/JSON/LayoutConfig.ts @@ -94,39 +94,7 @@ export default class LayoutConfig { } ); this.defaultBackgroundId = json.defaultBackgroundId; - this.layers = json.layers.map((layer, i) => { - if (typeof layer === "string") { - if (AllKnownLayers.sharedLayersJson[layer] !== undefined) { - if (json.overrideAll !== undefined) { - let lyr = JSON.parse(JSON.stringify(AllKnownLayers.sharedLayersJson[layer])); - return new LayerConfig(Utils.Merge(json.overrideAll, lyr), this.units, `${this.id}+overrideAll.layers[${i}]`, official); - } else { - return AllKnownLayers.sharedLayers[layer] - } - } else { - throw "Unkown fixed layer " + layer; - } - } - // @ts-ignore - if (layer.builtin !== undefined) { - // @ts-ignore - const name = layer.builtin; - const shared = AllKnownLayers.sharedLayersJson[name]; - if (shared === undefined) { - throw "Unkown fixed layer " + name; - } - // @ts-ignore - layer = Utils.Merge(layer.override, JSON.parse(JSON.stringify(shared))); // We make a deep copy of the shared layer, in order to protect it from changes - - - } - if (json.overrideAll !== undefined) { - layer = Utils.Merge(json.overrideAll, layer); - } - - // @ts-ignore - return new LayerConfig(layer, this.units, `${this.id}.layers[${i}]`, official) - }); + this.layers = LayoutConfig.ExtractLayers(json, context, this.units, official); // ALl the layers are constructed, let them share tags in now! const roaming: { r, source: LayerConfig }[] = [] @@ -190,6 +158,61 @@ export default class LayoutConfig { } + private static ExtractLayers(json: LayoutConfigJson, context: string, units: Unit[], official: boolean): LayerConfig[] { + const result: LayerConfig[] = [] + + json.layers.forEach((layer, i) => { + if (typeof layer === "string") { + if (AllKnownLayers.sharedLayersJson[layer] !== undefined) { + if (json.overrideAll !== undefined) { + let lyr = JSON.parse(JSON.stringify(AllKnownLayers.sharedLayersJson[layer])); + const newLayer = new LayerConfig(Utils.Merge(json.overrideAll, lyr), units, `${json.id}+overrideAll.layers[${i}]`, official) + result.push(newLayer) + return + } else { + result.push(AllKnownLayers.sharedLayers[layer]) + return + } + } else { + throw "Unknown fixed layer " + layer; + } + } + + if (layer["builtin"] === undefined) { + if (json.overrideAll !== undefined) { + layer = Utils.Merge(json.overrideAll, layer); + } + // @ts-ignore + const newLayer = new LayerConfig(layer, units, `${json.id}.layers[${i}]`, official) + result.push(newLayer) + return + } + // @ts-ignore + let names = layer.builtin; + if (typeof names === "string") { + names = [names] + } + names.forEach(name => { + const shared = AllKnownLayers.sharedLayersJson[name]; + if (shared === undefined) { + throw "Unknown fixed layer " + name; + } + // @ts-ignore + let newLayer: LayerConfigJson = Utils.Merge(layer.override, JSON.parse(JSON.stringify(shared))); // We make a deep copy of the shared layer, in order to protect it from changes + if (json.overrideAll !== undefined) { + newLayer = Utils.Merge(json.overrideAll, newLayer); + } + // @ts-ignore + const layerConfig = new LayerConfig(newLayer, units, `${json.id}.layers[${i}]`, official) + result.push(layerConfig) + return + }) + + }); + + return result + } + private static ExtractUnits(json: LayoutConfigJson, context: string): Unit[] { const result: Unit[] = [] if ((json.units ?? []).length !== 0) { diff --git a/Customizations/JSON/LayoutConfigJson.ts b/Customizations/JSON/LayoutConfigJson.ts index ed9d5975e2..0fc29eaf05 100644 --- a/Customizations/JSON/LayoutConfigJson.ts +++ b/Customizations/JSON/LayoutConfigJson.ts @@ -189,9 +189,24 @@ export interface LayoutConfigJson { * * Note that builtin layers can be reused. Either put in the name of the layer to reuse, or use {builtin: "layername", override: ...} * The 'override'-object will be copied over the original values of the layer, which allows to change certain aspects of the layer + * ex: If you would like to use layer nature reserves, but only from a specific operator (eg. Natuurpunt) you would use the following in your theme: + * layer: { + * "builtin": "nature_reserve", + * "override": {"source": + * {"osmTags": { + * "+and":["operator=Natuurpunt"] + * } + * } + * } + * }; + *It's also possible to load multiple layers at once, for example, if you would like for both drinking water and benches to start the zoomlevel at 12, you would use the following: + layer: { + * "builtin": ["benches", "drinking_water"], + * "override": {"minzoom": 12} + * } * */ - layers: (LayerConfigJson | string | { builtin: string, override: any })[], + layers: (LayerConfigJson | string | { builtin: string | string[], override: any })[], /** * In some cases, a value is represented in a certain unit (such as meters for heigt/distance/..., km/h for speed, ...) From 37d7040cffe37e18e8c85100bef9973e1dc7ba84 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 7 Jul 2021 18:12:07 +0200 Subject: [PATCH 11/12] Formatting --- Customizations/JSON/LayoutConfig.ts | 38 ++++++++++++------------- Customizations/JSON/LayoutConfigJson.ts | 24 ++++++++++------ 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/Customizations/JSON/LayoutConfig.ts b/Customizations/JSON/LayoutConfig.ts index 83e6a7d975..12b9d5f766 100644 --- a/Customizations/JSON/LayoutConfig.ts +++ b/Customizations/JSON/LayoutConfig.ts @@ -94,7 +94,7 @@ export default class LayoutConfig { } ); this.defaultBackgroundId = json.defaultBackgroundId; - this.layers = LayoutConfig.ExtractLayers(json, context, this.units, official); + this.layers = LayoutConfig.ExtractLayers(json, this.units, official); // ALl the layers are constructed, let them share tags in now! const roaming: { r, source: LayerConfig }[] = [] @@ -158,7 +158,7 @@ export default class LayoutConfig { } - private static ExtractLayers(json: LayoutConfigJson, context: string, units: Unit[], official: boolean): LayerConfig[] { + private static ExtractLayers(json: LayoutConfigJson, units: Unit[], official: boolean): LayerConfig[] { const result: LayerConfig[] = [] json.layers.forEach((layer, i) => { @@ -168,16 +168,16 @@ export default class LayoutConfig { let lyr = JSON.parse(JSON.stringify(AllKnownLayers.sharedLayersJson[layer])); const newLayer = new LayerConfig(Utils.Merge(json.overrideAll, lyr), units, `${json.id}+overrideAll.layers[${i}]`, official) result.push(newLayer) - return + return } else { result.push(AllKnownLayers.sharedLayers[layer]) - return + return } } else { throw "Unknown fixed layer " + layer; } } - + if (layer["builtin"] === undefined) { if (json.overrideAll !== undefined) { layer = Utils.Merge(json.overrideAll, layer); @@ -185,7 +185,7 @@ export default class LayoutConfig { // @ts-ignore const newLayer = new LayerConfig(layer, units, `${json.id}.layers[${i}]`, official) result.push(newLayer) - return + return } // @ts-ignore let names = layer.builtin; @@ -194,19 +194,19 @@ export default class LayoutConfig { } names.forEach(name => { const shared = AllKnownLayers.sharedLayersJson[name]; - if (shared === undefined) { - throw "Unknown fixed layer " + name; - } - // @ts-ignore - let newLayer: LayerConfigJson = Utils.Merge(layer.override, JSON.parse(JSON.stringify(shared))); // We make a deep copy of the shared layer, in order to protect it from changes - if (json.overrideAll !== undefined) { - newLayer = Utils.Merge(json.overrideAll, newLayer); - } - // @ts-ignore - const layerConfig = new LayerConfig(newLayer, units, `${json.id}.layers[${i}]`, official) - result.push(layerConfig) - return - }) + if (shared === undefined) { + throw "Unknown fixed layer " + name; + } + // @ts-ignore + let newLayer: LayerConfigJson = Utils.Merge(layer.override, JSON.parse(JSON.stringify(shared))); // We make a deep copy of the shared layer, in order to protect it from changes + if (json.overrideAll !== undefined) { + newLayer = Utils.Merge(json.overrideAll, newLayer); + } + // @ts-ignore + const layerConfig = new LayerConfig(newLayer, units, `${json.id}.layers[${i}]`, official) + result.push(layerConfig) + return + }) }); diff --git a/Customizations/JSON/LayoutConfigJson.ts b/Customizations/JSON/LayoutConfigJson.ts index 0fc29eaf05..8ced24bd7e 100644 --- a/Customizations/JSON/LayoutConfigJson.ts +++ b/Customizations/JSON/LayoutConfigJson.ts @@ -143,7 +143,7 @@ export interface LayoutConfigJson { * "overrideAll": { * "+tagRenderings": [ { ... some tagrendering ... }] * } - * + * * In the above scenario, `sometagrendering` will be added at the beginning of the tagrenderings of every layer */ overrideAll?: any; @@ -188,9 +188,13 @@ export interface LayoutConfigJson { * *layers can also remove 'leftover'-features if the leftovers overlap with a feature in the layer itself * * Note that builtin layers can be reused. Either put in the name of the layer to reuse, or use {builtin: "layername", override: ...} + * * The 'override'-object will be copied over the original values of the layer, which allows to change certain aspects of the layer - * ex: If you would like to use layer nature reserves, but only from a specific operator (eg. Natuurpunt) you would use the following in your theme: - * layer: { + * + * For example: If you would like to use layer nature reserves, but only from a specific operator (eg. Natuurpunt) you would use the following in your theme: + * + * ``` + * "layer": { * "builtin": "nature_reserve", * "override": {"source": * {"osmTags": { @@ -198,13 +202,17 @@ export interface LayoutConfigJson { * } * } * } - * }; - *It's also possible to load multiple layers at once, for example, if you would like for both drinking water and benches to start the zoomlevel at 12, you would use the following: - layer: { + * } + * ``` + * + * It's also possible to load multiple layers at once, for example, if you would like for both drinking water and benches to start at the zoomlevel at 12, you would use the following: + * + * ``` + * "layer": { * "builtin": ["benches", "drinking_water"], * "override": {"minzoom": 12} * } - * + *``` */ layers: (LayerConfigJson | string | { builtin: string | string[], override: any })[], @@ -262,7 +270,7 @@ export interface LayoutConfigJson { * Also, if a freeform text field is used, an extra dropdown with applicable denominations will be given * */ - + units?: { /** From 844df1652463407c70b68736400762babacdac3d Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 7 Jul 2021 18:19:12 +0200 Subject: [PATCH 12/12] Translation sync --- assets/layers/bench/bench.json | 63 +++-- assets/layers/bench_at_pt/bench_at_pt.json | 15 +- .../bicycle_library/bicycle_library.json | 24 +- .../bicycle_tube_vending_machine.json | 21 +- .../public_bookcase/public_bookcase.json | 10 +- langs/layers/pt_BR.json | 236 +++++++++--------- 6 files changed, 206 insertions(+), 163 deletions(-) diff --git a/assets/layers/bench/bench.json b/assets/layers/bench/bench.json index e42fab4db0..2ba7c03581 100644 --- a/assets/layers/bench/bench.json +++ b/assets/layers/bench/bench.json @@ -169,7 +169,8 @@ "ru": "Материал: дерево", "zh_Hans": "材质:木", "nb_NO": "Materiale: tre", - "zh_Hant": "材質:木頭" + "zh_Hant": "材質:木頭", + "pt_BR": "Material: madeira" } }, { @@ -201,7 +202,8 @@ "ru": "Материал: камень", "zh_Hans": "材质:石头", "nb_NO": "Materiale: stein", - "zh_Hant": "材質:石頭" + "zh_Hant": "材質:石頭", + "pt_BR": "Material: pedra" } }, { @@ -217,7 +219,8 @@ "ru": "Материал: бетон", "zh_Hans": "材质:混凝土", "nb_NO": "Materiale: betong", - "zh_Hant": "材質:水泥" + "zh_Hant": "材質:水泥", + "pt_BR": "Material: concreto" } }, { @@ -233,7 +236,8 @@ "ru": "Материал: пластик", "zh_Hans": "材质:塑料", "nb_NO": "Materiale: plastikk", - "zh_Hant": "材質:塑膠" + "zh_Hant": "材質:塑膠", + "pt_BR": "Material: plástico" } }, { @@ -249,7 +253,8 @@ "ru": "Материал: сталь", "zh_Hans": "材质:不锈钢", "nb_NO": "Materiale: stål", - "zh_Hant": "材質:鋼鐵" + "zh_Hant": "材質:鋼鐵", + "pt_BR": "Material: aço" } } ], @@ -262,7 +267,8 @@ "it": "Di che materiale è fatta questa panchina?", "zh_Hans": "这个长椅(或座椅)是用什么材料做的?", "ru": "Из какого материала сделана скамейка?", - "zh_Hant": "這個長椅 (座位) 是什麼做的?" + "zh_Hant": "這個長椅 (座位) 是什麼做的?", + "pt_BR": "De que é feito o banco (assento)?" } }, { @@ -275,7 +281,8 @@ "it": "In che direzione si guarda quando si è seduti su questa panchina?", "ru": "В каком направлении вы смотрите, когда сидите на скамейке?", "zh_Hans": "坐在长椅上的时候你目视的方向是哪边?", - "zh_Hant": "坐在長椅時是面對那個方向?" + "zh_Hant": "坐在長椅時是面對那個方向?", + "pt_BR": "Em que direção você olha quando está sentado no banco?" }, "render": { "en": "When sitting on the bench, one looks towards {direction}°.", @@ -305,7 +312,8 @@ "id": "Warna: {colour}", "zh_Hans": "颜色: {colour}", "zh_Hant": "顏色:{colour}", - "nb_NO": "Farge: {colour}" + "nb_NO": "Farge: {colour}", + "pt_BR": "Cor: {colour}" }, "question": { "en": "Which colour does this bench have?", @@ -316,7 +324,8 @@ "it": "Di che colore è questa panchina?", "ru": "Какого цвета скамейка?", "zh_Hans": "这个长椅是什么颜色的?", - "zh_Hant": "這個長椅是什麼顏色的?" + "zh_Hant": "這個長椅是什麼顏色的?", + "pt_BR": "Qual a cor dessa bancada?" }, "freeform": { "key": "colour", @@ -335,7 +344,8 @@ "ru": "Цвет: коричневый", "zh_Hans": "颜色:棕", "zh_Hant": "顏色:棕色", - "nb_NO": "Farge: brun" + "nb_NO": "Farge: brun", + "pt_BR": "Cor: marrom" } }, { @@ -350,7 +360,8 @@ "ru": "Цвет: зеленый", "zh_Hans": "颜色:绿", "zh_Hant": "顏色:綠色", - "nb_NO": "Farge: grønn" + "nb_NO": "Farge: grønn", + "pt_BR": "Cor: verde" } }, { @@ -365,7 +376,8 @@ "ru": "Цвет: серый", "zh_Hans": "颜色:灰", "zh_Hant": "顏色:灰色", - "nb_NO": "Farge: grå" + "nb_NO": "Farge: grå", + "pt_BR": "Cor: cinza" } }, { @@ -380,7 +392,8 @@ "ru": "Цвет: белый", "zh_Hans": "颜色:白", "zh_Hant": "顏色:白色", - "nb_NO": "Farge: hvit" + "nb_NO": "Farge: hvit", + "pt_BR": "Cor: branco" } }, { @@ -395,7 +408,8 @@ "ru": "Цвет: красный", "zh_Hans": "颜色:红", "zh_Hant": "顏色:紅色", - "nb_NO": "Farge: rød" + "nb_NO": "Farge: rød", + "pt_BR": "Cor: vermelho" } }, { @@ -410,7 +424,8 @@ "ru": "Цвет: чёрный", "zh_Hans": "颜色:黑", "zh_Hant": "顏色:黑色", - "nb_NO": "Farge: svart" + "nb_NO": "Farge: svart", + "pt_BR": "Cor: preto" } }, { @@ -425,7 +440,8 @@ "ru": "Цвет: синий", "zh_Hans": "颜色:蓝", "zh_Hant": "顏色:藍色", - "nb_NO": "Farge: blå" + "nb_NO": "Farge: blå", + "pt_BR": "Cor: azul" } }, { @@ -440,7 +456,8 @@ "ru": "Цвет: желтый", "zh_Hans": "颜色:黄", "zh_Hant": "顏色:黃色", - "nb_NO": "Farge: gul" + "nb_NO": "Farge: gul", + "pt_BR": "Cor: amarelo" } } ] @@ -454,7 +471,8 @@ "zh_Hans": "上次对这个长椅实地调查是什么时候?", "de": "Wann wurde diese Bank zuletzt überprüft?", "ru": "Когда последний раз обследовали эту скамейку?", - "zh_Hant": "上一次探察長椅是什麼時候?" + "zh_Hant": "上一次探察長椅是什麼時候?", + "pt_BR": "Quando esta bancada foi pesquisada pela última vez?" }, "render": { "en": "This bench was last surveyed on {survey:date}", @@ -464,7 +482,8 @@ "zh_Hans": "这个长椅于 {survey:date}最后一次实地调查", "de": "Diese Bank wurde zuletzt überprüft am {survey:date}", "ru": "Последний раз обследование этой скамейки проводилось {survey:date}", - "zh_Hant": "這個長椅最後是在 {survey:date} 探查的" + "zh_Hant": "這個長椅最後是在 {survey:date} 探查的", + "pt_BR": "Esta bancada foi pesquisada pela última vez em {survey:date}" }, "freeform": { "key": "survey:date", @@ -508,7 +527,8 @@ "id": "Bangku", "zh_Hans": "长椅", "nb_NO": "Benk", - "zh_Hant": "長椅" + "zh_Hant": "長椅", + "pt_BR": "Banco" }, "description": { "en": "Add a new bench", @@ -521,7 +541,8 @@ "ru": "Добавить новую скамейку", "zh_Hans": "增加一个新的长椅", "nb_NO": "Legg til en ny benk", - "zh_Hant": "新增長椅" + "zh_Hant": "新增長椅", + "pt_BR": "Adicionar um novo banco" } } ] diff --git a/assets/layers/bench_at_pt/bench_at_pt.json b/assets/layers/bench_at_pt/bench_at_pt.json index e09b54e584..85cadb86ec 100644 --- a/assets/layers/bench_at_pt/bench_at_pt.json +++ b/assets/layers/bench_at_pt/bench_at_pt.json @@ -11,7 +11,8 @@ "ru": "Скамейки на остановках общественного транспорта", "zh_Hans": "在公交站点的长椅", "nb_NO": "Benker", - "zh_Hant": "大眾運輸站點的長椅" + "zh_Hant": "大眾運輸站點的長椅", + "pt_BR": "Bancos em pontos de transporte público" }, "minzoom": 14, "source": { @@ -35,7 +36,8 @@ "id": "Bangku", "zh_Hans": "长椅", "nb_NO": "Benk", - "zh_Hant": "長椅" + "zh_Hant": "長椅", + "pt_BR": "Banco" }, "mappings": [ { @@ -55,7 +57,8 @@ "it": "Panchina alla fermata del trasporto pubblico", "ru": "Скамейка на остановке общественного транспорта", "zh_Hans": "在公交站点的长椅", - "zh_Hant": "大眾運輸站點的長椅" + "zh_Hant": "大眾運輸站點的長椅", + "pt_BR": "Banco em ponto de transporte público" } }, { @@ -73,7 +76,8 @@ "it": "Panchina in un riparo", "zh_Hans": "在庇护所的长椅", "ru": "Скамейка в укрытии", - "zh_Hant": "涼亭內的長椅" + "zh_Hant": "涼亭內的長椅", + "pt_BR": "Banco em abrigo" } } ] @@ -91,7 +95,8 @@ "ru": "{name}", "id": "{name}", "zh_Hans": "{name}", - "zh_Hant": "{name}" + "zh_Hant": "{name}", + "pt_BR": "{name}" }, "freeform": { "key": "name" diff --git a/assets/layers/bicycle_library/bicycle_library.json b/assets/layers/bicycle_library/bicycle_library.json index 11decbc12a..cb6cb2f2e1 100644 --- a/assets/layers/bicycle_library/bicycle_library.json +++ b/assets/layers/bicycle_library/bicycle_library.json @@ -48,7 +48,8 @@ "it": "Una struttura dove le biciclette possono essere prestate per periodi di tempo più lunghi", "de": "Eine Einrichtung, in der Fahrräder für längere Zeit geliehen werden können", "ru": "Учреждение, где велосипед может быть арендован на более длительный срок", - "zh_Hant": "能夠長期租用單車的設施" + "zh_Hant": "能夠長期租用單車的設施", + "pt_BR": "Uma instalação onde as bicicletas podem ser emprestadas por períodos mais longos" }, "tagRenderings": [ "images", @@ -89,7 +90,8 @@ "ru": "Сколько стоит прокат велосипеда?", "de": "Wie viel kostet das Ausleihen eines Fahrrads?", "nb_NO": "Hvor mye koster det å leie en sykkel?", - "zh_Hant": "租用單車的費用多少?" + "zh_Hant": "租用單車的費用多少?", + "pt_BR": "Quanto custa um empréstimo de bicicleta?" }, "render": { "en": "Lending a bicycle costs {charge}", @@ -100,7 +102,8 @@ "ru": "Стоимость аренды велосипеда {charge}", "de": "Das Ausleihen eines Fahrrads kostet {charge}", "nb_NO": "Sykkelleie koster {charge}", - "zh_Hant": "租借單車需要 {charge}" + "zh_Hant": "租借單車需要 {charge}", + "pt_BR": "Custos de empréstimo de bicicleta {charge}" }, "freeform": { "key": "charge", @@ -125,7 +128,8 @@ "de": "Das Ausleihen eines Fahrrads ist kostenlos", "ru": "Прокат велосипедов бесплатен", "nb_NO": "Det er gratis å leie en sykkel", - "zh_Hant": "租借單車免費" + "zh_Hant": "租借單車免費", + "pt_BR": "Emprestar uma bicicleta é grátis" } }, { @@ -156,7 +160,8 @@ "zh_Hans": "谁可以从这里借自行车?", "de": "Wer kann hier Fahrräder ausleihen?", "ru": "Кто здесь может арендовать велосипед?", - "zh_Hant": "誰可以在這裡租單車?" + "zh_Hant": "誰可以在這裡租單車?", + "pt_BR": "Quem pode emprestar bicicletas aqui?" }, "multiAnswer": true, "mappings": [ @@ -170,7 +175,8 @@ "it": "Sono disponibili biciclette per bambini", "de": "Fahrräder für Kinder verfügbar", "ru": "Доступны детские велосипеды", - "zh_Hant": "提供兒童單車" + "zh_Hant": "提供兒童單車", + "pt_BR": "Bicicletas para crianças disponíveis" } }, { @@ -182,7 +188,8 @@ "it": "Sono disponibili biciclette per adulti", "de": "Fahrräder für Erwachsene verfügbar", "ru": "Доступны велосипеды для взрослых", - "zh_Hant": "有提供成人單車" + "zh_Hant": "有提供成人單車", + "pt_BR": "Bicicletas para adulto disponíveis" } }, { @@ -194,7 +201,8 @@ "it": "Sono disponibili biciclette per disabili", "de": "Fahrräder für Behinderte verfügbar", "ru": "Доступны велосипеды для людей с ограниченными возможностями", - "zh_Hant": "有提供行動不便人士的單車" + "zh_Hant": "有提供行動不便人士的單車", + "pt_BR": "Bicicletas para deficientes físicos disponíveis" } } ] diff --git a/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json b/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json index 9318920b6f..52168e7c00 100644 --- a/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json +++ b/assets/layers/bicycle_tube_vending_machine/bicycle_tube_vending_machine.json @@ -7,7 +7,8 @@ "it": "Distributore automatico di camere d’aria per bici", "de": "Fahrradschlauch-Automat", "ru": "Торговый автомат для велосипедистов", - "zh_Hant": "自行車內胎自動售貨機" + "zh_Hant": "自行車內胎自動售貨機", + "pt_BR": "Máquina de venda automática de tubos de bicicleta" }, "title": { "render": { @@ -17,7 +18,8 @@ "it": "Distributore automatico di camere d’aria per bici", "de": "Fahrradschlauch-Automat", "ru": "Торговый автомат для велосипедистов", - "zh_Hant": "自行車內胎自動售貨機" + "zh_Hant": "自行車內胎自動售貨機", + "pt_BR": "Máquina de venda automática de tubos de bicicleta" }, "mappings": [ { @@ -68,7 +70,8 @@ "it": "Distributore automatico di camere d’aria per bici", "de": "Fahrradschlauch-Automat", "ru": "Торговый автомат для велосипедистов", - "zh_Hant": "自行車內胎自動售貨機" + "zh_Hant": "自行車內胎自動售貨機", + "pt_BR": "Máquina de venda automática de tubos de bicicleta" }, "tags": [ "amenity=vending_machine", @@ -89,7 +92,8 @@ "it": "Questo distributore automatico funziona ancora?", "ru": "Этот торговый автомат все еще работает?", "de": "Ist dieser Automat noch in Betrieb?", - "zh_Hant": "這個自動販賣機仍有運作嗎?" + "zh_Hant": "這個自動販賣機仍有運作嗎?", + "pt_BR": "Esta máquina de venda automática ainda está operacional?" }, "render": { "en": "The operational status is {operational_status", @@ -115,7 +119,8 @@ "ru": "Этот торговый автомат работает", "zh_Hans": "这个借还机正常工作", "de": "Dieser Automat funktioniert", - "zh_Hant": "這個自動販賣機仍運作" + "zh_Hant": "這個自動販賣機仍運作", + "pt_BR": "Esta máquina de venda automática funciona" } }, { @@ -129,7 +134,8 @@ "ru": "Этот торговый автомат сломан", "zh_Hans": "这个借还机已经损坏", "de": "Dieser Automat ist kaputt", - "zh_Hant": "這個自動販賣機沒有運作了" + "zh_Hant": "這個自動販賣機沒有運作了", + "pt_BR": "Esta máquina de venda automática está quebrada" } }, { @@ -143,7 +149,8 @@ "ru": "Этот торговый автомат закрыт", "zh_Hans": "这个借还机被关闭了", "de": "Dieser Automat ist geschlossen", - "zh_Hant": "這個自動販賣機已經關閉了" + "zh_Hant": "這個自動販賣機已經關閉了", + "pt_BR": "Esta máquina de venda automática está fechada" } } ] diff --git a/assets/layers/public_bookcase/public_bookcase.json b/assets/layers/public_bookcase/public_bookcase.json index d6462e1b42..896f97cea3 100644 --- a/assets/layers/public_bookcase/public_bookcase.json +++ b/assets/layers/public_bookcase/public_bookcase.json @@ -410,10 +410,12 @@ } ], "deletion": { - "softDeletionTags": {"and":[ - "disused:amenity=public_bookcase", - "amenity=" - ]}, + "softDeletionTags": { + "and": [ + "disused:amenity=public_bookcase", + "amenity=" + ] + }, "neededChangesets": 5 } } \ No newline at end of file diff --git a/langs/layers/pt_BR.json b/langs/layers/pt_BR.json index 81011c1805..e7644ac10f 100644 --- a/langs/layers/pt_BR.json +++ b/langs/layers/pt_BR.json @@ -1,143 +1,143 @@ { - "bicycle_tube_vending_machine": { + "bench": { "tagRenderings": { - "1": { + "3": { "mappings": { - "2": { - "then": "Esta máquina de venda automática está fechada" - }, - "1": { - "then": "Esta máquina de venda automática está quebrada" - }, "0": { - "then": "Esta máquina de venda automática funciona" + "then": "Material: madeira" + }, + "2": { + "then": "Material: pedra" + }, + "3": { + "then": "Material: concreto" + }, + "4": { + "then": "Material: plástico" + }, + "5": { + "then": "Material: aço" } }, - "question": "Esta máquina de venda automática ainda está operacional?" + "question": "De que é feito o banco (assento)?" + }, + "4": { + "question": "Em que direção você olha quando está sentado no banco?" + }, + "5": { + "render": "Cor: {colour}", + "question": "Qual a cor dessa bancada?", + "mappings": { + "0": { + "then": "Cor: marrom" + }, + "1": { + "then": "Cor: verde" + }, + "2": { + "then": "Cor: cinza" + }, + "3": { + "then": "Cor: branco" + }, + "4": { + "then": "Cor: vermelho" + }, + "5": { + "then": "Cor: preto" + }, + "6": { + "then": "Cor: azul" + }, + "7": { + "then": "Cor: amarelo" + } + } + }, + "6": { + "question": "Quando esta bancada foi pesquisada pela última vez?", + "render": "Esta bancada foi pesquisada pela última vez em {survey:date}" } }, + "presets": { + "0": { + "title": "Banco", + "description": "Adicionar um novo banco" + } + } + }, + "bench_at_pt": { + "name": "Bancos em pontos de transporte público", + "title": { + "render": "Banco", + "mappings": { + "0": { + "then": "Banco em ponto de transporte público" + }, + "1": { + "then": "Banco em abrigo" + } + } + }, + "tagRenderings": { + "1": { + "render": "{name}" + } + } + }, + "bicycle_library": { + "description": "Uma instalação onde as bicicletas podem ser emprestadas por períodos mais longos", + "tagRenderings": { + "6": { + "question": "Quanto custa um empréstimo de bicicleta?", + "render": "Custos de empréstimo de bicicleta {charge}", + "mappings": { + "0": { + "then": "Emprestar uma bicicleta é grátis" + } + } + }, + "7": { + "question": "Quem pode emprestar bicicletas aqui?", + "mappings": { + "0": { + "then": "Bicicletas para crianças disponíveis" + }, + "1": { + "then": "Bicicletas para adulto disponíveis" + }, + "2": { + "then": "Bicicletas para deficientes físicos disponíveis" + } + } + } + } + }, + "bicycle_tube_vending_machine": { + "name": "Máquina de venda automática de tubos de bicicleta", + "title": { + "render": "Máquina de venda automática de tubos de bicicleta" + }, "presets": { "0": { "title": "Máquina de venda automática de tubos de bicicleta" } }, - "title": { - "render": "Máquina de venda automática de tubos de bicicleta" - }, - "name": "Máquina de venda automática de tubos de bicicleta" - }, - "bicycle_library": { - "tagRenderings": { - "7": { - "mappings": { - "2": { - "then": "Bicicletas para deficientes físicos disponíveis" - }, - "1": { - "then": "Bicicletas para adulto disponíveis" - }, - "0": { - "then": "Bicicletas para crianças disponíveis" - } - }, - "question": "Quem pode emprestar bicicletas aqui?" - }, - "6": { - "mappings": { - "0": { - "then": "Emprestar uma bicicleta é grátis" - } - }, - "render": "Custos de empréstimo de bicicleta {charge}", - "question": "Quanto custa um empréstimo de bicicleta?" - } - }, - "description": "Uma instalação onde as bicicletas podem ser emprestadas por períodos mais longos" - }, - "bench_at_pt": { "tagRenderings": { "1": { - "render": "{name}" - } - }, - "title": { - "mappings": { - "1": { - "then": "Banco em abrigo" - }, - "0": { - "then": "Banco em ponto de transporte público" - } - }, - "render": "Banco" - }, - "name": "Bancos em pontos de transporte público" - }, - "bench": { - "presets": { - "0": { - "description": "Adicionar um novo banco", - "title": "Banco" - } - }, - "tagRenderings": { - "6": { - "render": "Esta bancada foi pesquisada pela última vez em {survey:date}", - "question": "Quando esta bancada foi pesquisada pela última vez?" - }, - "5": { + "question": "Esta máquina de venda automática ainda está operacional?", "mappings": { - "7": { - "then": "Cor: amarelo" - }, - "6": { - "then": "Cor: azul" - }, - "5": { - "then": "Cor: preto" - }, - "4": { - "then": "Cor: vermelho" - }, - "3": { - "then": "Cor: branco" - }, - "2": { - "then": "Cor: cinza" + "0": { + "then": "Esta máquina de venda automática funciona" }, "1": { - "then": "Cor: verde" - }, - "0": { - "then": "Cor: marrom" - } - }, - "question": "Qual a cor dessa bancada?", - "render": "Cor: {colour}" - }, - "4": { - "question": "Em que direção você olha quando está sentado no banco?" - }, - "3": { - "question": "De que é feito o banco (assento)?", - "mappings": { - "5": { - "then": "Material: aço" - }, - "4": { - "then": "Material: plástico" - }, - "3": { - "then": "Material: concreto" + "then": "Esta máquina de venda automática está quebrada" }, "2": { - "then": "Material: pedra" - }, - "0": { - "then": "Material: madeira" + "then": "Esta máquina de venda automática está fechada" } } } } } -} +} \ No newline at end of file