Add the requirement for all tagRendering-objects to have an ID (including rewrites and multi-builtins) to make translations easier

This commit is contained in:
Pieter Vander Vennet 2022-08-05 13:11:50 +02:00
parent af60bc566a
commit 21aca85515
19 changed files with 385 additions and 308 deletions

View file

@ -291,6 +291,7 @@
]
},
{
"id": "rental_types",
"rewrite": {
"sourceString": [
"bicycle_type",

View file

@ -258,6 +258,7 @@
"id": "Rock type (crag/rock/cliff only)"
},
{
"id": "default_climbing_questions",
"builtin": [
"climbing.website",
"climbing.fee",

View file

@ -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",

View file

@ -150,6 +150,7 @@
"id": "hackerspaces-opening_hours"
},
{
"id": "available_devices",
"rewrite": {
"sourceString": [
"device-key",

View file

@ -950,6 +950,7 @@
}
},
{
"id": "contact_information",
"builtin": [
"website",
"email",

View file

@ -134,6 +134,7 @@
"condition": "amenity=university"
},
{
"id": "school-questions",
"builtin": [
"school.capacity",
"school.gender"

View file

@ -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 <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"fr": "Groupe de modifications <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>"
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
"de": "Geändert von <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
"fr": "Modification faite par <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>"
"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>",
"fr": "Modification avec le thème <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>"
"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>",
"fr": "Modification avec le thème <b>non-officiel</b> <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
}
}
]
@ -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": "<b>Not</b> made by contributor {search}"
"en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von {search}",
"fr": "<b>Non</b> réalisé par {search}"
}
}
]
@ -415,7 +441,9 @@
{
"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>"
"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>",
"fr": "Dautres statistiques sont disponibles <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>ici</a>"
}
},
{

View file

@ -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",