Rename some themes for more consistency, check of theme-ids, see #431

This commit is contained in:
pietervdvn 2021-07-26 10:13:50 +02:00
parent bca995b985
commit 177649614d
38 changed files with 49 additions and 82 deletions

View file

@ -1,5 +1,5 @@
{
"id": "artworks",
"id": "artwork",
"version": "2020-08-30",
"title": {
"en": "Open Artwork Map",
@ -429,4 +429,4 @@
]
}
]
}
}

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 593 KiB

After

Width:  |  Height:  |  Size: 593 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,5 +1,5 @@
{
"id": "fietsstraten",
"id": "cyclestreets",
"version": "2020-08-30",
"title": {
"nl": "Fietsstraten",
@ -68,7 +68,7 @@
]
},
"then": {
"nl": "Deze straat is een fietsstraat",
"nl": "Deze straat i een fietsstraat",
"en": "This street is a cyclestreet",
"ja": "この通りはcyclestreetだ",
"nb_NO": "Denne gaten er en sykkelvei"
@ -279,4 +279,4 @@
]
}
]
}
}

View file

@ -1,5 +1,5 @@
{
"id": "boomgaarden",
"id": "fruit_trees",
"title": {
"nl": "Open Boomgaardenkaart"
},
@ -172,4 +172,4 @@
}
],
"roamingRenderings": []
}
}

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -487,11 +487,6 @@
}
}
}
},
"presets": {
"0": {
"title": "Обслуживание велосипедов/магазин"
}
}
},
"defibrillator": {
@ -1069,7 +1064,6 @@
"1": {
"question": "Вы хотите добавить описание?"
}
},
"name": "Смотровая площадка"
}
}
}
}

View file

@ -6,27 +6,6 @@
"opening_hours": {
"question": "Was sind die Öffnungszeiten von {name}?",
"render": "<h3>Öffnungszeiten</h3>{opening_hours_table(opening_hours)}"
},
"level": {
"mappings": {
"2": {
"then": "Ist im ersten Stock"
},
"1": {
"then": "Ist im Erdgeschoss"
}
},
"render": "Befindet sich im {level}ten Stock",
"question": "In welchem Stockwerk befindet sich dieses Objekt?"
},
"description": {
"question": "Gibt es noch etwas, das die vorhergehenden Fragen nicht abgedeckt haben? Hier wäre Platz dafür.<br/><span style='font-size: small'>Bitte keine bereits erhobenen Informationen.</span>"
},
"website": {
"question": "Was ist die Website von {name}?"
},
"email": {
"question": "Was ist die Mail-Adresse von {name}?"
}
}
}
}

View file

@ -15,20 +15,6 @@
"opening_hours": {
"question": "Какое время работы у {name}?",
"render": "<h3>Часы работы</h3>{opening_hours_table(opening_hours)}"
},
"level": {
"mappings": {
"2": {
"then": "Расположено на первом этаже"
},
"1": {
"then": "Расположено на первом этаже"
},
"0": {
"then": "Расположено под землей"
}
},
"render": "Расположено на {level}ом этаже"
}
}
}
}

View file

