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,
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.icon = "./assets/add.svg"
}

View file

@ -23,7 +23,7 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
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>;
@ -68,12 +68,17 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
},
tagsPreprocessor?: ((tags: any) => any),
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);
if (tags === undefined) {
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(this._editMode);
this.ListenTo(this._questionSkipped);
@ -111,7 +116,6 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
let choiceSubbed = {
k: choice.k?.substituteValues(this.currentTags.data),
txt: choice.txt,
priority: choice.priority
}
@ -202,7 +206,7 @@ export class TagRendering extends UIElement implements TagDependantUIElement {
extraTags?: TagsFilter,
},
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> {

View file

@ -123,16 +123,22 @@ export default class Translations {
dontDelete: new T({
"nl":"Terug",
"en":"Cancel",
"ca":"Cancel·lar",
"es":"Cancelar",
"de": "Abbrechen"
}),
doDelete: new T({
"nl":"Verwijder afbeelding",
"en":"Remove image",
"ca":"Esborrar imatge",
"es":"Borrar imagen",
"de": "Bild entfernen"
}),
isDeleted: new T({
"nl":"Verwijderd",
"en":"Deleted",
"ca":"Esborrada",
"es":"Borrada",
"de": "Gelöscht"
})
},
@ -382,12 +388,16 @@ export default class Translations {
}),
openLayerControl: new T({
"en": "Open the layer control box",
"ca": "Obrir el control de capes",
"es": "Abrir el control de capas",
"nl": "Open de laag-instellingen",
"de": "Das Ebenen-Kontrollkästchen öffnen"
})
,
layerNotEnabled: new T({
"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",
"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({
en: "Link copied to clipboard",
ca: "Enllaç copiat al portapapers",
es: "Enlace copiado en el portapapeles",
gl: "Ligazón copiada ó portapapeis",
nl: "Link gekopieerd naar klembord",
de: "Link in die Zwischenablage kopiert"
}),
thanksForSharing: new T({
en: "Thanks for sharing!",
ca: "Gràcies per compartir",
es: "Gracias por compartir",
gl: "Grazas por compartir!",
nl: "Bedankt om te delen!",
de: "Danke für das Teilen!"
}),
editThisTheme: new T({
en: "Edit this theme",
ca: "Editar aquest repte",
es: "Editar este reto",
gl: "Editar este tema",
nl: "Pas dit thema aan",
de: "Dieses Thema bearbeiten"
}),
editThemeDescription: new T({
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",
nl: "Pas vragen aan of voeg vragen toe aan dit kaartthema",
de: "Fragen zu diesem Kartenthema hinzufügen oder ändern"
}),
fsUserbadge: new T({
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",
nl: "Activeer de login-knop",
de:" Anmelde-Knopf aktivieren"
}),
fsSearch: new T({
en: "Enable the search bar",
ca: "Activar la barra de cerca",
es: "Activar la barra de búsqueda",
gl: "Activar a barra de procura",
nl: "Activeer de zoekbalk",
de: " Suchleiste aktivieren"
}),
fsWelcomeMessage: new T({
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",
nl: "Toon het welkomstbericht en de bijhorende tabbladen",
de: "Popup der Begrüßungsnachricht und zugehörige Registerkarten anzeigen"
}),
fsLayers: new T({
en: "Enable thelayer control",
ca: "Activar el control de capes",
es: "Activar el control de capas",
gl: "Activar o control de capas",
nl: "Toon de knop voor laagbediening",
de: "Aktivieren der Layersteuerung"
@ -623,33 +649,45 @@ export default class Translations {
fsLayerControlToggle: new T({
en: "Start with the layer control expanded",
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",
de: "Mit der erweiterten Ebenenkontrolle beginnen"
}),
fsAddNew: new T({
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",
gl: "Activar o botón de 'engadir novo PDI'",
de: "Schaltfläche 'neuen POI hinzufügen' aktivieren",
}),
fsGeolocation: new T({
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)",
nl: "Toon het knopje voor geolocalisatie (enkel op mobiel)",
de: "Die Schaltfläche 'Mich geolokalisieren' aktivieren (nur für Mobil)",
}),
fsIncludeCurrentBackgroundMap: new T({
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>",
de: "Die aktuelle Hintergrundwahl einschließen <b>{name}</b>",
}),
fsIncludeCurrentLayers: new T({
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",
de: "Die aktuelle Ebenenauswahl einbeziehen"
}),
fsIncludeCurrentLocation: new T({
en: "Include current location",
es: "Incluir localización actual",
ca: "Incloure localització actual",
nl: "Start op de huidige locatie",
de: "Aktuelle Position einbeziehen"
})
@ -800,11 +838,15 @@ export default class Translations {
}),
backgroundMap: new T({
"en": "Background map",
"ca": "Mapa de fons",
"es": "Mapa de fondo",
"nl": "Achtergrondkaart",
"de": "Hintergrundkarte"
}),
zoomInToSeeThisLayer: new T({
"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",
"de": "Vergrößern, um diese Ebene zu sehen"
}),
@ -812,72 +854,100 @@ export default class Translations {
abbreviations:{
monday: new T({
"en": "Mon",
"ca": "Dil",
"es": "Lun",
"nl": "Maan",
"fr": "Lun",
}),
tuesday: new T({
"en": "Tue",
"ca": "Dim",
"es": "Mar",
"nl": "Din",
"fr": "Mar",
}),
wednesday: new T({
"en": "Wed",
"ca": "Dic",
"es": "Mie",
"nl": "Woe",
"fr": "Mercr",
}),
thursday: new T({
"en": "Thu",
"ca": "Dij",
"es": "Jue",
"nl": "Don",
"fr": "Jeudi",
}),
friday: new T({
"en": "Fri",
"ca": "Div",
"es": "Vie",
"nl": "Vrij",
"fr": "Vendr",
}),
saturday: new T({
"en": "Sat",
"ca": "Dis",
"es": "Sab",
"nl": "Zat",
"fr": "Sam",
}),
sunday: new T({
"en": "Sun",
"ca": "Diu",
"es": "Dom",
"nl": "Zon",
"fr": "Dim",
})
},
monday: new T({
"en": "Monday",
"ca": "Dilluns",
"es": "Lunes",
"nl": "Maandag",
"fr": "Lundi",
}),
tuesday: new T({
"en": "Tuesdday",
"en": "Tuesday",
"ca": "Dimarts",
"es": "Martes",
"nl": "Dinsdag",
"fr": "Mardi",
}),
wednesday: new T({
"en": "Wednesday",
"ca": "Dimecres",
"es": "Miércoles",
"nl": "Woensdag",
"fr": "Mercredi",
}),
thursday: new T({
"en": "Thursday",
"ca": "Dijous",
"es": "Jueves",
"nl": "Donderdag",
"fr": "Jeudi",
}),
friday: new T({
"en": "Friday",
"ca": "Divendres",
"es": "Viernes",
"nl": "Vrijdag",
"fr": "Vendredi",
}),
saturday: new T({
"en": "Saturday",
"ca": "Dissabte",
"es": "Sábado",
"nl": "Zaterdag",
"fr": "Samedi",
}),
sunday: new T({
"en": "Sunday",
"ca": "Diumenge",
"es": "Domingo",
"nl": "Zondag",
"fr": "Dimance",
})
@ -885,36 +955,54 @@ export default class Translations {
opening_hours: {
open_during_ph: new T({
"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"
}),
opensAt: new T({
"en": "from",
"ca": "des de",
"es": "desde",
"nl": "vanaf"
}), openTill: new T({
"en": "till",
"ca": "fins",
"es": " hasta",
"nl": "tot"
}),
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({
"en": "Closed until {date}",
"ca": "Tancat fins {date}",
"es": "Cerrado hasta {date}",
"nl": "Gesloten - open op {date}"
}),
closed_permanently: new T({
"en": "Closed - no opening day known",
"ca": "Tancat - sense dia d'obertura conegut",
"es": "Cerrado - sin día de apertura conocido",
"nl": "Gesloten"
}),
ph_not_known: new T({
"en": " ",
"ca": " ",
"es": " ",
"nl": " "
}),
ph_closed: new T({
"en": "closed",
"ca": "tancat",
"es": "cerrado",
"nl": "gesloten"
}), ph_open: new T({
"en": "opened",
"ca": "tancat",
"es": "abierto",
"nl": "open"
})
@ -953,8 +1041,8 @@ export default class Translations {
}),
reload: new T({
en: "Reload the data",
es: "Recarga los datos",
ca: "Recarrega les dades",
es: "Recargar datos",
ca: "Recarregar dades",
gl: "Recargar os datos",
de: "Daten neu laden"
})

View file

@ -2,6 +2,8 @@
"id": "aed",
"title": {
"en": "Open AED Map",
"ca": "Mapa obert de desfibril·ladors (DEA)",
"es": "Mapa abierto de desfibriladores (DEA)",
"fr": "Carte AED",
"nl": "Open AED-kaart",
"de": "AED-Karte öffnen"
@ -10,12 +12,16 @@
"icon": "./assets/themes/aed/aed.svg",
"description": {
"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",
"nl": "Op deze kaart kan je informatie over AEDs vinden en verbeteren",
"de": "Auf dieser Karte kann man nahe gelegene Defibrillatoren finden und markieren"
},
"language": [
"en",
"ca",
"es",
"fr",
"nl",
"de"
@ -29,6 +35,8 @@
"id": "Defibrillator",
"name": {
"en": "Defibrillators",
"ca": "Desfibril·ladors",
"es": "Desfibriladores",
"fr": "Défibrillateurs",
"nl": "Defibrillatoren",
"de": "Defibrillatoren"
@ -38,6 +46,8 @@
"title": {
"render": {
"en": "Defibrillator",
"ca": "Desfibril·lador",
"es": "Desfibrilador",
"fr": "Défibrillateur",
"nl": "Defibrillator",
"de": "Defibrillator"
@ -49,6 +59,8 @@
{
"title": {
"en": "Defibrillator",
"ca": "Desfibril·lador",
"es": "Desfibrilador",
"fr": "Défibrillateur",
"nl": "Defibrillator",
"de": "Defibrillator"
@ -63,6 +75,8 @@
{
"question": {
"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 ?",
"nl": "Hangt deze defibrillator binnen of buiten?",
"de": "Befindet sich dieser Defibrillator im Gebäude?"
@ -72,6 +86,8 @@
"if": "indoor=yes",
"then": {
"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)",
"nl": "Deze defibrillator bevindt zich in een gebouw",
"de": "Dieser Defibrillator befindet sich im Gebäude"
@ -81,6 +97,8 @@
"if": "indoor=no",
"then": {
"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",
"nl": "Deze defibrillator hangt buiten",
"de": "Dieser Defibrillator befindet sich im Freien"
@ -91,12 +109,16 @@
{
"question": {
"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?",
"nl": "Is deze defibrillator vrij toegankelijk?",
"de": "Ist dieser Defibrillator frei zugänglich?"
},
"render": {
"en": "Access is {access}",
"ca": "L'accés és {access}",
"es": "El acceso es {access}",
"fr": "{access} accessible",
"nl": "Toegankelijkheid is {access}",
"de": "Zugang ist {access}"
@ -113,6 +135,8 @@
"if": "access=yes",
"then": {
"en": "Publicly accessible",
"ca": "Accés lliure",
"es": "Acceso libre",
"fr": "Librement accessible",
"nl": "Publiek toegankelijk",
"de": "Öffentlich zugänglich"
@ -122,6 +146,8 @@
"if": "access=public",
"then": {
"en": "Publicly accessible",
"ca": "Publicament accessible",
"es": "Publicament accesible",
"fr": "Librement accessible",
"nl": "Publiek toegankelijk",
"de": "Öffentlich zugänglich"
@ -132,6 +158,8 @@
"if": "access=customers",
"then": {
"en": "Only accessible to customers",
"ca": "Només accessible a clients",
"es": "Sólo accesible a clientes",
"fr": "Réservé aux clients du lieu",
"nl": "Enkel toegankeleijk voor klanten",
"de": "Nur für Kunden zugänglich"
@ -141,6 +169,8 @@
"if": "access=private",
"then": {
"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, ...)",
"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, ...)"
@ -151,6 +181,8 @@
{
"question": {
"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?",
"nl": "Op welke verdieping bevindt deze defibrillator zich?",
"de": "In welchem Stockwerk befindet sich dieser Defibrillator?"
@ -167,6 +199,8 @@
},
"render": {
"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}",
"nl": "De defibrillator bevindt zicht op verdieping {level}",
"de": "Dieser Defibrallator befindet sich im {level}. Stockwerk"
@ -176,6 +210,8 @@
"render": "{defibrillator:location}",
"question": {
"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",
"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"

View file

@ -21,7 +21,7 @@
"version": "2020-10-23",
"startLat": 0,
"startLon": 0,
"startZoom": 12,
"startZoom": 1,
"widenFactor": 0.05,
"socialImage": "",
"layers": [
@ -108,6 +108,62 @@
"key": "material",
"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": {
"en": "What is the bench (seating) made from?",
"de": "Aus welchem Material besteht die Sitzbank (Sitzfläche)?"
@ -115,16 +171,90 @@
},
{
"render": {
"en": "Color: {colour}",
"en": "Colour: {colour}",
"de": "Farbe: {colour}"
},
"question": {
"en": "Which color does this bench have?",
"en": "Which colour does this bench have?",
"de": "Welche Farbe hat diese Sitzbank?"
},
"freeform": {
"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,

View file

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

View file

@ -81,34 +81,19 @@ function generateWikiEntry(layout: Layout){
if(layout.hideFromOverview){
return "";
}
let image = "MapComplete_Screenshot.png";
if(layout.socialImage){
// image = layout.socialImage;
const languages = layout.supportedLanguages.map(ln => `{{#language:${ln}|en}}`).join(", ")
let auth = "Yes";
if(layout.maintainer !== "" && layout.maintainer !== "MapComplete"){
auth=`Yes, by ${layout.maintainer};`
}
if(!image.startsWith("http")){
// image = "https://pietervdvn.github.io/MapComplete/"+image
}
return `{{Software
|name = ${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
|
return `{{service_item
|name= [https://pietervdvn.github.io/MapComplete/${layout.id}.html ${layout.id}]
|region= Worldwide
|lang= ${languages}
|descr= A MapComplete theme: ${Translations.W(layout.description).InnerRender()}
|material= {{yes|[https://github.com/pietervdvn/MapComplete ${auth}]}}
|image= MapComplete_Screenshot.png
|genre= POI, editor, ${layout.id}
}}`
}
@ -240,7 +225,9 @@ function createLandingPage(layout: Layout) {
const blacklist = ["", "test", ".", "..", "manifest", "index", "land", "preferences", "account", "openstreetmap"]
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) {
if (blacklist.indexOf(layoutName.toLowerCase()) >= 0) {
@ -262,8 +249,11 @@ for (const layoutName in all) {
const landing = createLandingPage(layout);
writeFile(enc(layout.id) + ".html", landing, err)
wikiPage += "\n\n"+generateWikiEntry(layout);
wikiPage += "\n"+generateWikiEntry(layout);
}
wikiPage += "|}"
writeFile("./assets/generated/wikiIndex", wikiPage, (err) => {
if (err !== null) {
console.log("Could not save wikiindex", err);

23
test.ts
View file

@ -1,15 +1,32 @@
/*
import OpeningHoursPickerTable from "./UI/Input/OpeningHours/OpeningHoursPickerTable";
import {UIElement} from "./UI/UIElement";
import {UIEventSource} from "./Logic/UIEventSource";
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")
/*/