Fix last untranslated strings, make these errors again

This commit is contained in:
Pieter Vander Vennet 2022-02-16 22:18:58 +01:00
parent 07823087e1
commit b9ff8667a9
5 changed files with 33 additions and 7 deletions

View file

@ -30,7 +30,7 @@ class ValidateLanguageCompleteness extends DesugaringStep<any> {
translations translations
.filter(t => t.tr.translations[neededLanguage] === undefined && t.tr.translations["*"] === undefined) .filter(t => t.tr.translations[neededLanguage] === undefined && t.tr.translations["*"] === undefined)
.forEach(missing => { .forEach(missing => {
errors.push(context + "A theme should be translation-complete for " + neededLanguage + ", but it lacks a translation for " + missing.context + ".\n\tThe english translation is " + missing.tr.textFor('en')) errors.push(context + "A theme should be translation-complete for " + neededLanguage + ", but it lacks a translation for " + missing.context + ".\n\tThe known translation is " + missing.tr.textFor('en'))
}) })
} }
@ -138,10 +138,11 @@ class ValidateTheme extends DesugaringStep<LayoutConfigJson> {
.convert(theme, theme.id) .convert(theme, theme.id)
errors.push(...checked.errors) errors.push(...checked.errors)
} }
if(!json.hideFromOverview){ if(!json.hideFromOverview && theme.id !== "personal"){
// Official, public themes must have a full english translation
const checked = new ValidateLanguageCompleteness("en") const checked = new ValidateLanguageCompleteness("en")
.convert(theme, theme.id) .convert(theme, theme.id)
warnings.push(...checked.errors) errors.push(...checked.errors)
} }
} catch (e) { } catch (e) {

View file

@ -1,6 +1,7 @@
{ {
"id": "birdhide", "id": "birdhide",
"name": { "name": {
"en": "Bird watching places",
"nl": "Vogelkijkhutten" "nl": "Vogelkijkhutten"
}, },
"minzoom": 14, "minzoom": 14,
@ -13,17 +14,18 @@
}, },
"title": { "title": {
"render": { "render": {
"en": "Bird watching place",
"nl": "Vogelkijkplaats" "nl": "Vogelkijkplaats"
}, },
"mappings": [ "mappings": [
{ {
"if": { "if": {
"and": [ "and": [
"name~((V|v)ogel.*).*" "name~(((V|v)ogel)|(B|b)ird).*"
] ]
}, },
"then": { "then": {
"nl": "{name}" "*": "{name}"
} }
}, },
{ {
@ -39,6 +41,7 @@
] ]
}, },
"then": { "then": {
"en": "Bird hide {name}",
"nl": "Vogelkijkhut {name}" "nl": "Vogelkijkhut {name}"
} }
}, },
@ -49,12 +52,14 @@
] ]
}, },
"then": { "then": {
"en": "Bird blind {name}",
"nl": "Vogelkijkwand {name}" "nl": "Vogelkijkwand {name}"
} }
} }
] ]
}, },
"description": { "description": {
"en": "A birdhide",
"nl": "Een vogelkijkhut" "nl": "Een vogelkijkhut"
}, },
"tagRenderings": [ "tagRenderings": [
@ -62,6 +67,7 @@
{ {
"id": "bird-hide-shelter-or-wall", "id": "bird-hide-shelter-or-wall",
"question": { "question": {
"en": "Is this a bird blind or a bird watching shelter?",
"nl": "Is dit een kijkwand of kijkhut?" "nl": "Is dit een kijkwand of kijkhut?"
}, },
"mappings": [ "mappings": [
@ -74,6 +80,7 @@
] ]
}, },
"then": { "then": {
"en": "Bird blind",
"nl": "Vogelkijkwand" "nl": "Vogelkijkwand"
} }
}, },
@ -86,6 +93,7 @@
] ]
}, },
"then": { "then": {
"en": "Bird hide",
"nl": "Vogelkijkhut" "nl": "Vogelkijkhut"
} }
}, },
@ -97,6 +105,7 @@
] ]
}, },
"then": { "then": {
"en": "Bird tower hide",
"nl": "Vogelkijktoren" "nl": "Vogelkijktoren"
} }
}, },
@ -109,6 +118,7 @@
] ]
}, },
"then": { "then": {
"en": "Bird hide shelter",
"nl": "Vogelkijkhut" "nl": "Vogelkijkhut"
}, },
"hideInAnswer": true "hideInAnswer": true
@ -118,6 +128,7 @@
{ {
"id": "bird-hide-wheelchair", "id": "bird-hide-wheelchair",
"question": { "question": {
"en": "Is this bird hide accessible to wheelchair users?",
"nl": "Is deze vogelkijkplaats rolstoeltoegankelijk?" "nl": "Is deze vogelkijkplaats rolstoeltoegankelijk?"
}, },
"mappings": [ "mappings": [
@ -128,6 +139,7 @@
] ]
}, },
"then": { "then": {
"en": "There are special provisions for wheelchair users",
"nl": "Er zijn speciale voorzieningen voor rolstoelen" "nl": "Er zijn speciale voorzieningen voor rolstoelen"
} }
}, },
@ -138,6 +150,7 @@
] ]
}, },
"then": { "then": {
"en": "A wheelchair can easily use this birdhide",
"nl": "Een rolstoel raakt er vlot" "nl": "Een rolstoel raakt er vlot"
} }
}, },
@ -148,6 +161,7 @@
] ]
}, },
"then": { "then": {
"en": "This birdhide is reachable by wheelchair, but it is not easy",
"nl": "Je kan er raken met een rolstoel, maar het is niet makkelijk" "nl": "Je kan er raken met een rolstoel, maar het is niet makkelijk"
} }
}, },
@ -158,6 +172,7 @@
] ]
}, },
"then": { "then": {
"en": "Not accessible to wheelchair users",
"nl": "Niet rolstoeltoegankelijk" "nl": "Niet rolstoeltoegankelijk"
} }
} }
@ -165,24 +180,28 @@
}, },
{ {
"render": { "render": {
"en": "Operated by {operator}",
"nl": "Beheer door {operator}" "nl": "Beheer door {operator}"
}, },
"freeform": { "freeform": {
"key": "operator" "key": "operator"
}, },
"question": { "question": {
"en": "Who operates this birdhide?",
"nl": "Wie beheert deze vogelkijkplaats?" "nl": "Wie beheert deze vogelkijkplaats?"
}, },
"mappings": [ "mappings": [
{ {
"if": "operator=Natuurpunt", "if": "operator=Natuurpunt",
"then": { "then": {
"en": "Operated by Natuurpunt",
"nl": "Beheer door Natuurpunt" "nl": "Beheer door Natuurpunt"
} }
}, },
{ {
"if": "operator=Agentschap Natuur en Bos", "if": "operator=Agentschap Natuur en Bos",
"then": { "then": {
"en": "Operated by the Agency for Nature and Forests",
"nl": "Beheer door het Agentschap Natuur en Bos " "nl": "Beheer door het Agentschap Natuur en Bos "
} }
} }
@ -213,9 +232,11 @@
"amenity=shelter" "amenity=shelter"
], ],
"title": { "title": {
"en": "Birdhide",
"nl": "vogelkijkhut" "nl": "vogelkijkhut"
}, },
"description": { "description": {
"en": "A covered shelter where one can watch birds comfortably",
"nl": "Een overdekte hut waarbinnen er warm en droog naar vogels gekeken kan worden" "nl": "Een overdekte hut waarbinnen er warm en droog naar vogels gekeken kan worden"
} }
}, },
@ -226,9 +247,11 @@
"shelter=no" "shelter=no"
], ],
"title": { "title": {
"en": "Bird blind",
"nl": "vogelkijkwand" "nl": "vogelkijkwand"
}, },
"description": { "description": {
"en": "A screen or wall with openings to watch birds",
"nl": "Een vogelkijkwand waarachter men kan staan om vogels te kijken" "nl": "Een vogelkijkwand waarachter men kan staan om vogels te kijken"
} }
} }
@ -259,6 +282,7 @@
"options": [ "options": [
{ {
"question": { "question": {
"en": "Only covered birdhides",
"nl": "Enkel overdekte kijkhutten" "nl": "Enkel overdekte kijkhutten"
}, },
"osmTags": { "osmTags": {

View file

@ -1,6 +1,7 @@
{ {
"id": "nature_reserve", "id": "nature_reserve",
"name": { "name": {
"en": "Nature reserve",
"nl": "Natuurgebied" "nl": "Natuurgebied"
}, },
"minzoom": 12, "minzoom": 12,
@ -34,7 +35,7 @@
] ]
}, },
"then": { "then": {
"nl": "{name}" "*": "{name}"
} }
} }
] ]

View file

@ -1,6 +1,7 @@
{ {
"id": "parking", "id": "parking",
"name": { "name": {
"en": "Parking",
"nl": "Parking" "nl": "Parking"
}, },
"minzoom": 12, "minzoom": 12,

View file

@ -37,7 +37,6 @@
"startLon": 3.22435, "startLon": 3.22435,
"startZoom": 12, "startZoom": 12,
"widenFactor": 1.2, "widenFactor": 1.2,
"socialImage": "",
"layers": [ "layers": [
"parking" "parking"
] ]