diff --git a/.github/workflows/pull_request_check.yml b/.github/workflows/pull_request_check.yml index b2b49d6a41..27165f7761 100644 --- a/.github/workflows/pull_request_check.yml +++ b/.github/workflows/pull_request_check.yml @@ -24,6 +24,9 @@ jobs: - name: create stub themes run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json" + - name: generate assets + run: npm run generate:images + - name: generate translations run: npm run generate:translations diff --git a/assets/layers/ghost_bike/ghost_bike.json b/assets/layers/ghost_bike/ghost_bike.json index 2a2b8342d3..68020ab520 100644 --- a/assets/layers/ghost_bike/ghost_bike.json +++ b/assets/layers/ghost_bike/ghost_bike.json @@ -5,7 +5,19 @@ "nl": "Witte Fietsen", "de": "Geisterrad", "it": "Bici fantasma", - "fr": "Vélos fantômes" + "fr": "Vélos fantômes", + "eo": "Fantombiciklo", + "es": "Bicicleta blanca", + "fi": "Haamupyörä", + "gl": "Bicicleta pantasma", + "hu": "Emlékkerékpár", + "ja": "ゴーストバイク", + "nb_NO": "Spøkelsessykler", + "pl": "Duch roweru", + "pt_BR": "Bicicleta fantasma", + "ru": "Велосипед Ghost", + "sv": "Spökcykel", + "zh_Hant": "幽靈單車" }, "source": { "osmTags": "memorial=ghost_bike" @@ -17,7 +29,19 @@ "nl": "Witte Fiets", "de": "Geisterrad", "it": "Bici fantasma", - "fr": "Vélo fantôme" + "fr": "Vélo fantôme", + "eo": "Fantombiciklo", + "es": "Bicicleta blanca", + "fi": "Haamupyörä", + "gl": "Bicicleta pantasma", + "hu": "Emlékkerékpár", + "ja": "ゴーストバイク", + "nb_NO": "Spøkelsessykler", + "pl": "Duch roweru", + "pt_BR": "Bicicleta fantasma", + "ru": "Велосипед Ghost", + "sv": "Spökcykel", + "zh_Hant": "幽靈單車" }, "mappings": [ { diff --git a/assets/themes/ghostbikes/ghostbikes.json b/assets/themes/ghostbikes/ghostbikes.json index 7c03c64bb4..229a32751f 100644 --- a/assets/themes/ghostbikes/ghostbikes.json +++ b/assets/themes/ghostbikes/ghostbikes.json @@ -9,7 +9,17 @@ "ja", "nb_NO", "zh_Hant", - "fr" + "fr", + "eo", + "es", + "fi", + "gl", + "hu", + "it", + "pl", + "pt_BR", + "ru", + "sv" ], "title": { "en": "Ghost bikes", @@ -18,7 +28,17 @@ "ja": "ゴーストバイク", "nb_NO": "Spøkelsessykler", "zh_Hant": "幽靈單車", - "fr": "Vélo fantôme" + "fr": "Vélo fantôme", + "eo": "Fantombiciklo", + "es": "Bicicleta blanca", + "fi": "Haamupyörä", + "gl": "Bicicleta pantasma", + "hu": "Emlékkerékpár", + "it": "Bici fantasma", + "pl": "Duch roweru", + "pt_BR": "Bicicleta fantasma", + "ru": "Велосипед Ghost", + "sv": "Spökcykel" }, "description": { "en": "A ghost bike is a memorial for a cyclist who died in a traffic accident, in the form of a white bicycle placed permanently near the accident location.

