forked from MapComplete/MapComplete
Make sure that landing pages are in english
This commit is contained in:
parent
b8e5800df3
commit
1305e0c2db
17 changed files with 40 additions and 78 deletions
|
@ -163,10 +163,19 @@ class ValidateTheme extends DesugaringStep<LayoutConfigJson> {
|
|||
errors.push(...checked.errors)
|
||||
}
|
||||
if (!json.hideFromOverview && theme.id !== "personal") {
|
||||
|
||||
// The first key in the the title-field must be english, otherwise the title in the loading page will be the different language
|
||||
const targetLanguage = theme.title.SupportedLanguages()[0]
|
||||
if(targetLanguage !== "en"){
|
||||
warnings.push(`TargetLanguage is not 'en' for public theme ${theme.id}, it is ${targetLanguage}. Move 'en' up in the title of the theme and set it as the first key`)
|
||||
}
|
||||
|
||||
// Official, public themes must have a full english translation
|
||||
const checked = new ValidateLanguageCompleteness("en")
|
||||
.convert(theme, theme.id)
|
||||
errors.push(...checked.errors)
|
||||
|
||||
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "food",
|
||||
"name": {
|
||||
"nl": "Eetgelegenheden",
|
||||
"en": "Restaurants and fast food",
|
||||
"nl": "Eetgelegenheden",
|
||||
"de": "Restaurants und Imbisse",
|
||||
"da": "Restauranter og fastfood",
|
||||
"es": "Restaurantes y comida rápida"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "maxspeed",
|
||||
"name": {
|
||||
"en": "Maxspeed",
|
||||
"es": "Velocidad",
|
||||
"ca": "Velocitat",
|
||||
"en": "Maxspeed"
|
||||
"ca": "Velocitat"
|
||||
},
|
||||
"source": {
|
||||
"osmTags": {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "playground",
|
||||
"name": {
|
||||
"nl": "Speeltuinen",
|
||||
"en": "Playgrounds",
|
||||
"nl": "Speeltuinen",
|
||||
"ru": "Детские площадки",
|
||||
"de": "Spielplätze",
|
||||
"it": "Campi da gioco",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "cafes_and_pubs",
|
||||
"title": {
|
||||
"nl": "Cafés",
|
||||
"en": "Cafés and pubs",
|
||||
"nl": "Cafés",
|
||||
"de": "Cafés und Kneipen",
|
||||
"it": "Caffè e pub",
|
||||
"nb_NO": "Kafeer og kneiper",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "climbing",
|
||||
"title": {
|
||||
"en": "Open Climbing Map",
|
||||
"nl": "Open klimkaart",
|
||||
"de": "Offene Kletterkarte",
|
||||
"en": "Open Climbing Map",
|
||||
"ru": "Открытая карта скалолазания",
|
||||
"ja": "登山地図を開く",
|
||||
"zh_Hant": "開放攀爬地圖",
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"id": "cyclestreets",
|
||||
"version": "2020-08-30",
|
||||
"title": {
|
||||
"nl": "Fietsstraten",
|
||||
"en": "Cyclestreets",
|
||||
"nl": "Fietsstraten",
|
||||
"ja": "Cyclestreets",
|
||||
"zh_Hant": "單車街道",
|
||||
"de": "Fahrradstraßen",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "facadegardens",
|
||||
"title": {
|
||||
"nl": "Straatgeveltuintjes",
|
||||
"en": "Facade gardens",
|
||||
"nl": "Straatgeveltuintjes",
|
||||
"ja": "ファサード庭園",
|
||||
"zh_Hant": "立面花園",
|
||||
"it": "Giardini verticali",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "food",
|
||||
"title": {
|
||||
"nl": "Eetgelegenheden",
|
||||
"en": "Restaurants and fast food",
|
||||
"nl": "Eetgelegenheden",
|
||||
"de": "Restaurants und Schnellimbisse",
|
||||
"it": "Ristoranti e fast food",
|
||||
"nb_NO": "Restauranter og søppelmat",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "fritures",
|
||||
"title": {
|
||||
"nl": "Friturenkaart",
|
||||
"en": "Fries shops",
|
||||
"nl": "Friturenkaart",
|
||||
"fr": "Carte des friteries",
|
||||
"de": "Pommes-frites-Läden",
|
||||
"ca": "Botigues de patates"
|
||||
|
|
|
@ -1,24 +1,13 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"title": {
|
||||
"en": "Changes made with MapComplete",
|
||||
"de": "Änderungen mit MapComplete",
|
||||
"es": "Cambios hechos con MapComplete",
|
||||
"nb_NO": "Endringer utført med MapComplete",
|
||||
"nl": "Wijzigingen gemaakt met MapComplete"
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Shows changes made by MapComplete",
|
||||
"de": "Zeigt Änderungen von MapComplete",
|
||||
"es": "Muestra los cambios hechos por MapComplete",
|
||||
"nb_NO": "Vis endringer utført med MapComplete",
|
||||
"nl": "Toont wijzigingen gemaakt met MapComplete"
|
||||
"en": "Shows changes made by MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This maps shows all the changes made with MapComplete",
|
||||
"de": "Diese Karte zeigt alle Änderungen die mit MapComplete gemacht wurden",
|
||||
"es": "Este mapa muestra todos los cambios hechos con MapComplete",
|
||||
"nl": "Deze kaart toont alle wijzigingen die met MapComplete werden gemaakt"
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"maintainer": "",
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
|
@ -33,10 +22,7 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"name": {
|
||||
"en": "Changeset centers",
|
||||
"de": "Schwerpunkte von Änderungssätzen",
|
||||
"es": "Centros de conjuntos de cambios",
|
||||
"nb_NO": "Endringssettsenter"
|
||||
"en": "Changeset centers"
|
||||
},
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
|
@ -50,55 +36,35 @@
|
|||
],
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Changeset for {theme}",
|
||||
"de": "Änderungen für {theme}",
|
||||
"es": "Conjunto de cambios para {theme}",
|
||||
"nb_NO": "Endringssett for {theme}",
|
||||
"nl": "Wijzigingset voor {theme}"
|
||||
"en": "Changeset for {theme}"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "Shows all MapComplete changes",
|
||||
"de": "Zeigt alle MapComplete Änderungen",
|
||||
"es": "Muestra todos los cambios de MapComplete",
|
||||
"nl": "Toont alle wijzigingen met MapComplete"
|
||||
"en": "Shows all MapComplete changes"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "render_id",
|
||||
"render": {
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"de": "Änderung <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"es": "Conjunto de cambios <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"nb_NO": "Endringssett <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"nl": "Wijzigingset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contributor",
|
||||
"render": {
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
|
||||
"de": "Änderung wurde von <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a> gemacht",
|
||||
"es": "Cambio hecho por <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
|
||||
"nl": "Wijziging gemaakt door <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "theme",
|
||||
"render": {
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"de": "Änderung mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"es": "Cambio con tema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"nl": "Wijziging met thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "theme~http.*",
|
||||
"then": {
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
|
||||
"de": "Änderung mit <b>inoffiziellem</b> Thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
|
||||
"es": "Cambio con tema <b>no oficial</b> <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
|
||||
"nl": "Wijziging met <b>officieus</b> thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -374,11 +340,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Themename contains {search}",
|
||||
"de": "Themenname enthält {search}",
|
||||
"es": "Nombre del tema contiene {search}",
|
||||
"nb_NO": "Temanavn inneholder {search}",
|
||||
"nl": "Themanaam bevat {search}"
|
||||
"en": "Themename contains {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -394,10 +356,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made by contributor {search}",
|
||||
"de": "Erstellt von {search}",
|
||||
"es": "Hecho por contributor/a {search}",
|
||||
"nl": "Gemaakt door bijdrager {search}"
|
||||
"en": "Made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -413,10 +372,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "<b>Not</b> made by contributor {search}",
|
||||
"de": "<b>Nicht</b> erstellt von {search}",
|
||||
"es": "<b>No</b> hecho por contributor/a {search}",
|
||||
"nl": "<b>Niet</b> gemaakt door bijdrager {search}"
|
||||
"en": "<b>Not</b> made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -431,10 +387,7 @@
|
|||
{
|
||||
"id": "link_to_more",
|
||||
"render": {
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
|
||||
"de": "Weitere Statistiken finden Sie <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
|
||||
"es": "Se pueden encontrar más estadísticas <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>aquí</a>",
|
||||
"nl": "Meer statistieken kunnen <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a> gevonden worden"
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "maxspeed",
|
||||
"title": {
|
||||
"en": "Maxspeed",
|
||||
"es": "Velocidad",
|
||||
"ca": "Velocitat",
|
||||
"en": "Maxspeed"
|
||||
"ca": "Velocitat"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "This map shows the legally allowed maximum speed on every road."
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "parkings",
|
||||
"title": {
|
||||
"nl": "Parking",
|
||||
"en": "Parking",
|
||||
"nl": "Parking",
|
||||
"de": "Parkplatzkarte",
|
||||
"it": "Parcheggio",
|
||||
"nb_NO": "Parkering",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "playgrounds",
|
||||
"title": {
|
||||
"nl": "Speelplekken",
|
||||
"en": "Playgrounds",
|
||||
"nl": "Speelplekken",
|
||||
"fr": "Aires de jeux",
|
||||
"ja": "遊び場",
|
||||
"zh_Hant": "遊樂場",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"id": "sport_pitches",
|
||||
"title": {
|
||||
"en": "Sport pitches",
|
||||
"nl": "Sportvelden",
|
||||
"fr": "Terrains de sport",
|
||||
"en": "Sport pitches",
|
||||
"ja": "スポーツ競技場",
|
||||
"zh_Hant": "運動場地",
|
||||
"ru": "Спортивные площадки",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "trees",
|
||||
"title": {
|
||||
"nl": "Bomen",
|
||||
"en": "Trees",
|
||||
"nl": "Bomen",
|
||||
"fr": "Arbres",
|
||||
"it": "Alberi",
|
||||
"ru": "Деревья",
|
||||
|
|
|
@ -19,7 +19,6 @@ import {PrepareLayer} from "../Models/ThemeConfig/Conversion/PrepareLayer";
|
|||
import {PrepareTheme} from "../Models/ThemeConfig/Conversion/PrepareTheme";
|
||||
import {DesugaringContext} from "../Models/ThemeConfig/Conversion/Conversion";
|
||||
import {Utils} from "../Utils";
|
||||
import {And} from "../Logic/Tags/And";
|
||||
|
||||
// This scripts scans 'assets/layers/*.json' for layer definition files and 'assets/themes/*.json' for theme definition files.
|
||||
// It spits out an overview of those to be used to load them
|
||||
|
@ -262,6 +261,7 @@ class LayerOverviewUtils {
|
|||
tagRenderings: this.getSharedTagRenderings(knownImagePaths),
|
||||
publicLayers
|
||||
}
|
||||
const nonDefaultLanguages : {theme: string, language: string}[] = []
|
||||
for (const themeInfo of themeFiles) {
|
||||
let themeFile = themeInfo.parsed
|
||||
const themePath = themeInfo.path
|
||||
|
|
Loading…
Reference in a new issue