diff --git a/Models/ThemeConfig/Json/LayerConfigJson.ts b/Models/ThemeConfig/Json/LayerConfigJson.ts index f7d4fafff6..e464ff3058 100644 --- a/Models/ThemeConfig/Json/LayerConfigJson.ts +++ b/Models/ThemeConfig/Json/LayerConfigJson.ts @@ -288,8 +288,9 @@ export interface LayerConfigJson { tagRenderings?: (string | { builtin: string | string[], override: Partial } + | { id: string, builtin: string[], override: Partial } | QuestionableTagRenderingConfigJson - | RewritableConfigJson<(string | { builtin: string, override: Partial } | QuestionableTagRenderingConfigJson)[]> + | (RewritableConfigJson<(string | { builtin: string, override: Partial } | QuestionableTagRenderingConfigJson)[]> & {id: string}) ) [], diff --git a/assets/layers/bicycle_rental/bicycle_rental.json b/assets/layers/bicycle_rental/bicycle_rental.json index b6326f05cb..9ee81286fb 100644 --- a/assets/layers/bicycle_rental/bicycle_rental.json +++ b/assets/layers/bicycle_rental/bicycle_rental.json @@ -291,6 +291,7 @@ ] }, { + "id": "rental_types", "rewrite": { "sourceString": [ "bicycle_type", diff --git a/assets/layers/climbing_area/climbing_area.json b/assets/layers/climbing_area/climbing_area.json index ffa386cbbc..200cbd670b 100644 --- a/assets/layers/climbing_area/climbing_area.json +++ b/assets/layers/climbing_area/climbing_area.json @@ -258,6 +258,7 @@ "id": "Rock type (crag/rock/cliff only)" }, { + "id": "default_climbing_questions", "builtin": [ "climbing.website", "climbing.fee", diff --git a/assets/layers/climbing_gym/climbing_gym.json b/assets/layers/climbing_gym/climbing_gym.json index 74976727fd..9493112983 100644 --- a/assets/layers/climbing_gym/climbing_gym.json +++ b/assets/layers/climbing_gym/climbing_gym.json @@ -74,12 +74,11 @@ "phone", "email", { - "builtin": [ - "climbing.fee" - ] + "builtin": "climbing.fee" }, "opening_hours", { + "id": "climbing_gym_questions", "builtin": [ "climbing.average_length", "climbing.min_difficulty", diff --git a/assets/layers/hackerspace/hackerspace.json b/assets/layers/hackerspace/hackerspace.json index 5ff688966f..921e43f4cb 100644 --- a/assets/layers/hackerspace/hackerspace.json +++ b/assets/layers/hackerspace/hackerspace.json @@ -150,6 +150,7 @@ "id": "hackerspaces-opening_hours" }, { + "id": "available_devices", "rewrite": { "sourceString": [ "device-key", diff --git a/assets/layers/recycling/recycling.json b/assets/layers/recycling/recycling.json index 8629eed982..ad4dcac7aa 100644 --- a/assets/layers/recycling/recycling.json +++ b/assets/layers/recycling/recycling.json @@ -950,6 +950,7 @@ } }, { + "id": "contact_information", "builtin": [ "website", "email", diff --git a/assets/layers/tertiary_education/tertiary_education.json b/assets/layers/tertiary_education/tertiary_education.json index 86ee85a596..f8e9715deb 100644 --- a/assets/layers/tertiary_education/tertiary_education.json +++ b/assets/layers/tertiary_education/tertiary_education.json @@ -134,6 +134,7 @@ "condition": "amenity=university" }, { + "id": "school-questions", "builtin": [ "school.capacity", "school.gender" diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 102c5b3e2f..41ef55fb2c 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,13 +1,19 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete" + "en": "Changes made with MapComplete", + "de": "Mit MapComplete vorgenommene Änderungen", + "fr": "Changements faits avec MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete" + "en": "Shows changes made by MapComplete", + "de": "Zeigt die mit MapComplete vorgenommenen Änderungen", + "fr": "Montrer les changements faits avec MapComplete" }, "description": { - "en": "This maps shows all the changes made with MapComplete" + "en": "This maps shows all the changes made with MapComplete", + "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen", + "fr": "Cette carte affiche toutes les modifications réalisées avec MapComplete" }, "maintainer": "", "icon": "./assets/svg/logo.svg", @@ -22,7 +28,9 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers" + "en": "Changeset centers", + "de": "Zentrum der Änderungssätze", + "fr": "Centre du groupe de modifications" }, "minzoom": 0, "source": { @@ -36,35 +44,47 @@ ], "title": { "render": { - "en": "Changeset for {theme}" + "en": "Changeset for {theme}", + "de": "Änderungssatz für {theme}", + "fr": "Groupe de modifications pour {theme}" } }, "description": { - "en": "Shows all MapComplete changes" + "en": "Shows all MapComplete changes", + "de": "Zeigt alle MapComplete Änderungen", + "fr": "Afficher toutes les modifications MapComplete" }, "tagRenderings": [ { "id": "render_id", "render": { - "en": "Changeset {id}" + "en": "Changeset {id}", + "de": "Änderungssatz {id}", + "fr": "Groupe de modifications {id}" } }, { "id": "contributor", "render": { - "en": "Change made by {_last_edit:contributor}" + "en": "Change made by {_last_edit:contributor}", + "de": "Geändert von {_last_edit:contributor}", + "fr": "Modification faite par {_last_edit:contributor}" } }, { "id": "theme", "render": { - "en": "Change with theme {theme}" + "en": "Change with theme {theme}", + "de": "Änderung mit Thema {theme}", + "fr": "Modification avec le thème {theme}" }, "mappings": [ { "if": "theme~http.*", "then": { - "en": "Change with unofficial theme {theme}" + "en": "Change with unofficial theme {theme}", + "de": "Änderung mit inoffiziellem Thema {theme}", + "fr": "Modification avec le thème non-officiel {theme}" } } ] @@ -368,7 +388,9 @@ } ], "question": { - "en": "Themename contains {search}" + "en": "Themename contains {search}", + "de": "Themenname enthält {search}", + "fr": "Nom de thème contenant {search}" } } ] @@ -384,7 +406,9 @@ } ], "question": { - "en": "Made by contributor {search}" + "en": "Made by contributor {search}", + "de": "Erstellt von {search}", + "fr": "Réalisé par {search}" } } ] @@ -400,7 +424,9 @@ } ], "question": { - "en": "Not made by contributor {search}" + "en": "Not made by contributor {search}", + "de": "Nicht erstellt von {search}", + "fr": "Non réalisé par {search}" } } ] @@ -415,7 +441,9 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here" + "en": "More statistics can be found here", + "de": "Weitere Statistiken finden Sie hier", + "fr": "D’autres statistiques sont disponibles ici" } }, { diff --git a/assets/themes/sidewalks/sidewalks.json b/assets/themes/sidewalks/sidewalks.json index fcdf9349a3..51737a1a6a 100644 --- a/assets/themes/sidewalks/sidewalks.json +++ b/assets/themes/sidewalks/sidewalks.json @@ -97,6 +97,7 @@ } }, { + "id": "left-right-questions", "rewrite": { "sourceString": [ "left|right" @@ -117,26 +118,38 @@ }, { "id": "has_sidewalk_left|right", - "question": "Is there a sidewalk on this side of the road?", + "question": { + "en": "Is there a sidewalk on this side of the road?" + }, "mappings": [ { "if": "sidewalk:left|right=yes", - "then": "Yes, there is a sidewalk on this side of the road" + "then": { + "en": "Yes, there is a sidewalk on this side of the road" + } }, { "if": "sidewalk:left|right=no", - "then": "No, there is no sidewalk to walk on" + "then": { + "en": "No, there is no sidewalk to walk on" + } }, { "if": "sidewalk:left|right=separate", - "then": "There is a separately mapped sidewalk to walk on" + "then": { + "en": "There is a separately mapped sidewalk to walk on" + } } ] }, { "id": "sidewalk_width_left|right", - "question": "What is the width of the sidewalk on this side of the road?", - "render": "This sidewalk is {sidewalk:left|right:width}m wide", + "question": { + "en": "What is the width of the sidewalk on this side of the road?" + }, + "render": { + "en": "This sidewalk is {sidewalk:left|right:width}m wide" + }, "condition": "sidewalk:left|right=yes", "freeform": { "key": "sidewalk:left|right:width", diff --git a/langs/layers/ca.json b/langs/layers/ca.json index 33d3729c13..8cf1643f7e 100644 --- a/langs/layers/ca.json +++ b/langs/layers/ca.json @@ -178,7 +178,7 @@ }, "bicycle_rental": { "tagRenderings": { - "9": { + "rental_types": { "rewrite": { "into": { "4": { diff --git a/langs/layers/da.json b/langs/layers/da.json index e0a890e81c..feced7c1d4 100644 --- a/langs/layers/da.json +++ b/langs/layers/da.json @@ -379,33 +379,6 @@ } }, "tagRenderings": { - "9": { - "rewrite": { - "into": { - "0": { - "1": "bycykler" - }, - "1": { - "1": "elektriske cykler" - }, - "2": { - "1": "børnecykler" - }, - "3": { - "1": "BMX-cykler" - }, - "4": { - "1": "mountainbike" - }, - "5": { - "1": "cykeltasker" - }, - "6": { - "1": "tandem" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -446,6 +419,33 @@ } }, "question": "Hvilken slags cykeludlejning er dette?" + }, + "rental_types": { + "rewrite": { + "into": { + "0": { + "1": "bycykler" + }, + "1": { + "1": "elektriske cykler" + }, + "2": { + "1": "børnecykler" + }, + "3": { + "1": "BMX-cykler" + }, + "4": { + "1": "mountainbike" + }, + "5": { + "1": "cykeltasker" + }, + "6": { + "1": "tandem" + } + } + } } }, "title": { diff --git a/langs/layers/de.json b/langs/layers/de.json index 1bc4bf37e4..bad87f9836 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -442,39 +442,6 @@ } }, "tagRenderings": { - "9": { - "renderings": { - "0": { - "question": "Wie viele type_plural können hier gemietet werden?", - "render": "{capacity:bicycle_type} type_plural können hier gemietet werden" - } - }, - "rewrite": { - "into": { - "0": { - "1": "Stadträder" - }, - "1": { - "1": "Elektrofahrräder" - }, - "2": { - "1": "Kinderfahrräder" - }, - "3": { - "1": "BMX-Räder" - }, - "4": { - "1": "Mountainbikes" - }, - "5": { - "1": "Fahrradtaschen" - }, - "6": { - "1": "Tandems" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -527,6 +494,39 @@ } }, "question": "Was ist das für ein Fahrradverleih?" + }, + "rental_types": { + "renderings": { + "0": { + "question": "Wie viele type_plural können hier gemietet werden?", + "render": "{capacity:bicycle_type} type_plural können hier gemietet werden" + } + }, + "rewrite": { + "into": { + "0": { + "1": "Stadträder" + }, + "1": { + "1": "Elektrofahrräder" + }, + "2": { + "1": "Kinderfahrräder" + }, + "3": { + "1": "BMX-Räder" + }, + "4": { + "1": "Mountainbikes" + }, + "5": { + "1": "Fahrradtaschen" + }, + "6": { + "1": "Tandems" + } + } + } } }, "title": { @@ -4069,7 +4069,7 @@ } }, "tagRenderings": { - "6": { + "available_devices": { "renderings": { "0": { "mappings": { @@ -4399,11 +4399,6 @@ } }, "tagRenderings": { - "5": { - "override": { - "question": "Wann ist diese Kinderbetreuung geöffnet?" - } - }, "capacity": { "question": "Wie viele Kinder können hier maximal angemeldet werden?", "render": "Diese Einrichtung bietet Platz für {capacity} Kinder" @@ -4422,6 +4417,11 @@ "name": { "question": "Wie lautet der Name dieser Einrichtung?", "render": "Diese Einrichtung hat den Namen {name}" + }, + "opening_hours": { + "override": { + "question": "Wann ist diese Kinderbetreuung geöffnet?" + } } }, "title": { @@ -5655,16 +5655,6 @@ } }, "tagRenderings": { - "8": { - "override": { - "+mappings": { - "0": { - "then": "Die Unterrichtssprache der Schule ist unbekannt" - } - }, - "question": "Was ist die Hauptsprache dieser Schule?
Welche Sprache wird mit den Schülern in den nicht sprachbezogenen Kursen und mit der Verwaltung gesprochen?
" - } - }, "capacity": { "question": "Wie viele Schüler können sich maximal an dieser Schule anmelden?", "render": "Diese Schule kann höchstens {capacity} Schüler aufnehmen" @@ -5748,6 +5738,16 @@ }, "question": "Richtet sich diese Schule an Schüler mit besonderem Förderbedarf? Über welche strukturellen Einrichtungen verfügt diese Schule?
Ad-hoc ", "render": "Diese Schule verfügt über Einrichtungen für Schüler mit {school:for}" + }, + "wikidata.school-language": { + "override": { + "+mappings": { + "0": { + "then": "Die Unterrichtssprache der Schule ist unbekannt" + } + }, + "question": "Was ist die Hauptsprache dieser Schule?
Welche Sprache wird mit den Schülern in den nicht sprachbezogenen Kursen und mit der Verwaltung gesprochen?
" + } } }, "title": { @@ -5834,12 +5834,6 @@ } }, "tagRenderings": { - "2": { - "override": { - "question": "Um was für ein Geschäft handelt es sich?", - "render": "Das ist ein {shop}" - } - }, "copyshop-print-sizes": { "mappings": { "0": { @@ -5860,6 +5854,12 @@ }, "question": "Welche Papierformate bietet das Geschäft an?" }, + "id_presets.shop_types": { + "override": { + "question": "Um was für ein Geschäft handelt es sich?", + "render": "Das ist ein {shop}" + } + }, "shops-name": { "question": "Wie ist der Name dieses Geschäfts?", "render": "Der Name des Geschäfts lautet {name}" diff --git a/langs/layers/en.json b/langs/layers/en.json index 2babb45d4e..cb37165884 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -442,39 +442,6 @@ } }, "tagRenderings": { - "9": { - "renderings": { - "0": { - "question": "How much type_plural can be rented here?", - "render": "{capacity:bicycle_type} type_plural can be rented here" - } - }, - "rewrite": { - "into": { - "0": { - "1": "city bikes" - }, - "1": { - "1": "electrical bikes" - }, - "2": { - "1": "bikes for children" - }, - "3": { - "1": "BMX bikes" - }, - "4": { - "1": "mountainbike" - }, - "5": { - "1": "bicycle panniers" - }, - "6": { - "1": "tandem" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -527,6 +494,39 @@ } }, "question": "What kind of bicycle rental is this?" + }, + "rental_types": { + "renderings": { + "0": { + "question": "How much type_plural can be rented here?", + "render": "{capacity:bicycle_type} type_plural can be rented here" + } + }, + "rewrite": { + "into": { + "0": { + "1": "city bikes" + }, + "1": { + "1": "electrical bikes" + }, + "2": { + "1": "bikes for children" + }, + "3": { + "1": "BMX bikes" + }, + "4": { + "1": "mountainbike" + }, + "5": { + "1": "bicycle panniers" + }, + "6": { + "1": "tandem" + } + } + } } }, "title": { @@ -4069,7 +4069,7 @@ } }, "tagRenderings": { - "6": { + "available_devices": { "renderings": { "0": { "mappings": { @@ -4399,11 +4399,6 @@ } }, "tagRenderings": { - "5": { - "override": { - "question": "When is this childcare opened?" - } - }, "capacity": { "question": "How much kids (at most) can be enrolled here?", "render": "This facility has room for {capacity} kids" @@ -4422,6 +4417,11 @@ "name": { "question": "What is the name of this facility?", "render": "This facility is named {name}" + }, + "opening_hours": { + "override": { + "question": "When is this childcare opened?" + } } }, "title": { @@ -5655,16 +5655,6 @@ } }, "tagRenderings": { - "8": { - "override": { - "+mappings": { - "0": { - "then": "The main language of this school is unknown" - } - }, - "question": "What is the main language of this school?
What language is spoken with the students in non-language related courses and with the administration?
" - } - }, "capacity": { "question": "How much students can at most enroll in this school?", "render": "This school can enroll at most {capacity} students" @@ -5748,6 +5738,16 @@ }, "question": "Does this school target students with a special need? Which structural facilities does this school have?
Ad-hoc ", "render": "This school has facilities for students with {school:for}" + }, + "wikidata.school-language": { + "override": { + "+mappings": { + "0": { + "then": "The main language of this school is unknown" + } + }, + "question": "What is the main language of this school?
What language is spoken with the students in non-language related courses and with the administration?
" + } } }, "title": { @@ -5834,12 +5834,6 @@ } }, "tagRenderings": { - "2": { - "override": { - "question": "What kind of shop is this?", - "render": "This is a {shop}" - } - }, "copyshop-print-sizes": { "mappings": { "0": { @@ -5860,6 +5854,12 @@ }, "question": "What paper formats does this shop offer?" }, + "id_presets.shop_types": { + "override": { + "question": "What kind of shop is this?", + "render": "This is a {shop}" + } + }, "shops-name": { "question": "What is the name of this shop?", "render": "This shop is called {name}" diff --git a/langs/layers/eo.json b/langs/layers/eo.json index d54483fcef..383465ab3c 100644 --- a/langs/layers/eo.json +++ b/langs/layers/eo.json @@ -75,7 +75,7 @@ }, "bicycle_rental": { "tagRenderings": { - "9": { + "rental_types": { "rewrite": { "into": { "0": { diff --git a/langs/layers/es.json b/langs/layers/es.json index 3f34bd0e15..9f45a974af 100644 --- a/langs/layers/es.json +++ b/langs/layers/es.json @@ -442,33 +442,6 @@ } }, "tagRenderings": { - "9": { - "rewrite": { - "into": { - "0": { - "1": "bicis de ciudad" - }, - "1": { - "1": "bicis eléctricas" - }, - "2": { - "1": "bicis infantiles" - }, - "3": { - "1": "bicis BMX" - }, - "4": { - "1": "bicis de montaña" - }, - "5": { - "1": "alforjas de bicicleta" - }, - "6": { - "1": "tándem" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -521,6 +494,33 @@ } }, "question": "¿Qué tipo de alquiler de bicicletas es este?" + }, + "rental_types": { + "rewrite": { + "into": { + "0": { + "1": "bicis de ciudad" + }, + "1": { + "1": "bicis eléctricas" + }, + "2": { + "1": "bicis infantiles" + }, + "3": { + "1": "bicis BMX" + }, + "4": { + "1": "bicis de montaña" + }, + "5": { + "1": "alforjas de bicicleta" + }, + "6": { + "1": "tándem" + } + } + } } }, "title": { diff --git a/langs/layers/fr.json b/langs/layers/fr.json index 2df228964f..9416f23783 100644 --- a/langs/layers/fr.json +++ b/langs/layers/fr.json @@ -442,39 +442,6 @@ } }, "tagRenderings": { - "9": { - "renderings": { - "0": { - "question": "Combien de type_plural peuvent être loués ici ?", - "render": "{capacity:bicycle_type} type_plural peuvent être loués ici" - } - }, - "rewrite": { - "into": { - "0": { - "1": "vélos de ville" - }, - "1": { - "1": "vélos électriques" - }, - "2": { - "1": "vélos d'enfants" - }, - "3": { - "1": "BMX" - }, - "4": { - "1": "vélos de montagne" - }, - "5": { - "1": "sacoches pour vélo" - }, - "6": { - "1": "tandem" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -527,6 +494,39 @@ } }, "question": "De quel type de location de vélo s'agit-il ?" + }, + "rental_types": { + "renderings": { + "0": { + "question": "Combien de type_plural peuvent être loués ici ?", + "render": "{capacity:bicycle_type} type_plural peuvent être loués ici" + } + }, + "rewrite": { + "into": { + "0": { + "1": "vélos de ville" + }, + "1": { + "1": "vélos électriques" + }, + "2": { + "1": "vélos d'enfants" + }, + "3": { + "1": "BMX" + }, + "4": { + "1": "vélos de montagne" + }, + "5": { + "1": "sacoches pour vélo" + }, + "6": { + "1": "tandem" + } + } + } } }, "title": { @@ -3512,16 +3512,6 @@ } }, "tagRenderings": { - "8": { - "override": { - "+mappings": { - "0": { - "then": "La langue principale de cette école est inconnue" - } - }, - "question": "Quelle est la langue principale de cette école ?
Quelle langue est parlée avec les élèves des cours non linguistiques et avec l'administration ?
" - } - }, "capacity": { "question": "Combien d'élèves peuvent s'inscrire au maximum dans cette école ?", "render": "Cette école peut accueillir au maximum {capacity} étudiants" @@ -3605,6 +3595,16 @@ }, "question": "Est-ce que cet établissement scolaire s'adresse aux étudiants ayant des besoins particuliers? Quels types d'installation est-ce que cet établissement possède?
Ad-hoc ", "render": "Cet établissement scolaire a des installations pour étudiants ayant {school:for}" + }, + "wikidata.school-language": { + "override": { + "+mappings": { + "0": { + "then": "La langue principale de cette école est inconnue" + } + }, + "question": "Quelle est la langue principale de cette école ?
Quelle langue est parlée avec les élèves des cours non linguistiques et avec l'administration ?
" + } } }, "title": { @@ -3658,12 +3658,6 @@ } }, "tagRenderings": { - "2": { - "override": { - "question": "Quel genre de magasin est-ce?", - "render": "C'est une {shop}" - } - }, "copyshop-print-sizes": { "mappings": { "0": { @@ -3684,6 +3678,12 @@ }, "question": "Quels formats de papier cette boutique propose-t-elle ?" }, + "id_presets.shop_types": { + "override": { + "question": "Quel genre de magasin est-ce?", + "render": "C'est une {shop}" + } + }, "shops-name": { "question": "Qu'est-ce que le nom de ce magasin ?" } diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 878731683f..5e0a2b62bc 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -442,39 +442,6 @@ } }, "tagRenderings": { - "9": { - "renderings": { - "0": { - "question": "Hoeveel type_plural kunnen hier uitgeleend worden?", - "render": "{capacity:bicycle_type} type_plural kunnen hier uitgeleend worden" - } - }, - "rewrite": { - "into": { - "0": { - "1": "stadsfietsen" - }, - "1": { - "1": "elektrische fietsen" - }, - "2": { - "1": "kinderfietsen" - }, - "3": { - "1": "BMX-fietsen" - }, - "4": { - "1": "mountainbike" - }, - "5": { - "1": "fietstassen" - }, - "6": { - "1": "tandem" - } - } - } - }, "bicycle-types": { "mappings": { "0": { @@ -527,6 +494,39 @@ } }, "question": "Wat voor fietsverhuur is dit?" + }, + "rental_types": { + "renderings": { + "0": { + "question": "Hoeveel type_plural kunnen hier uitgeleend worden?", + "render": "{capacity:bicycle_type} type_plural kunnen hier uitgeleend worden" + } + }, + "rewrite": { + "into": { + "0": { + "1": "stadsfietsen" + }, + "1": { + "1": "elektrische fietsen" + }, + "2": { + "1": "kinderfietsen" + }, + "3": { + "1": "BMX-fietsen" + }, + "4": { + "1": "mountainbike" + }, + "5": { + "1": "fietstassen" + }, + "6": { + "1": "tandem" + } + } + } } }, "title": { @@ -4021,7 +4021,7 @@ } }, "tagRenderings": { - "6": { + "available_devices": { "renderings": { "0": { "mappings": { @@ -4322,11 +4322,6 @@ } }, "tagRenderings": { - "5": { - "override": { - "question": "Wanneer is deze kinderopvang geopend?" - } - }, "capacity": { "question": "Hoeveel kinderen kunnen hier terecht?", "render": "Hier kunnen {capacity} kinderen terecht" @@ -4341,6 +4336,11 @@ } }, "question": "Wat voor faciliteit is dit?" + }, + "opening_hours": { + "override": { + "question": "Wanneer is deze kinderopvang geopend?" + } } }, "title": { @@ -5381,16 +5381,6 @@ } }, "tagRenderings": { - "8": { - "override": { - "+mappings": { - "0": { - "then": "De voertaal van deze school is niet gekend" - } - }, - "question": "Wat is de voertaal van deze school?
Welke taal wordt met de studenten gesproken in niet-taal-gerelateerde vakken en met de administratie?
" - } - }, "capacity": { "question": "Ten hoogste hoeveel studenten kunnen er les volgen in deze school?", "render": "Deze school kan maximaal {capacity} studenten lesgeven" @@ -5474,6 +5464,16 @@ }, "question": "Richt deze school zich op leerlingen met een speciale zorgbehoefte? Welke structurele faciliteiten heeft deze school voor leerlingen met een extra zorgbehoefte?
Ad-hoc maatregelen zijn niet voldoende
", "render": "Deze school richt zich op studenten met {school:for}" + }, + "wikidata.school-language": { + "override": { + "+mappings": { + "0": { + "then": "De voertaal van deze school is niet gekend" + } + }, + "question": "Wat is de voertaal van deze school?
Welke taal wordt met de studenten gesproken in niet-taal-gerelateerde vakken en met de administratie?
" + } } }, "title": { @@ -5527,12 +5527,6 @@ } }, "tagRenderings": { - "2": { - "override": { - "question": "Wat voor soort winkel is dit?", - "render": "Dit is een {shop}" - } - }, "copyshop-print-sizes": { "mappings": { "0": { @@ -5553,6 +5547,12 @@ }, "question": "Op welke papiergroottes kan deze zaak printen?" }, + "id_presets.shop_types": { + "override": { + "question": "Wat voor soort winkel is dit?", + "render": "Dit is een {shop}" + } + }, "shops-name": { "question": "Wat is de naam van deze winkel?", "render": "Deze zaak heet {name}" diff --git a/langs/themes/en.json b/langs/themes/en.json index eaa904bdf3..b69461ddd5 100644 --- a/langs/themes/en.json +++ b/langs/themes/en.json @@ -953,6 +953,28 @@ "description": "Layer showing sidewalks of highways", "name": "Sidewalks", "tagRenderings": { + "left-right-questions": { + "renderings": { + "1": { + "mappings": { + "0": { + "then": "Yes, there is a sidewalk on this side of the road" + }, + "1": { + "then": "No, there is no sidewalk to walk on" + }, + "2": { + "then": "There is a separately mapped sidewalk to walk on" + } + }, + "question": "Is there a sidewalk on this side of the road?" + }, + "2": { + "question": "What is the width of the sidewalk on this side of the road?", + "render": "This sidewalk is {sidewalk:left|right:width}m wide" + } + } + }, "streetname": { "render": "This street is named {name}" } diff --git a/scripts/generateTranslations.ts b/scripts/generateTranslations.ts index 50fce6e6b5..a6de47c759 100644 --- a/scripts/generateTranslations.ts +++ b/scripts/generateTranslations.ts @@ -55,7 +55,7 @@ class TranslationPart { } const v = translations[translationsKey] if (typeof (v) != "string") { - console.error(`Non-string object at ${context} in translation while trying to add more translations to '` + translationsKey + "'. The offending object which _should_ be a translation is: ", v,"\n\nThe current object is:", this.toJson("en")) + console.error(`Non-string object at ${context} in translation while trying to add more translations to '` + translationsKey + "'. The offending object which _should_ be a translation is: ", v, "\n\nThe current object is:", this.toJson("en")) throw "Error in an object depicting a translation: a non-string object was found. (" + context + ")\n You probably put some other section accidentally in the translation" } this.contents.set(translationsKey, v) @@ -100,25 +100,34 @@ class TranslationPart { console.warn("Got a null value for key ", key) continue } + if (typeof v !== "object") { + continue; + } - if (v["id"] !== undefined && context.endsWith(".tagRenderings")) { - // We use the embedded id as key instead of the index as this is more stable - // Note: indonesian is shortened as 'id' as well! - if (v["en"] !== undefined || v["nl"] !== undefined) { - // This is probably a translation already! - // pass + if (context.endsWith(".tagRenderings")) { + if (v["id"] === undefined) { + if (v["builtin"] !== undefined && typeof v["builtin"] === "string") { + key = v["builtin"] + } else { + throw "At " + context + ": every object within a tagRenderings-list should have an id. " + JSON.stringify(v) + " has no id" + } } else { - key = v["id"] - if (typeof key !== "string") { - throw "Panic: found a non-string ID at" + context + // We use the embedded id as key instead of the index as this is more stable + // Note: indonesian is shortened as 'id' as well! + if (v["en"] !== undefined || v["nl"] !== undefined) { + // This is probably a translation already! + // pass + } else { + + key = v["id"] + if (typeof key !== "string") { + throw "Panic: found a non-string ID at" + context + } } } } - if (typeof v !== "object") { - continue; - } if (!this.contents.get(key)) { this.contents.set(key, new TranslationPart()) @@ -591,7 +600,7 @@ function mergeThemeTranslations() { } } -if(!existsSync("./langs/themes")){ +if (!existsSync("./langs/themes")) { mkdirSync("./langs/themes") } const themeOverwritesWeblate = process.argv[2] === "--ignore-weblate"