diff --git a/assets/themes/artwork/artwork.json b/assets/themes/artwork/artwork.json
index c3b7b7c552..454ff9eac1 100644
--- a/assets/themes/artwork/artwork.json
+++ b/assets/themes/artwork/artwork.json
@@ -1,5 +1,5 @@
{
- "id": "artworks",
+ "id": "artwork",
"version": "2020-08-30",
"title": {
"en": "Open Artwork Map",
@@ -429,4 +429,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/themes/bicycle_library/bicycle_library.json b/assets/themes/bicyclelib/bicyclelib.json
similarity index 100%
rename from assets/themes/bicycle_library/bicycle_library.json
rename to assets/themes/bicyclelib/bicyclelib.json
diff --git a/assets/themes/bicycle_library/license_info.json b/assets/themes/bicyclelib/license_info.json
similarity index 100%
rename from assets/themes/bicycle_library/license_info.json
rename to assets/themes/bicyclelib/license_info.json
diff --git a/assets/themes/bicycle_library/logo.svg b/assets/themes/bicyclelib/logo.svg
similarity index 100%
rename from assets/themes/bicycle_library/logo.svg
rename to assets/themes/bicyclelib/logo.svg
diff --git a/assets/themes/bookcases/Bookcases.json b/assets/themes/bookcases/bookcases.json
similarity index 100%
rename from assets/themes/bookcases/Bookcases.json
rename to assets/themes/bookcases/bookcases.json
diff --git a/assets/themes/campersites/Barßel_Wohnmobilstellplatz.jpg b/assets/themes/campersite/Barßel_Wohnmobilstellplatz.jpg
similarity index 100%
rename from assets/themes/campersites/Barßel_Wohnmobilstellplatz.jpg
rename to assets/themes/campersite/Barßel_Wohnmobilstellplatz.jpg
diff --git a/assets/themes/campersites/campersites.json b/assets/themes/campersite/campersite.json
similarity index 100%
rename from assets/themes/campersites/campersites.json
rename to assets/themes/campersite/campersite.json
diff --git a/assets/themes/campersites/caravan.svg b/assets/themes/campersite/caravan.svg
similarity index 100%
rename from assets/themes/campersites/caravan.svg
rename to assets/themes/campersite/caravan.svg
diff --git a/assets/themes/campersites/caravan_green.svg b/assets/themes/campersite/caravan_green.svg
similarity index 100%
rename from assets/themes/campersites/caravan_green.svg
rename to assets/themes/campersite/caravan_green.svg
diff --git a/assets/themes/campersites/license_info.json b/assets/themes/campersite/license_info.json
similarity index 100%
rename from assets/themes/campersites/license_info.json
rename to assets/themes/campersite/license_info.json
diff --git a/assets/themes/campersites/sanitary_dump_station.svg b/assets/themes/campersite/sanitary_dump_station.svg
similarity index 100%
rename from assets/themes/campersites/sanitary_dump_station.svg
rename to assets/themes/campersite/sanitary_dump_station.svg
diff --git a/assets/themes/cyclestreets/cyclestreets.json b/assets/themes/cyclestreets/cyclestreets.json
index b3b3abbf4c..a09314b9d3 100644
--- a/assets/themes/cyclestreets/cyclestreets.json
+++ b/assets/themes/cyclestreets/cyclestreets.json
@@ -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 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/assets/themes/fruit_trees/fruit_trees.json b/assets/themes/fruit_trees/fruit_trees.json
index dc59132c91..d16dd377be 100644
--- a/assets/themes/fruit_trees/fruit_trees.json
+++ b/assets/themes/fruit_trees/fruit_trees.json
@@ -1,5 +1,5 @@
{
- "id": "boomgaarden",
+ "id": "fruit_trees",
"title": {
"nl": "Open Boomgaardenkaart"
},
@@ -172,4 +172,4 @@
}
],
"roamingRenderings": []
-}
\ No newline at end of file
+}
diff --git a/assets/themes/personalLayout/personalLayout.json b/assets/themes/personal/personal.json
similarity index 100%
rename from assets/themes/personalLayout/personalLayout.json
rename to assets/themes/personal/personal.json
diff --git a/assets/themes/surveillance_cameras/cam_left.svg b/assets/themes/surveillance/cam_left.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/cam_left.svg
rename to assets/themes/surveillance/cam_left.svg
diff --git a/assets/themes/surveillance_cameras/cam_right.svg b/assets/themes/surveillance/cam_right.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/cam_right.svg
rename to assets/themes/surveillance/cam_right.svg
diff --git a/assets/themes/surveillance_cameras/custom_theme.css b/assets/themes/surveillance/custom_theme.css
similarity index 100%
rename from assets/themes/surveillance_cameras/custom_theme.css
rename to assets/themes/surveillance/custom_theme.css
diff --git a/assets/themes/surveillance_cameras/dome.svg b/assets/themes/surveillance/dome.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/dome.svg
rename to assets/themes/surveillance/dome.svg
diff --git a/assets/themes/surveillance_cameras/license_info.json b/assets/themes/surveillance/license_info.json
similarity index 100%
rename from assets/themes/surveillance_cameras/license_info.json
rename to assets/themes/surveillance/license_info.json
diff --git a/assets/themes/surveillance_cameras/logo.svg b/assets/themes/surveillance/logo.svg
similarity index 100%
rename from assets/themes/surveillance_cameras/logo.svg
rename to assets/themes/surveillance/logo.svg
diff --git a/assets/themes/surveillance_cameras/surveillance_cameras.json b/assets/themes/surveillance/surveillance.json
similarity index 100%
rename from assets/themes/surveillance_cameras/surveillance_cameras.json
rename to assets/themes/surveillance/surveillance.json
diff --git a/langs/layers/ru.json b/langs/layers/ru.json
index c0f5353343..0cd328a6ae 100644
--- a/langs/layers/ru.json
+++ b/langs/layers/ru.json
@@ -487,11 +487,6 @@
}
}
}
- },
- "presets": {
- "0": {
- "title": "Обслуживание велосипедов/магазин"
- }
}
},
"defibrillator": {
@@ -1069,7 +1064,6 @@
"1": {
"question": "Вы хотите добавить описание?"
}
- },
- "name": "Смотровая площадка"
+ }
}
-}
+}
\ No newline at end of file
diff --git a/langs/shared-questions/de.json b/langs/shared-questions/de.json
index 6faff774e2..ff0b97af86 100644
--- a/langs/shared-questions/de.json
+++ b/langs/shared-questions/de.json
@@ -6,27 +6,6 @@
"opening_hours": {
"question": "Was sind die Öffnungszeiten von {name}?",
"render": "
Öffnungszeiten
{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.
Bitte keine bereits erhobenen Informationen."
- },
- "website": {
- "question": "Was ist die Website von {name}?"
- },
- "email": {
- "question": "Was ist die Mail-Adresse von {name}?"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/shared-questions/ru.json b/langs/shared-questions/ru.json
index 93c56dc441..a06bc76078 100644
--- a/langs/shared-questions/ru.json
+++ b/langs/shared-questions/ru.json
@@ -15,20 +15,6 @@
"opening_hours": {
"question": "Какое время работы у {name}?",
"render": "Часы работы
{opening_hours_table(opening_hours)}"
- },
- "level": {
- "mappings": {
- "2": {
- "then": "Расположено на первом этаже"
- },
- "1": {
- "then": "Расположено на первом этаже"
- },
- "0": {
- "then": "Расположено под землей"
- }
- },
- "render": "Расположено на {level}ом этаже"
}
}
-}
+}
\ No newline at end of file
diff --git a/langs/themes/de.json b/langs/themes/de.json
index 6a0b29fad1..48972b7683 100644
--- a/langs/themes/de.json
+++ b/langs/themes/de.json
@@ -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": {
diff --git a/langs/themes/en.json b/langs/themes/en.json
index f5db488b97..dd70beaf6a 100644
--- a/langs/themes/en.json
+++ b/langs/themes/en.json
@@ -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 motorized traffic is not allowed to overtake cyclists. They are signposted by a special traffic sign. Cyclestreets can be found in the Netherlands and Belgium, but also in Germany and France. ",
diff --git a/langs/themes/es.json b/langs/themes/es.json
index 03668a5d5c..91a123d7f0 100644
--- a/langs/themes/es.json
+++ b/langs/themes/es.json
@@ -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": {
diff --git a/langs/themes/fr.json b/langs/themes/fr.json
index 25bff80566..9d927b6183 100644
--- a/langs/themes/fr.json
+++ b/langs/themes/fr.json
@@ -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": {
diff --git a/langs/themes/hu.json b/langs/themes/hu.json
index 10a97477f6..cb8f0fd7ff 100644
--- a/langs/themes/hu.json
+++ b/langs/themes/hu.json
@@ -2,7 +2,7 @@
"aed": {
"title": "Nyílt AED Térkép"
},
- "artworks": {
+ "artwork": {
"title": "Nyít Műalkotás Térkép"
}
}
\ No newline at end of file
diff --git a/langs/themes/id.json b/langs/themes/id.json
index 31649d682e..c436e745eb 100644
--- a/langs/themes/id.json
+++ b/langs/themes/id.json
@@ -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": {
diff --git a/langs/themes/it.json b/langs/themes/it.json
index 89189d3aec..313e2715f9 100644
--- a/langs/themes/it.json
+++ b/langs/themes/it.json
@@ -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 dell’arte, 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": {
diff --git a/langs/themes/ja.json b/langs/themes/ja.json
index 2754b88120..3dfd0a2e4a 100644
--- a/langs/themes/ja.json
+++ b/langs/themes/ja.json
@@ -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とは、自動車がサイクリストを追い越すことができない道です。専用の道路標識で表示されます。Cyclestreetsはオランダやベルギーにもありますが、ドイツやフランスにもあります。 ",
diff --git a/langs/themes/nb_NO.json b/langs/themes/nb_NO.json
index 9792f7c736..29f14be05b 100644
--- a/langs/themes/nb_NO.json
+++ b/langs/themes/nb_NO.json
@@ -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": {
diff --git a/langs/themes/nl.json b/langs/themes/nl.json
index e1ab2203fd..550fc1bcd8 100644
--- a/langs/themes/nl.json
+++ b/langs/themes/nl.json
@@ -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 - automobilisten geen fietsers mogen inhalen
- Er een maximumsnelheid van 30km/u geldt
- Fietsers gemotoriseerde voortuigen links mogen inhalen
- Fietsers nog steeds voorrang aan rechts moeten verlenen - ook aan auto's en voetgangers op het zebrapad
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",
diff --git a/langs/themes/ru.json b/langs/themes/ru.json
index 74f15b8753..ccc9571e3f 100644
--- a/langs/themes/ru.json
+++ b/langs/themes/ru.json
@@ -3,7 +3,7 @@
"title": "Открытая карта АВД (Автоматизированных внешних дефибрилляторов)",
"description": "На этой карте вы можете найти и отметить ближайшие дефибрилляторы"
},
- "artworks": {
+ "artwork": {
"title": "Открытая карта произведений искусства",
"description": "Добро пожаловать на Open Artwork Map, карту статуй, бюстов, граффити и других произведений искусства по всему миру",
"layers": {
@@ -407,7 +407,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"layers": {
"2": {
"name": "Все улицы",
diff --git a/langs/themes/sv.json b/langs/themes/sv.json
index 2a881c73c7..59d44792db 100644
--- a/langs/themes/sv.json
+++ b/langs/themes/sv.json
@@ -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"
}
}
\ No newline at end of file
diff --git a/langs/themes/zh_Hant.json b/langs/themes/zh_Hant.json
index 73063a9d78..cd855a4a4f 100644
--- a/langs/themes/zh_Hant.json
+++ b/langs/themes/zh_Hant.json
@@ -3,7 +3,7 @@
"title": "開放AED地圖",
"description": "在這份地圖上,你可以找到與標記附近的除顫器"
},
- "artworks": {
+ "artwork": {
"title": "開放藝術品地圖",
"description": "歡迎來到開放藝術品地圖,這份地圖會顯示全世界的雕像、半身像、塗鴉以及其他類型的藝術品",
"layers": {
@@ -294,7 +294,7 @@
}
}
},
- "fietsstraten": {
+ "cyclestreets": {
"title": "單車街道",
"shortDescription": "單車街道的地圖",
"description": "單車街道是機動車輛受限制,只允許單車通行的道路。通常會有路標顯示特別的交通指標。單車街道通常在荷蘭、比利時看到,但德國與法國也有。 ",
diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts
index d903867c84..3ea75e290f 100644
--- a/scripts/generateLayerOverview.ts
+++ b/scripts/generateLayerOverview.ts
@@ -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)
}