On this map, one can see all the ghost bikes which are known by OpenStreetMap. Is a ghost bike missing? Everyone can add or update information here - you only need to have a (free) OpenStreetMap account.", diff --git a/langs/layers/eo.json b/langs/layers/eo.json index 0967ef424b..4041ba0b78 100644 --- a/langs/layers/eo.json +++ b/langs/layers/eo.json @@ -1 +1,8 @@ -{} +{ + "ghost_bike": { + "name": "Fantombiciklo", + "title": { + "render": "Fantombiciklo" + } + } +} \ No newline at end of file diff --git a/langs/layers/es.json b/langs/layers/es.json index 8747c0cf2e..2b1005bef4 100644 --- a/langs/layers/es.json +++ b/langs/layers/es.json @@ -112,5 +112,11 @@ "title": { "render": "Desfibrilador" } + }, + "ghost_bike": { + "name": "Bicicleta blanca", + "title": { + "render": "Bicicleta blanca" + } } } \ No newline at end of file diff --git a/langs/layers/fi.json b/langs/layers/fi.json index 241f44de28..3499be2da2 100644 --- a/langs/layers/fi.json +++ b/langs/layers/fi.json @@ -99,5 +99,11 @@ "title": "Pyöräpumppu" } } + }, + "ghost_bike": { + "name": "Haamupyörä", + "title": { + "render": "Haamupyörä" + } } } \ No newline at end of file diff --git a/langs/layers/gl.json b/langs/layers/gl.json index 3a44139385..5a6d58c6d9 100644 --- a/langs/layers/gl.json +++ b/langs/layers/gl.json @@ -378,5 +378,11 @@ "title": { "render": "Auga potábel" } + }, + "ghost_bike": { + "name": "Bicicleta pantasma", + "title": { + "render": "Bicicleta pantasma" + } } } \ No newline at end of file diff --git a/langs/layers/hu.json b/langs/layers/hu.json index 1072d95a73..4ffbf2671c 100644 --- a/langs/layers/hu.json +++ b/langs/layers/hu.json @@ -198,5 +198,11 @@ "title": { "render": "Kerékpáros parkoló" } + }, + "ghost_bike": { + "name": "Emlékkerékpár", + "title": { + "render": "Emlékkerékpár" + } } } \ No newline at end of file diff --git a/langs/layers/ja.json b/langs/layers/ja.json index ebd9e37f8a..24b81b31b4 100644 --- a/langs/layers/ja.json +++ b/langs/layers/ja.json @@ -32,5 +32,11 @@ "question": "お客様が持参容器(調理用の鍋や小さな鍋など)をもってきた場合は、注文の梱包に使用されますか?
" } } + }, + "ghost_bike": { + "name": "ゴーストバイク", + "title": { + "render": "ゴーストバイク" + } } } \ No newline at end of file diff --git a/langs/layers/nb_NO.json b/langs/layers/nb_NO.json index 6b8690f207..12821e8295 100644 --- a/langs/layers/nb_NO.json +++ b/langs/layers/nb_NO.json @@ -118,5 +118,11 @@ "title": { "render": "Ladestasjon" } + }, + "ghost_bike": { + "name": "Spøkelsessykler", + "title": { + "render": "Spøkelsessykler" + } } } \ No newline at end of file diff --git a/langs/layers/pl.json b/langs/layers/pl.json index 56dcb57f29..682a453333 100644 --- a/langs/layers/pl.json +++ b/langs/layers/pl.json @@ -194,5 +194,11 @@ "question": "Czy pompka posiada wskaźnik ciśnienia lub manometr?" } } + }, + "ghost_bike": { + "name": "Duch roweru", + "title": { + "render": "Duch roweru" + } } } \ No newline at end of file diff --git a/langs/layers/pt_BR.json b/langs/layers/pt_BR.json index d129a02172..835527f4b4 100644 --- a/langs/layers/pt_BR.json +++ b/langs/layers/pt_BR.json @@ -537,5 +537,11 @@ }, "render": "Reparo/loja de bicicletas" } + }, + "ghost_bike": { + "name": "Bicicleta fantasma", + "title": { + "render": "Bicicleta fantasma" + } } } \ No newline at end of file diff --git a/langs/layers/ru.json b/langs/layers/ru.json index 621c1beb3b..8993b6f058 100644 --- a/langs/layers/ru.json +++ b/langs/layers/ru.json @@ -616,6 +616,7 @@ } }, "ghost_bike": { + "name": "Велосипед Ghost", "tagRenderings": { "2": { "render": "В знак памяти о {name}" @@ -629,6 +630,9 @@ "5": { "render": "Установлен {start_date}" } + }, + "title": { + "render": "Велосипед Ghost" } }, "information_board": { diff --git a/langs/layers/sv.json b/langs/layers/sv.json index 0967ef424b..1cf6690a81 100644 --- a/langs/layers/sv.json +++ b/langs/layers/sv.json @@ -1 +1,8 @@ -{} +{ + "ghost_bike": { + "name": "Spökcykel", + "title": { + "render": "Spökcykel" + } + } +} \ No newline at end of file diff --git a/langs/layers/zh_Hant.json b/langs/layers/zh_Hant.json index 852a7ac7b0..00df6ac598 100644 --- a/langs/layers/zh_Hant.json +++ b/langs/layers/zh_Hant.json @@ -402,5 +402,11 @@ "title": { "render": "充電站" } + }, + "ghost_bike": { + "name": "幽靈單車", + "title": { + "render": "幽靈單車" + } } } \ No newline at end of file diff --git a/langs/themes/eo.json b/langs/themes/eo.json index 0967ef424b..968beb4986 100644 --- a/langs/themes/eo.json +++ b/langs/themes/eo.json @@ -1 +1,5 @@ -{} +{ + "ghostbikes": { + "title": "Fantombiciklo" + } +} \ No newline at end of file diff --git a/langs/themes/es.json b/langs/themes/es.json index 381884f84d..158b8b000e 100644 --- a/langs/themes/es.json +++ b/langs/themes/es.json @@ -31,6 +31,9 @@ } } }, + "ghostbikes": { + "title": "Bicicleta blanca" + }, "personal": { "description": "Crea una interficie basada en todas las capas disponibles de todas las interficies", "title": "Interficie personal" diff --git a/langs/themes/fi.json b/langs/themes/fi.json index 0967ef424b..62f2d561dc 100644 --- a/langs/themes/fi.json +++ b/langs/themes/fi.json @@ -1 +1,5 @@ -{} +{ + "ghostbikes": { + "title": "Haamupyörä" + } +} \ No newline at end of file diff --git a/langs/themes/gl.json b/langs/themes/gl.json index 145ac7ccda..907a31cae9 100644 --- a/langs/themes/gl.json +++ b/langs/themes/gl.json @@ -3,6 +3,9 @@ "description": "O obxectivo deste mapa é amosar ós ciclistas unha solución doada de empregar para atopar a infraestrutura axeitada para as súas necesidades.