@ -3,7 +3,7 @@
"title": "AED-Karte öffnen",
"description": "Auf dieser Karte kann man nahe gelegene Defibrillatoren finden und markieren"
},
"artworks": {
"artwork": {
"title": "Freie Kunstwerk-Karte",
"description": "Willkommen bei der Freien Kunstwerk-Karte, einer Karte von Statuen, Büsten, Grafitti, ... auf der ganzen Welt",
"layers": {

View file

@ -3,7 +3,7 @@
"title": "Open AED Map",
"description": "On this map, one can find and mark nearby defibrillators"
},
"artworks": {
"artwork": {
"title": "Open Artwork Map",
"description": "Welcome to Open Artwork Map, a map of statues, busts, grafittis and other artwork all over the world",
"layers": {
@ -692,7 +692,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"title": "Cyclestreets",
"shortDescription": "A map of cyclestreets",
"description": "A cyclestreet is is a street where <b>motorized traffic is not allowed to overtake cyclists</b>. They are signposted by a special traffic sign. Cyclestreets can be found in the Netherlands and Belgium, but also in Germany and France. ",

View file

@ -3,7 +3,7 @@
"title": "Mapa abierto de desfibriladores (DEA)",
"description": "En este mapa , cualquiera puede encontrar y marcar los desfibriladores externos automáticos más cercanos"
},
"artworks": {
"artwork": {
"description": "Bienvenido a Open Artwork Map, un mapa de estatuas, bustos, grafitis y otras obras de arte de todo el mundo",
"layers": {
"0": {

View file

@ -3,7 +3,7 @@
"title": "Carte des défibrillateurs (DAE)",
"description": "Sur cette carte, vous pouvez trouver et améliorer les informations sur les défibrillateurs"
},
"artworks": {
"artwork": {
"title": "Carte ouverte des œuvres d'art",
"description": "Bienvenue sur la carte ouverte des œuvres d'art, une carte des statues, fresques, ... du monde entier",
"layers": {

View file

@ -2,7 +2,7 @@
"aed": {
"title": "Nyílt AED Térkép"
},
"artworks": {
"artwork": {
"title": "Nyít Műalkotás Térkép"
}
}

View file

@ -3,7 +3,7 @@
"title": "Buka Peta AED",
"description": "Di peta ini, seseorang dapat menemukan dan menandai defibrillator terdekat"
},
"artworks": {
"artwork": {
"title": "Buka Peta Karya Seni",
"description": "Selamat datang di Open Artwork Map, peta untuk patung, grafiti, dan karya seni lain di seluruh dunia",
"layers": {

View file

@ -3,7 +3,7 @@
"title": "Mappa dei defibrillatori (DAE)",
"description": "Su questa mappa puoi trovare e segnalare i defibrillatori nelle vicinanze"
},
"artworks": {
"artwork": {
"title": "Mappa libera delle opere d'arte",
"description": "Benvenuto/a sulla mappa libera dellarte, una mappa delle statue, i busti, i graffiti e le altre realizzazioni artistiche di tutto il mondo",
"layers": {
@ -396,7 +396,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"roamingRenderings": {
"0": {
"mappings": {

View file

@ -3,7 +3,7 @@
"title": "オープンAEDマップ",
"description": "この地図では近くにある除細動器(AED)を見つけてマークします"
},
"artworks": {
"artwork": {
"title": "オープン アートワーク マップ",
"description": "オープン アートワーク マップへようこそ。世界中の銅像や胸像、壁の落書きなどのアートワークの地図です",
"layers": {
@ -583,7 +583,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"title": "Cyclestreets",
"shortDescription": "cyclestreetsの地図",
"description": "cyclestreetとは、<b>自動車がサイクリストを追い越すことができない</b>道です。専用の道路標識で表示されます。Cyclestreetsはオランダやベルギーにもありますが、ドイツやフランスにもあります。 ",

View file

@ -2,7 +2,7 @@
"aed": {
"title": "Åpne AED-kart"
},
"artworks": {
"artwork": {
"layers": {
"0": {
"name": "Kunstverk",
@ -213,7 +213,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"shortDescription": "Et kart over sykkelveier",
"roamingRenderings": {
"0": {

View file

@ -7,7 +7,7 @@
"title": "Open AED-kaart - Brugge edition",
"description": "Op deze kaart kan je informatie over AEDs vinden en verbeteren + een export van de brugse defibrillatoren"
},
"artworks": {
"artwork": {
"title": "Kunstwerkenkaart",
"description": "Welkom op de Open Kunstwerken Kaart",
"layers": {
@ -580,7 +580,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"title": "Fietsstraten",
"shortDescription": "Een kaart met alle gekende fietsstraten",
"description": "Een fietsstraat is een straat waar <ul><li><b>automobilisten geen fietsers mogen inhalen</b></li><li>Er een maximumsnelheid van <b>30km/u</b> geldt</li><li>Fietsers gemotoriseerde voortuigen links mogen inhalen</li><li>Fietsers nog steeds voorrang aan rechts moeten verlenen - ook aan auto's en voetgangers op het zebrapad</li></ul><br/><br/>Op deze open kaart kan je alle gekende fietsstraten zien en kan je ontbrekende fietsstraten aanduiden. Om de kaart aan te passen, moet je je aanmelden met OpenStreetMap en helemaal inzoomen tot straatniveau.",
@ -592,7 +592,7 @@
"then": "Deze straat is een fietsstraat (en dus zone 30)"
},
"1": {
"then": "Deze straat is een fietsstraat"
"then": "Deze straat i een fietsstraat"
},
"2": {
"then": "Deze straat wordt binnenkort een fietsstraat"
@ -820,7 +820,7 @@
}
}
},
"boomgaarden": {
"fruit_trees": {
"title": "Open Boomgaardenkaart",
"shortDescription": "Boomgaarden en fruitbomen",
"description": "Op deze kaart vindt je boomgaarden en fruitbomen",

View file

@ -3,7 +3,7 @@
"title": "Открытая карта АВД (Автоматизированных внешних дефибрилляторов)",
"description": "На этой карте вы можете найти и отметить ближайшие дефибрилляторы"
},
"artworks": {
"artwork": {
"title": "Открытая карта произведений искусства",
"description": "Добро пожаловать на Open Artwork Map, карту статуй, бюстов, граффити и других произведений искусства по всему миру",
"layers": {
@ -407,7 +407,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"layers": {
"2": {
"name": "Все улицы",

View file

@ -3,7 +3,7 @@
"title": "Öppna AED-karta",
"description": "På denna karta kan man hitta och markera närliggande defibrillatorer"
},
"artworks": {
"artwork": {
"title": "Öppen konstverkskarta"
}
}

View file

@ -3,7 +3,7 @@
"title": "開放AED地圖",
"description": "在這份地圖上,你可以找到與標記附近的除顫器"
},
"artworks": {
"artwork": {
"title": "開放藝術品地圖",
"description": "歡迎來到開放藝術品地圖,這份地圖會顯示全世界的雕像、半身像、塗鴉以及其他類型的藝術品",
"layers": {
@ -294,7 +294,7 @@
}
}
},
"fietsstraten": {
"cyclestreets": {
"title": "單車街道",
"shortDescription": "單車街道的地圖",
"description": "單車街道是<b>機動車輛受限制,只允許單車通行</b>的道路。通常會有路標顯示特別的交通指標。單車街道通常在荷蘭、比利時看到,但德國與法國也有。 ",

View file

@ -78,9 +78,8 @@ class LayerOverviewUtils {
main(args: string[]) {
const lt = this.loadThemesAndLayers();
const layerFiles = lt.layers;
const themeFiles = lt.themes;
const layerFiles = ScriptUtils.getLayerFiles();
const themeFiles = ScriptUtils.getThemeFiles();
console.log(" ---------- VALIDATING ---------")
const licensePaths = []
@ -98,7 +97,9 @@ class LayerOverviewUtils {
}
let themeErrorCount = []
for (const themeFile of themeFiles) {
for (const themeInfo of themeFiles) {
const themeFile = themeInfo.parsed
const themePath = themeInfo.path
if (typeof themeFile.language === "string") {
themeErrorCount.push("The theme " + themeFile.id + " has a string as language. Please use a list of strings")
}
@ -108,12 +109,13 @@ class LayerOverviewUtils {
themeErrorCount.push(`Unknown layer id: ${layer} in theme ${themeFile.id}`)
}
} else {
if (layer.builtin !== undefined) {
if (!knownLayerIds.has(layer.builtin)) {
themeErrorCount.push("Unknown layer id: " + layer.builtin + "(which uses inheritance)")
if (layer["builtin"] !== undefined) {
if (!knownLayerIds.has(layer["builtin"])) {
themeErrorCount.push("Unknown layer id: " + layer["builtin"] + "(which uses inheritance)")
}
} else {
// layer.builtin contains layer overrides - we can skip those
// @ts-ignore
layerErrorCount.push(...this.validateLayer(layer, undefined, knownPaths, themeFile.id))
}
}
@ -121,7 +123,7 @@ class LayerOverviewUtils {
themeFile.layers = themeFile.layers
.filter(l => typeof l != "string") // We remove all the builtin layer references as they don't work with ts-node for some weird reason
.filter(l => l.builtin === undefined)
.filter(l => l["builtin"] === undefined)
try {
@ -129,6 +131,12 @@ class LayerOverviewUtils {
if (theme.id !== theme.id.toLowerCase()) {
themeErrorCount.push("Theme ids should be in lowercase, but it is " + theme.id)
}
let filename = themePath.substring(themePath.lastIndexOf("/") + 1, themePath.length - 5)
if(theme.id !== filename){
themeErrorCount.push("Theme ids should be the same as the name.json, but we got id: " + theme.id + " and filename "+filename+" ("+themePath+")")
}
} catch (e) {
themeErrorCount.push("Could not parse theme " + themeFile["id"] + "due to", e)
}