Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2020-10-25 20:50:36 +01:00
commit 62c4f0a928
8 changed files with 312 additions and 47 deletions

View file

@ -16,7 +16,7 @@ export class PersonalLayout extends Layout {
0, 0,
Translations.t.favourite.description, Translations.t.favourite.description,
); );
this.maintainer = "MapComplete"
this.description = "The personal theme allows to select one or more layers from all the layouts, creating a truly personal editor" this.description = "The personal theme allows to select one or more layers from all the layouts, creating a truly personal editor"
this.icon = "./assets/add.svg" this.icon = "./assets/add.svg"
} }

View file

@ -23,7 +23,7 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
private readonly _question: string | Translation; private readonly _question: string | Translation;
private readonly _mapping: { k: TagsFilter, txt: string | Translation, priority?: number }[]; private readonly _mapping: { k: TagsFilter, txt: string | Translation }[];
private readonly currentTags: UIEventSource<any>; private readonly currentTags: UIEventSource<any>;
@ -68,12 +68,17 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
}, },
tagsPreprocessor?: ((tags: any) => any), tagsPreprocessor?: ((tags: any) => any),
multiAnswer?: boolean, multiAnswer?: boolean,
mappings?: { k: TagsFilter, txt: string | Translation, priority?: number, substitute?: boolean, hideInAnswer?: boolean }[] mappings?: { k: TagsFilter, txt: string | Translation, substitute?: boolean, hideInAnswer?: boolean }[]
}) { }) {
super(tags); super(tags);
if (tags === undefined) { if (tags === undefined) {
throw "No tags given for a tagrendering..." throw "No tags given for a tagrendering..."
} }
if (options.question !== undefined) {
if ((options.mappings?.length ?? 0) === 0 && options.freeform.key === undefined) {
throw "Error: question without mappings or key"
}
}
this.ListenTo(Locale.language); this.ListenTo(Locale.language);
this.ListenTo(this._editMode); this.ListenTo(this._editMode);
this.ListenTo(this._questionSkipped); this.ListenTo(this._questionSkipped);
@ -83,7 +88,7 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
this.currentTags = tags.map(tags => { this.currentTags = tags.map(tags => {
if (options.tagsPreprocessor === undefined) { if (options.tagsPreprocessor === undefined) {
return tags; return tags;
} }
// we clone the tags... // we clone the tags...
@ -111,7 +116,6 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
let choiceSubbed = { let choiceSubbed = {
k: choice.k?.substituteValues(this.currentTags.data), k: choice.k?.substituteValues(this.currentTags.data),
txt: choice.txt, txt: choice.txt,
priority: choice.priority
} }
@ -202,7 +206,7 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
extraTags?: TagsFilter, extraTags?: TagsFilter,
}, },
multiAnswer?: boolean, multiAnswer?: boolean,
mappings?: { k: TagsFilter, txt: string | Translation, priority?: number, substitute?: boolean, hideInAnswer?: boolean }[] mappings?: { k: TagsFilter, txt: string | Translation, substitute?: boolean, hideInAnswer?: boolean }[]
}): }):
InputElement<TagsFilter> { InputElement<TagsFilter> {

View file

@ -123,16 +123,22 @@ export default class Translations {
dontDelete: new T({ dontDelete: new T({
"nl":"Terug", "nl":"Terug",
"en":"Cancel", "en":"Cancel",
"ca":"Cancel·lar",
"es":"Cancelar",
"de": "Abbrechen" "de": "Abbrechen"
}), }),
doDelete: new T({ doDelete: new T({
"nl":"Verwijder afbeelding", "nl":"Verwijder afbeelding",
"en":"Remove image", "en":"Remove image",
"ca":"Esborrar imatge",
"es":"Borrar imagen",
"de": "Bild entfernen" "de": "Bild entfernen"
}), }),
isDeleted: new T({ isDeleted: new T({
"nl":"Verwijderd", "nl":"Verwijderd",
"en":"Deleted", "en":"Deleted",
"ca":"Esborrada",
"es":"Borrada",
"de": "Gelöscht" "de": "Gelöscht"
}) })
}, },
@ -382,12 +388,16 @@ export default class Translations {
}), }),
openLayerControl: new T({ openLayerControl: new T({
"en": "Open the layer control box", "en": "Open the layer control box",
"ca": "Obrir el control de capes",
"es": "Abrir el control de capas",
"nl": "Open de laag-instellingen", "nl": "Open de laag-instellingen",
"de": "Das Ebenen-Kontrollkästchen öffnen" "de": "Das Ebenen-Kontrollkästchen öffnen"
}) })
, ,
layerNotEnabled: new T({ layerNotEnabled: new T({
"en": "The layer {layer} is not enabled. Enable this layer to add a point", "en": "The layer {layer} is not enabled. Enable this layer to add a point",
"ca": "La capa {layer} no està habilitada. Fes-ho per poder afegir un punt a aquesta capa",
"es": "La capa {layer} no está habilitada. Hazlo para poder añadir un punto en esta capa",
"nl": "De laag {layer} is gedeactiveerd. Activeer deze om een punt toe te voegn", "nl": "De laag {layer} is gedeactiveerd. Activeer deze om een punt toe te voegn",
"de": "Die Ebene {layer} ist nicht aktiviert. Aktivieren Sie diese Ebene, um einen Punkt hinzuzufügen" "de": "Die Ebene {layer} ist nicht aktiviert. Aktivieren Sie diese Ebene, um einen Punkt hinzuzufügen"
}) })
@ -573,48 +583,64 @@ export default class Translations {
}), }),
copiedToClipboard: new T({ copiedToClipboard: new T({
en: "Link copied to clipboard", en: "Link copied to clipboard",
ca: "Enllaç copiat al portapapers",
es: "Enlace copiado en el portapapeles",
gl: "Ligazón copiada ó portapapeis", gl: "Ligazón copiada ó portapapeis",
nl: "Link gekopieerd naar klembord", nl: "Link gekopieerd naar klembord",
de: "Link in die Zwischenablage kopiert" de: "Link in die Zwischenablage kopiert"
}), }),
thanksForSharing: new T({ thanksForSharing: new T({
en: "Thanks for sharing!", en: "Thanks for sharing!",
ca: "Gràcies per compartir",
es: "Gracias por compartir",
gl: "Grazas por compartir!", gl: "Grazas por compartir!",
nl: "Bedankt om te delen!", nl: "Bedankt om te delen!",
de: "Danke für das Teilen!" de: "Danke für das Teilen!"
}), }),
editThisTheme: new T({ editThisTheme: new T({
en: "Edit this theme", en: "Edit this theme",
ca: "Editar aquest repte",
es: "Editar este reto",
gl: "Editar este tema", gl: "Editar este tema",
nl: "Pas dit thema aan", nl: "Pas dit thema aan",
de: "Dieses Thema bearbeiten" de: "Dieses Thema bearbeiten"
}), }),
editThemeDescription: new T({ editThemeDescription: new T({
en: "Add or change questions to this map theme", en: "Add or change questions to this map theme",
ca: "Afegir o canviar preguntes d'aquest repte",
es: "Añadir o cambiar preguntas de este reto",
gl: "Engadir ou mudar preguntas a este tema do mapa", gl: "Engadir ou mudar preguntas a este tema do mapa",
nl: "Pas vragen aan of voeg vragen toe aan dit kaartthema", nl: "Pas vragen aan of voeg vragen toe aan dit kaartthema",
de: "Fragen zu diesem Kartenthema hinzufügen oder ändern" de: "Fragen zu diesem Kartenthema hinzufügen oder ändern"
}), }),
fsUserbadge: new T({ fsUserbadge: new T({
en: "Enable the login-button", en: "Enable the login-button",
ca: "Activar el botó d'entrada",
es: "Activar el botón de entrada",
gl: "Activar botón de inicio de sesión", gl: "Activar botón de inicio de sesión",
nl: "Activeer de login-knop", nl: "Activeer de login-knop",
de:" Anmelde-Knopf aktivieren" de:" Anmelde-Knopf aktivieren"
}), }),
fsSearch: new T({ fsSearch: new T({
en: "Enable the search bar", en: "Enable the search bar",
ca: "Activar la barra de cerca",
es: "Activar la barra de búsqueda",
gl: "Activar a barra de procura", gl: "Activar a barra de procura",
nl: "Activeer de zoekbalk", nl: "Activeer de zoekbalk",
de: " Suchleiste aktivieren" de: " Suchleiste aktivieren"
}), }),
fsWelcomeMessage: new T({ fsWelcomeMessage: new T({
en: "Show the welcome message popup and associated tabs", en: "Show the welcome message popup and associated tabs",
ca: "Mostra el missatge emergent de benvinguda i pestanyes associades",
es: "Muestra el mensaje emergente de bienvenida y pestañas asociadas",
gl: "Amosar a xanela emerxente da mensaxe de benvida e as lapelas asociadas", gl: "Amosar a xanela emerxente da mensaxe de benvida e as lapelas asociadas",
nl: "Toon het welkomstbericht en de bijhorende tabbladen", nl: "Toon het welkomstbericht en de bijhorende tabbladen",
de: "Popup der Begrüßungsnachricht und zugehörige Registerkarten anzeigen" de: "Popup der Begrüßungsnachricht und zugehörige Registerkarten anzeigen"
}), }),
fsLayers: new T({ fsLayers: new T({
en: "Enable thelayer control", en: "Enable thelayer control",
ca: "Activar el control de capes",
es: "Activar el control de capas",
gl: "Activar o control de capas", gl: "Activar o control de capas",
nl: "Toon de knop voor laagbediening", nl: "Toon de knop voor laagbediening",
de: "Aktivieren der Layersteuerung" de: "Aktivieren der Layersteuerung"
@ -623,33 +649,45 @@ export default class Translations {
fsLayerControlToggle: new T({ fsLayerControlToggle: new T({
en: "Start with the layer control expanded", en: "Start with the layer control expanded",
gl: "Comenza co control de capas expandido", gl: "Comenza co control de capas expandido",
ca: "Iniciar el control de capes avançat",
es: "Iniciar el control de capas avanzado",
nl: "Toon de laagbediening meteen volledig", nl: "Toon de laagbediening meteen volledig",
de: "Mit der erweiterten Ebenenkontrolle beginnen" de: "Mit der erweiterten Ebenenkontrolle beginnen"
}), }),
fsAddNew: new T({ fsAddNew: new T({
en: "Enable the 'add new POI' button", en: "Enable the 'add new POI' button",
ca: "Activar el botó d'afegir nou PDI'",
es: "Activar el botón de añadir nuevo PDI'",
nl: "Activeer het toevoegen van nieuwe POI", nl: "Activeer het toevoegen van nieuwe POI",
gl: "Activar o botón de 'engadir novo PDI'", gl: "Activar o botón de 'engadir novo PDI'",
de: "Schaltfläche 'neuen POI hinzufügen' aktivieren", de: "Schaltfläche 'neuen POI hinzufügen' aktivieren",
}), }),
fsGeolocation: new T({ fsGeolocation: new T({
en: "Enable the 'geolocate-me' button (mobile only)", en: "Enable the 'geolocate-me' button (mobile only)",
ca: "Activar el botó de 'geolocalitza'm' (només mòbil)",
es: "Activar el botón de 'geolocalízame' (només mòbil)",
gl: "Activar o botón de 'xeolocalizarme' (só móbil)", gl: "Activar o botón de 'xeolocalizarme' (só móbil)",
nl: "Toon het knopje voor geolocalisatie (enkel op mobiel)", nl: "Toon het knopje voor geolocalisatie (enkel op mobiel)",
de: "Die Schaltfläche 'Mich geolokalisieren' aktivieren (nur für Mobil)", de: "Die Schaltfläche 'Mich geolokalisieren' aktivieren (nur für Mobil)",
}), }),
fsIncludeCurrentBackgroundMap: new T({ fsIncludeCurrentBackgroundMap: new T({
en: "Include the current background choice <b>{name}</b>", en: "Include the current background choice <b>{name}</b>",
ca: "Incloure l'opció de fons actual <b>{name}</b>",
es: "Incluir la opción de fondo actual <b>{name}</b>",
nl: "Gebruik de huidige achtergrond <b>{name}</b>", nl: "Gebruik de huidige achtergrond <b>{name}</b>",
de: "Die aktuelle Hintergrundwahl einschließen <b>{name}</b>", de: "Die aktuelle Hintergrundwahl einschließen <b>{name}</b>",
}), }),
fsIncludeCurrentLayers: new T({ fsIncludeCurrentLayers: new T({
en: "Include the current layer choices", en: "Include the current layer choices",
ca: "Incloure les opcions de capa actual",
es: "Incluir las opciones de capa actual",
nl: "Toon enkel de huidig getoonde lagen", nl: "Toon enkel de huidig getoonde lagen",
de: "Die aktuelle Ebenenauswahl einbeziehen" de: "Die aktuelle Ebenenauswahl einbeziehen"
}), }),
fsIncludeCurrentLocation: new T({ fsIncludeCurrentLocation: new T({
en: "Include current location", en: "Include current location",
es: "Incluir localización actual",
ca: "Incloure localització actual",
nl: "Start op de huidige locatie", nl: "Start op de huidige locatie",
de: "Aktuelle Position einbeziehen" de: "Aktuelle Position einbeziehen"
}) })
@ -800,11 +838,15 @@ export default class Translations {
}), }),
backgroundMap: new T({ backgroundMap: new T({
"en": "Background map", "en": "Background map",
"ca": "Mapa de fons",
"es": "Mapa de fondo",
"nl": "Achtergrondkaart", "nl": "Achtergrondkaart",
"de": "Hintergrundkarte" "de": "Hintergrundkarte"
}), }),
zoomInToSeeThisLayer: new T({ zoomInToSeeThisLayer: new T({
"en": "Zoom in to see this layer", "en": "Zoom in to see this layer",
"ca": "Amplia per veure aquesta capa",
"es": "Amplía para ver esta capa",
"nl": "Vergroot de kaart om deze laag te zien", "nl": "Vergroot de kaart om deze laag te zien",
"de": "Vergrößern, um diese Ebene zu sehen" "de": "Vergrößern, um diese Ebene zu sehen"
}), }),
@ -812,72 +854,100 @@ export default class Translations {
abbreviations:{ abbreviations:{
monday: new T({ monday: new T({
"en": "Mon", "en": "Mon",
"ca": "Dil",
"es": "Lun",
"nl": "Maan", "nl": "Maan",
"fr": "Lun", "fr": "Lun",
}), }),
tuesday: new T({ tuesday: new T({
"en": "Tue", "en": "Tue",
"ca": "Dim",
"es": "Mar",
"nl": "Din", "nl": "Din",
"fr": "Mar", "fr": "Mar",
}), }),
wednesday: new T({ wednesday: new T({
"en": "Wed", "en": "Wed",
"ca": "Dic",
"es": "Mie",
"nl": "Woe", "nl": "Woe",
"fr": "Mercr", "fr": "Mercr",
}), }),
thursday: new T({ thursday: new T({
"en": "Thu", "en": "Thu",
"ca": "Dij",
"es": "Jue",
"nl": "Don", "nl": "Don",
"fr": "Jeudi", "fr": "Jeudi",
}), }),
friday: new T({ friday: new T({
"en": "Fri", "en": "Fri",
"ca": "Div",
"es": "Vie",
"nl": "Vrij", "nl": "Vrij",
"fr": "Vendr", "fr": "Vendr",
}), }),
saturday: new T({ saturday: new T({
"en": "Sat", "en": "Sat",
"ca": "Dis",
"es": "Sab",
"nl": "Zat", "nl": "Zat",
"fr": "Sam", "fr": "Sam",
}), }),
sunday: new T({ sunday: new T({
"en": "Sun", "en": "Sun",
"ca": "Diu",
"es": "Dom",
"nl": "Zon", "nl": "Zon",
"fr": "Dim", "fr": "Dim",
}) })
}, },
monday: new T({ monday: new T({
"en": "Monday", "en": "Monday",
"ca": "Dilluns",
"es": "Lunes",
"nl": "Maandag", "nl": "Maandag",
"fr": "Lundi", "fr": "Lundi",
}), }),
tuesday: new T({ tuesday: new T({
"en": "Tuesdday", "en": "Tuesday",
"ca": "Dimarts",
"es": "Martes",
"nl": "Dinsdag", "nl": "Dinsdag",
"fr": "Mardi", "fr": "Mardi",
}), }),
wednesday: new T({ wednesday: new T({
"en": "Wednesday", "en": "Wednesday",
"ca": "Dimecres",
"es": "Miércoles",
"nl": "Woensdag", "nl": "Woensdag",
"fr": "Mercredi", "fr": "Mercredi",
}), }),
thursday: new T({ thursday: new T({
"en": "Thursday", "en": "Thursday",
"ca": "Dijous",
"es": "Jueves",
"nl": "Donderdag", "nl": "Donderdag",
"fr": "Jeudi", "fr": "Jeudi",
}), }),
friday: new T({ friday: new T({
"en": "Friday", "en": "Friday",
"ca": "Divendres",
"es": "Viernes",
"nl": "Vrijdag", "nl": "Vrijdag",
"fr": "Vendredi", "fr": "Vendredi",
}), }),
saturday: new T({ saturday: new T({
"en": "Saturday", "en": "Saturday",
"ca": "Dissabte",
"es": "Sábado",
"nl": "Zaterdag", "nl": "Zaterdag",
"fr": "Samedi", "fr": "Samedi",
}), }),
sunday: new T({ sunday: new T({
"en": "Sunday", "en": "Sunday",
"ca": "Diumenge",
"es": "Domingo",
"nl": "Zondag", "nl": "Zondag",
"fr": "Dimance", "fr": "Dimance",
}) })
@ -885,36 +955,54 @@ export default class Translations {
opening_hours: { opening_hours: {
open_during_ph: new T({ open_during_ph: new T({
"nl": "Op een feestdag is deze zaak", "nl": "Op een feestdag is deze zaak",
"ca": "Durant festes aquest servei és",
"es": "Durante fiestas este servicio está",
"en":"During a public holiday, this amenity is" "en":"During a public holiday, this amenity is"
}), }),
opensAt: new T({ opensAt: new T({
"en": "from", "en": "from",
"ca": "des de",
"es": "desde",
"nl": "vanaf" "nl": "vanaf"
}), openTill: new T({ }), openTill: new T({
"en": "till", "en": "till",
"ca": "fins",
"es": " hasta",
"nl": "tot" "nl": "tot"
}), }),
not_all_rules_parsed: new T({ not_all_rules_parsed: new T({
"en": "The openin hours of this shop are complicated. The following rules are ignored in the input element:" "en": "The opening hours of this shop are complicated. The following rules are ignored in the input element:",
"ca": "L'horari d'aquesta botiga és complicat. Les normes següents seran ignorades en l'entrada:",
"es": "El horario de esta tienda es complejo. Las normas siguientes serán ignoradas en la entrada:"
}), }),
closed_until: new T({ closed_until: new T({
"en": "Closed until {date}", "en": "Closed until {date}",
"ca": "Tancat fins {date}",
"es": "Cerrado hasta {date}",
"nl": "Gesloten - open op {date}" "nl": "Gesloten - open op {date}"
}), }),
closed_permanently: new T({ closed_permanently: new T({
"en": "Closed - no opening day known", "en": "Closed - no opening day known",
"ca": "Tancat - sense dia d'obertura conegut",
"es": "Cerrado - sin día de apertura conocido",
"nl": "Gesloten" "nl": "Gesloten"
}), }),
ph_not_known: new T({ ph_not_known: new T({
"en": " ", "en": " ",
"ca": " ",
"es": " ",
"nl": " " "nl": " "
}), }),
ph_closed: new T({ ph_closed: new T({
"en": "closed", "en": "closed",
"ca": "tancat",
"es": "cerrado",
"nl": "gesloten" "nl": "gesloten"
}), ph_open: new T({ }), ph_open: new T({
"en": "opened", "en": "opened",
"ca": "tancat",
"es": "abierto",
"nl": "open" "nl": "open"
}) })
@ -953,8 +1041,8 @@ export default class Translations {
}), }),
reload: new T({ reload: new T({
en: "Reload the data", en: "Reload the data",
es: "Recarga los datos", es: "Recargar datos",
ca: "Recarrega les dades", ca: "Recarregar dades",
gl: "Recargar os datos", gl: "Recargar os datos",
de: "Daten neu laden" de: "Daten neu laden"
}) })

View file

@ -2,6 +2,8 @@
"id": "aed", "id": "aed",
"title": { "title": {
"en": "Open AED Map", "en": "Open AED Map",
"ca": "Mapa obert de desfibril·ladors (DEA)",
"es": "Mapa abierto de desfibriladores (DEA)",
"fr": "Carte AED", "fr": "Carte AED",
"nl": "Open AED-kaart", "nl": "Open AED-kaart",
"de": "AED-Karte öffnen" "de": "AED-Karte öffnen"
@ -10,12 +12,16 @@
"icon": "./assets/themes/aed/aed.svg", "icon": "./assets/themes/aed/aed.svg",
"description": { "description": {
"en": "On this map, one can find and mark nearby defibrillators", "en": "On this map, one can find and mark nearby defibrillators",
"ca": "En aquest mapa , qualsevol pot trobar i marcar els desfibril·ladors externs automàtics més propers",
"en": "En este mapa , cualquiera puede encontrar y marcar los desfibriladores externos automáticos más cercanos",
"fr": "Sur cette carte, vous pouvez trouver et améliorer les informations sur les défibrillateurs", "fr": "Sur cette carte, vous pouvez trouver et améliorer les informations sur les défibrillateurs",
"nl": "Op deze kaart kan je informatie over AEDs vinden en verbeteren", "nl": "Op deze kaart kan je informatie over AEDs vinden en verbeteren",
"de": "Auf dieser Karte kann man nahe gelegene Defibrillatoren finden und markieren" "de": "Auf dieser Karte kann man nahe gelegene Defibrillatoren finden und markieren"
}, },
"language": [ "language": [
"en", "en",
"ca",
"es",
"fr", "fr",
"nl", "nl",
"de" "de"
@ -29,6 +35,8 @@
"id": "Defibrillator", "id": "Defibrillator",
"name": { "name": {
"en": "Defibrillators", "en": "Defibrillators",
"ca": "Desfibril·ladors",
"es": "Desfibriladores",
"fr": "Défibrillateurs", "fr": "Défibrillateurs",
"nl": "Defibrillatoren", "nl": "Defibrillatoren",
"de": "Defibrillatoren" "de": "Defibrillatoren"
@ -38,6 +46,8 @@
"title": { "title": {
"render": { "render": {
"en": "Defibrillator", "en": "Defibrillator",
"ca": "Desfibril·lador",
"es": "Desfibrilador",
"fr": "Défibrillateur", "fr": "Défibrillateur",
"nl": "Defibrillator", "nl": "Defibrillator",
"de": "Defibrillator" "de": "Defibrillator"
@ -49,6 +59,8 @@
{ {
"title": { "title": {
"en": "Defibrillator", "en": "Defibrillator",
"ca": "Desfibril·lador",
"es": "Desfibrilador",
"fr": "Défibrillateur", "fr": "Défibrillateur",
"nl": "Defibrillator", "nl": "Defibrillator",
"de": "Defibrillator" "de": "Defibrillator"
@ -63,6 +75,8 @@
{ {
"question": { "question": {
"en": "Is this defibrillator located indoors?", "en": "Is this defibrillator located indoors?",
"ca": "Està el desfibril·lador a l'interior?",
"en": "¿Esté el desfibrilador en interior?",
"fr": "Ce défibrillateur est-il disposé en intérieur ?", "fr": "Ce défibrillateur est-il disposé en intérieur ?",
"nl": "Hangt deze defibrillator binnen of buiten?", "nl": "Hangt deze defibrillator binnen of buiten?",
"de": "Befindet sich dieser Defibrillator im Gebäude?" "de": "Befindet sich dieser Defibrillator im Gebäude?"
@ -72,6 +86,8 @@
"if": "indoor=yes", "if": "indoor=yes",
"then": { "then": {
"en": "This defibrillator is located indoors", "en": "This defibrillator is located indoors",
"ca": "Aquest desfibril·lador està a l'interior",
"es": "Este desfibrilador está en interior",
"fr": "Ce défibrillateur est en intérieur (dans un batiment)", "fr": "Ce défibrillateur est en intérieur (dans un batiment)",
"nl": "Deze defibrillator bevindt zich in een gebouw", "nl": "Deze defibrillator bevindt zich in een gebouw",
"de": "Dieser Defibrillator befindet sich im Gebäude" "de": "Dieser Defibrillator befindet sich im Gebäude"
@ -81,6 +97,8 @@
"if": "indoor=no", "if": "indoor=no",
"then": { "then": {
"en": "This defibrillator is located outdoors", "en": "This defibrillator is located outdoors",
"ca": "Aquest desfibril·lador està a l'exterior",
"es": "Este desfibrilador está en exterior",
"fr": "Ce défibrillateur est situé en extérieur", "fr": "Ce défibrillateur est situé en extérieur",
"nl": "Deze defibrillator hangt buiten", "nl": "Deze defibrillator hangt buiten",
"de": "Dieser Defibrillator befindet sich im Freien" "de": "Dieser Defibrillator befindet sich im Freien"
@ -91,12 +109,16 @@
{ {
"question": { "question": {
"en": "Is this defibrillator freely accessible?", "en": "Is this defibrillator freely accessible?",
"ca": "Està el desfibril·lador accessible lliurement?",
"es": "¿Está el desfibrilador accesible libremente?",
"fr": "Ce défibrillateur est-il librement accessible?", "fr": "Ce défibrillateur est-il librement accessible?",
"nl": "Is deze defibrillator vrij toegankelijk?", "nl": "Is deze defibrillator vrij toegankelijk?",
"de": "Ist dieser Defibrillator frei zugänglich?" "de": "Ist dieser Defibrillator frei zugänglich?"
}, },
"render": { "render": {
"en": "Access is {access}", "en": "Access is {access}",
"ca": "L'accés és {access}",
"es": "El acceso es {access}",
"fr": "{access} accessible", "fr": "{access} accessible",
"nl": "Toegankelijkheid is {access}", "nl": "Toegankelijkheid is {access}",
"de": "Zugang ist {access}" "de": "Zugang ist {access}"
@ -113,6 +135,8 @@
"if": "access=yes", "if": "access=yes",
"then": { "then": {
"en": "Publicly accessible", "en": "Publicly accessible",
"ca": "Accés lliure",
"es": "Acceso libre",
"fr": "Librement accessible", "fr": "Librement accessible",
"nl": "Publiek toegankelijk", "nl": "Publiek toegankelijk",
"de": "Öffentlich zugänglich" "de": "Öffentlich zugänglich"
@ -122,6 +146,8 @@
"if": "access=public", "if": "access=public",
"then": { "then": {
"en": "Publicly accessible", "en": "Publicly accessible",
"ca": "Publicament accessible",
"es": "Publicament accesible",
"fr": "Librement accessible", "fr": "Librement accessible",
"nl": "Publiek toegankelijk", "nl": "Publiek toegankelijk",
"de": "Öffentlich zugänglich" "de": "Öffentlich zugänglich"
@ -132,6 +158,8 @@
"if": "access=customers", "if": "access=customers",
"then": { "then": {
"en": "Only accessible to customers", "en": "Only accessible to customers",
"ca": "Només accessible a clients",
"es": "Sólo accesible a clientes",
"fr": "Réservé aux clients du lieu", "fr": "Réservé aux clients du lieu",
"nl": "Enkel toegankeleijk voor klanten", "nl": "Enkel toegankeleijk voor klanten",
"de": "Nur für Kunden zugänglich" "de": "Nur für Kunden zugänglich"
@ -141,6 +169,8 @@
"if": "access=private", "if": "access=private",
"then": { "then": {
"en": "Not accessible to the general public (e.g. only accesible to staff, the owners, ...)", "en": "Not accessible to the general public (e.g. only accesible to staff, the owners, ...)",
"ca": "No accessible al públic en general (ex. només accesible a treballadors, propietaris, ...)",
"es": "No accesible al público en general (ex. sólo accesible a trabajadores, propietarios, ...)",
"fr": "Non accessible au public (par exemple réservé au personnel, au propriétaire, ...)", "fr": "Non accessible au public (par exemple réservé au personnel, au propriétaire, ...)",
"nl": "Niet toegankelijk voor het publiek (bv. enkel voor personneel, de eigenaar, ...)", "nl": "Niet toegankelijk voor het publiek (bv. enkel voor personneel, de eigenaar, ...)",
"de": "Nicht für die Öffentlichkeit zugänglich (z.B. nur für das Personal, die Eigentümer, ...)" "de": "Nicht für die Öffentlichkeit zugänglich (z.B. nur für das Personal, die Eigentümer, ...)"
@ -151,6 +181,8 @@
{ {
"question": { "question": {
"en": "On which floor is this defibrillator located?", "en": "On which floor is this defibrillator located?",
"ca": "A quina planta està el desfibril·lador localitzat?",
"es": "¿En qué planta se encuentra el defibrilador localizado?",
"fr": "À quel étage est situé ce défibrillateur?", "fr": "À quel étage est situé ce défibrillateur?",
"nl": "Op welke verdieping bevindt deze defibrillator zich?", "nl": "Op welke verdieping bevindt deze defibrillator zich?",
"de": "In welchem Stockwerk befindet sich dieser Defibrillator?" "de": "In welchem Stockwerk befindet sich dieser Defibrillator?"
@ -167,6 +199,8 @@
}, },
"render": { "render": {
"en": "This defibrallator is on floor {level}", "en": "This defibrallator is on floor {level}",
"ca": "Aquest desfibril·lador és a la planta {level}",
"es": "El desfibrilador se encuentra en la planta {level}",
"fr": "Ce défibrillateur est à l'étage {level}", "fr": "Ce défibrillateur est à l'étage {level}",
"nl": "De defibrillator bevindt zicht op verdieping {level}", "nl": "De defibrillator bevindt zicht op verdieping {level}",
"de": "Dieser Defibrallator befindet sich im {level}. Stockwerk" "de": "Dieser Defibrallator befindet sich im {level}. Stockwerk"
@ -176,6 +210,8 @@
"render": "{defibrillator:location}", "render": "{defibrillator:location}",
"question": { "question": {
"en": "Please give some explanation on where the defibrillator can be found", "en": "Please give some explanation on where the defibrillator can be found",
"ca": "Dóna detalls d'on es pot trobar el desfibril·lador",
"es": "Da detalles de dónde se puede encontrar el desfibrilador",
"fr": "Veuillez indiquez plus précisément où se situe le défibrillateur", "fr": "Veuillez indiquez plus précisément où se situe le défibrillateur",
"nl": "Gelieve meer informatie te geven over de exacte locatie van de defibrillator", "nl": "Gelieve meer informatie te geven over de exacte locatie van de defibrillator",
"de": "Bitte geben Sie einige Erläuterungen dazu, wo der Defibrillator zu finden ist" "de": "Bitte geben Sie einige Erläuterungen dazu, wo der Defibrillator zu finden ist"

View file

@ -21,7 +21,7 @@
"version": "2020-10-23", "version": "2020-10-23",
"startLat": 0, "startLat": 0,
"startLon": 0, "startLon": 0,
"startZoom": 12, "startZoom": 1,
"widenFactor": 0.05, "widenFactor": 0.05,
"socialImage": "", "socialImage": "",
"layers": [ "layers": [
@ -108,6 +108,62 @@
"key": "material", "key": "material",
"addExtraTags": [] "addExtraTags": []
}, },
"mappings": [
{
"if": {
"and": ["material=wood"]
},
"then": {
"en": "Material: wood",
"de": "Material: Holz"
}
},
{
"if": {
"and": ["material=metal"]
},
"then": {
"en": "Material: metal",
"de": "Material: Metall"
}
},
{
"if": {
"and": ["material=stone"]
},
"then": {
"en": "Material: stone",
"de": "Material: Stein"
}
},
{
"if": {
"and": ["material=concrete"]
},
"then": {
"en": "Material: concrete",
"de": "Material: Beton"
}
},
{
"if": {
"and": ["material=plastic"]
},
"then": {
"en": "Material: plastic",
"de": "Material: Kunststoff"
}
},
{
"if": {
"and": ["material=steel"]
},
"then": {
"en": "Material: steel",
"de": "Material: Stahl"
}
}
],
"question": { "question": {
"en": "What is the bench (seating) made from?", "en": "What is the bench (seating) made from?",
"de": "Aus welchem Material besteht die Sitzbank (Sitzfläche)?" "de": "Aus welchem Material besteht die Sitzbank (Sitzfläche)?"
@ -115,16 +171,90 @@
}, },
{ {
"render": { "render": {
"en": "Color: {colour}", "en": "Colour: {colour}",
"de": "Farbe: {colour}" "de": "Farbe: {colour}"
}, },
"question": { "question": {
"en": "Which color does this bench have?", "en": "Which colour does this bench have?",
"de": "Welche Farbe hat diese Sitzbank?" "de": "Welche Farbe hat diese Sitzbank?"
}, },
"freeform": { "freeform": {
"key": "colour" "key": "colour"
} },
"mappings": [
{
"if": {
"and": ["colour=brown"]
},
"then": {
"en": "Colour: brown",
"de": "Farbe: braun"
}
},
{
"if": {
"and": ["colour=green"]
},
"then": {
"en": "Colour: green",
"de": "Farbe: grün"
}
},
{
"if": {
"and": ["colour=gray"]
},
"then": {
"en": "Colour: gray",
"de": "Farbe: grau"
}
},
{
"if": {
"and": ["colour=white"]
},
"then": {
"en": "Colour: white",
"de": "Farbe: weiß"
}
},
{
"if": {
"and": ["colour=red"]
},
"then": {
"en": "Colour: red",
"de": "Farbe: rot"
}
},
{
"if": {
"and": ["colour=black"]
},
"then": {
"en": "Colour: black",
"de": "Farbe: schwarz"
}
},
{
"if": {
"and": ["colour=blue"]
},
"then": {
"en": "Colour: blue",
"de": "Farbe: blau"
}
},
{
"if": {
"and": ["colour=yellow"]
},
"then": {
"en": "Colour: yellow",
"de": "Farbe: gelb"
}
}
]
} }
], ],
"hideUnderlayingFeaturesMinPercentage": 0, "hideUnderlayingFeaturesMinPercentage": 0,

View file

@ -17,7 +17,7 @@
"startLat": 51.2095, "startLat": 51.2095,
"startZoom": 14, "startZoom": 14,
"startLon": 3.2228, "startLon": 3.2228,
"maintainer": "MapComlete", "maintainer": "MapComplete",
"widenfactor": 0.05, "widenfactor": 0.05,
"roamingRenderings": [ "roamingRenderings": [
{ {

View file

@ -81,34 +81,19 @@ function generateWikiEntry(layout: Layout){
if(layout.hideFromOverview){ if(layout.hideFromOverview){
return ""; return "";
} }
let image = "MapComplete_Screenshot.png"; const languages = layout.supportedLanguages.map(ln => `{{#language:${ln}|en}}`).join(", ")
if(layout.socialImage){ let auth = "Yes";
// image = layout.socialImage; if(layout.maintainer !== "" && layout.maintainer !== "MapComplete"){
auth=`Yes, by ${layout.maintainer};`
} }
return `{{service_item
|name= [https://pietervdvn.github.io/MapComplete/${layout.id}.html ${layout.id}]
if(!image.startsWith("http")){ |region= Worldwide
// image = "https://pietervdvn.github.io/MapComplete/"+image |lang= ${languages}
} |descr= A MapComplete theme: ${Translations.W(layout.description).InnerRender()}
|material= {{yes|[https://github.com/pietervdvn/MapComplete ${auth}]}}
return `{{Software |image= MapComplete_Screenshot.png
|name = ${layout.id} |genre= POI, editor, ${layout.id}
|author = ${layout.maintainer ?? "MapComplete builtin"}
|web = https://pietervdvn.github.io/MapComplete/${layout.id}.html
|repo = https://github.com/pietervdvn/MapComplete
|platform = web
|code = Typescript;HTML;CSS
|languages = ${layout.supportedLanguages.join(";")}
|genre = display;editor
|screenshot = ${image}
|description = A MapComplete theme: ${Translations.W(layout.description)?.InnerRender() ?? ""}
|map = yes
|findLocation = yes
|findNearbyPOI = yes
|addPOI = yes
|editPOI = yes
|editTags = yes
|
}}` }}`
} }
@ -240,7 +225,9 @@ function createLandingPage(layout: Layout) {
const blacklist = ["", "test", ".", "..", "manifest", "index", "land", "preferences", "account", "openstreetmap"] const blacklist = ["", "test", ".", "..", "manifest", "index", "land", "preferences", "account", "openstreetmap"]
const all = AllKnownLayouts.allSets; const all = AllKnownLayouts.allSets;
let wikiPage = ""; let wikiPage = "{|class=\"wikitable sortable\"\n" +
"! Name, link !! Genre !! Covered region !! Language !! Description !! Free materials !! Image\n" +
"|-";
for (const layoutName in all) { for (const layoutName in all) {
if (blacklist.indexOf(layoutName.toLowerCase()) >= 0) { if (blacklist.indexOf(layoutName.toLowerCase()) >= 0) {
@ -262,8 +249,11 @@ for (const layoutName in all) {
const landing = createLandingPage(layout); const landing = createLandingPage(layout);
writeFile(enc(layout.id) + ".html", landing, err) writeFile(enc(layout.id) + ".html", landing, err)
wikiPage += "\n\n"+generateWikiEntry(layout); wikiPage += "\n"+generateWikiEntry(layout);
} }
wikiPage += "|}"
writeFile("./assets/generated/wikiIndex", wikiPage, (err) => { writeFile("./assets/generated/wikiIndex", wikiPage, (err) => {
if (err !== null) { if (err !== null) {
console.log("Could not save wikiindex", err); console.log("Could not save wikiindex", err);

23
test.ts
View file

@ -1,15 +1,32 @@
/* /*
import OpeningHoursPickerTable from "./UI/Input/OpeningHours/OpeningHoursPickerTable"; import OpeningHoursPickerTable from "./UI/Input/OpeningHours/OpeningHoursPickerTable";
import {UIElement} from "./UI/UIElement"; import {UIElement} from "./UI/UIElement";
import {UIEventSource} from "./Logic/UIEventSource"; import {UIEventSource} from "./Logic/UIEventSource";
import {OpeningHour} from "./Logic/OpeningHours"; import {OpeningHour} from "./Logic/OpeningHours";
import {TagRendering} from "./UI/Popup/TagRendering";
import {Tag} from "./Logic/Tags";
new OpeningHoursPickerTable(new UIEventSource<UIElement[]>([]), new UIEventSource<OpeningHour[]>([]))
.AttachTo("maindiv")
const tr = new TagRendering(
new UIEventSource<any>({
id: "node/-1",
amenity: "bench"
}),
{
question: "Does this bench have a backrest?",
mappings: [{
k: new Tag("backrest", "yes"),
txt: "Has backrest"
},
{
k: new Tag("backrest", "no"),
txt: "Has no backrest"
}]
}
)
tr.AttachTo("maindiv")
/*/ /*/