Podes obter a túa localización precisa (só para dispositivos móbiles) e escoller as capas que sexan relevantes para ti na esquina inferior esquerda. Tamén podes empregar esta ferramenta para engadir ou editar puntos de interese ó mapa e fornecer máis datos respondendo as cuestións.

Todas as modificacións que fagas serán gardadas de xeito automático na base de datos global do OpenStreetMap e outros poderán reutilizalos libremente.

Para máis información sobre o proxecto cyclofix, vai a cyclofix.osm.be.", "title": "Cyclofix - Un mapa aberto para os ciclistas" }, + "ghostbikes": { + "title": "Bicicleta pantasma" + }, "personal": { "description": "Crea un tema baseado en todas as capas dispoñíbeis de todos os temas", "title": "Tema personalizado" diff --git a/langs/themes/hu.json b/langs/themes/hu.json index cb8f0fd7ff..202f0811d0 100644 --- a/langs/themes/hu.json +++ b/langs/themes/hu.json @@ -4,5 +4,8 @@ }, "artwork": { "title": "Nyít Műalkotás Térkép" + }, + "ghostbikes": { + "title": "Emlékkerékpár" } } \ No newline at end of file diff --git a/langs/themes/it.json b/langs/themes/it.json index 6dd932c465..e75545c575 100644 --- a/langs/themes/it.json +++ b/langs/themes/it.json @@ -488,6 +488,9 @@ "shortDescription": "Questa mappa mostra i giardini verticali, con foto e informazioni utili sulla loro orientazione, sull'illuminazione solare e sui tipi di piante.", "title": "Giardini verticali" }, + "ghostbikes": { + "title": "Bici fantasma" + }, "hailhydrant": { "layers": { "0": { diff --git a/langs/themes/pl.json b/langs/themes/pl.json index abb25b197d..48289dbab0 100644 --- a/langs/themes/pl.json +++ b/langs/themes/pl.json @@ -6,6 +6,9 @@ "artwork": { "title": "Otwórz mapę dzieł sztuki" }, + "ghostbikes": { + "title": "Duch roweru" + }, "surveillance": { "description": "Na tej otwartej mapie można znaleźć kamery monitoringu.", "shortDescription": "Kamery monitorujące i inne środki nadzoru" diff --git a/langs/themes/pt_BR.json b/langs/themes/pt_BR.json index 0c7c456b2f..56138ae8f3 100644 --- a/langs/themes/pt_BR.json +++ b/langs/themes/pt_BR.json @@ -170,5 +170,8 @@ }, "shortDescription": "Encontre locais para passar a noite com o seu campista", "title": "Locais de acampamento" + }, + "ghostbikes": { + "title": "Bicicleta fantasma" } } \ No newline at end of file diff --git a/langs/themes/ru.json b/langs/themes/ru.json index 180b117e25..e4168c08da 100644 --- a/langs/themes/ru.json +++ b/langs/themes/ru.json @@ -421,6 +421,9 @@ } } }, + "ghostbikes": { + "title": "Велосипед Ghost" + }, "hailhydrant": { "layers": { "0": { diff --git a/langs/themes/sv.json b/langs/themes/sv.json index cfe8d0b841..8c5ac8469c 100644 --- a/langs/themes/sv.json +++ b/langs/themes/sv.json @@ -5,5 +5,8 @@ }, "artwork": { "title": "Öppen konstverkskarta" + }, + "ghostbikes": { + "title": "Spökcykel" } } \ No newline at end of file diff --git a/package.json b/package.json index 31f2aaa7d3..60103264f6 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "main": "index.js", "scripts": { "increase-memory": "export NODE_OPTIONS=--max_old_space_size=4096", - "start": "ts-node scripts/generateLayerOverview.ts --no-fail && npm run increase-memory && parcel *.html UI/** Logic/** assets/*.json assets/svg/* assets/generated/* assets/layers/*/*.svg assets/tagRendering/*.json assets/themes/*/*.svg assets/themes/*/*.png vendor/* vendor/*/*", + "start": "ts-node scripts/generateLayerOverview.ts --no-fail && npm run increase-memory && parcel *.html UI/** Logic/** assets/*.json assets/svg/* assets/generated/* assets/layers/*/*.svg assets/tagRenderings/*.json assets/themes/*/*.svg assets/themes/*/*.png vendor/* vendor/*/*", "test": "ts-node test/TestAll.ts", "init": "npm ci && npm run generate && npm run generate:editor-layer-index && npm run generate:layouts && npm run clean", "add-weblate-upstream": "git remote add weblate-layers https://hosted.weblate.org/git/mapcomplete/layer-translations/ ; git remote update weblate-layers", diff --git a/scripts/generateTranslations.ts b/scripts/generateTranslations.ts index 12dadee55f..f5f59afd81 100644 --- a/scripts/generateTranslations.ts +++ b/scripts/generateTranslations.ts @@ -277,7 +277,12 @@ function loadTranslationFilesFrom(target: string): Map { for (const translationFilePath of translationFilePaths) { let language = translationFilePath.substr(translationFilePath.lastIndexOf("/") + 1) language = language.substr(0, language.length - 5) - translationFiles.set(language, JSON.parse(readFileSync(translationFilePath, "utf8"))) + try{ + translationFiles.set(language, JSON.parse(readFileSync(translationFilePath, "utf8"))) + }catch(e){ + console.error("Invalid JSON file or file does not exist", translationFilePath) + throw e; + } } return translationFiles; }