From c2d520c2e91af41ef4f3e94c5cd76a7363358278 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Thu, 4 Mar 2021 13:35:03 +0100 Subject: [PATCH] Small fixes --- AllTranslationAssets.ts | 2 +- UI/BigComponents/ThemeIntroductionPanel.ts | 5 +---- assets/themes/playgrounds/playgrounds.json | 26 ++++++++++++++++------ index.html | 2 +- scripts/createLayouts.ts | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/AllTranslationAssets.ts b/AllTranslationAssets.ts index 37d7029..74f2d84 100644 --- a/AllTranslationAssets.ts +++ b/AllTranslationAssets.ts @@ -4,7 +4,7 @@ export default class AllTranslationAssets { public static t = { image: { addPicture: new Translation( {"en":"Add picture","es":"Añadir foto","ca":"Afegir foto","nl":"Voeg foto toe","fr":"Ajoutez une photo","gl":"Engadir imaxe","de":"Bild hinzufügen"} ), uploadingPicture: new Translation( {"en":"Uploading your picture...","nl":"Bezig met een foto te uploaden...","es":"Subiendo tu imagen ...","ca":"Pujant la teva imatge ...","fr":"Mise en ligne de votre photo...","gl":"Subindo a túa imaxe...","de":"Ihr Bild hochladen..."} ), - uploadingMultiple: new Translation( {"en":"Uploading {count} of your picture...","nl":"Bezig met {count} foto's te uploaden...","ca":"Pujant {count} de la teva imatge...","es":"Subiendo {count} de tus fotos...","fr":"Mise en ligne de {count} photos...","gl":"Subindo {count} das túas imaxes...","de":"{count} Ihrer Bilder hochgeladen..."} ), + uploadingMultiple: new Translation( {"en":"Uploading {count} pictures...","nl":"Bezig met {count} foto's te uploaden...","ca":"Pujant {count} de la teva imatge...","es":"Subiendo {count} de tus fotos...","fr":"Mise en ligne de {count} photos...","gl":"Subindo {count} das túas imaxes...","de":"{count} Ihrer Bilder hochgeladen..."} ), pleaseLogin: new Translation( {"en":"Please login to add a picure","nl":"Gelieve je aan te melden om een foto toe te voegen","es":"Entra para subir una foto","ca":"Entra per pujar una foto","fr":"Connectez-vous pour mettre une photo en ligne","gl":"Inicia a sesión para subir unha imaxe","de":"Bitte einloggen, um ein Bild hinzuzufügen"} ), willBePublished: new Translation( {"en":"Your picture will be published: ","es":"Tu foto será publicada: ","ca":"La teva foto serà publicada: ","nl":"Jouw foto wordt gepubliceerd: ","fr":"Votre photo va être publiée: ","gl":"A túa imaxe será publicada: ","de":"Ihr Bild wird veröffentlicht: "} ), cco: new Translation( {"en":"in the public domain","ca":"en domini públic","es":"en dominio público","nl":"in het publiek domein","fr":"sur le domaine publique","gl":"no dominio público","de":"in die Public Domain"} ), diff --git a/UI/BigComponents/ThemeIntroductionPanel.ts b/UI/BigComponents/ThemeIntroductionPanel.ts index 3c68816..b39900e 100644 --- a/UI/BigComponents/ThemeIntroductionPanel.ts +++ b/UI/BigComponents/ThemeIntroductionPanel.ts @@ -22,10 +22,7 @@ export default class ThemeIntroductionPanel extends UIElement { this.languagePicker = LanguagePicker.CreateLanguagePicker(State.state.layoutToUse.data.language, Translations.t.general.pickLanguage); const layout = State.state.layoutToUse.data; - this.description = new Combine([ - "

", layout.title, "

", - layout.description - ]) + this.description = layout.description this.plzLogIn = Translations.t.general.loginWithOpenStreetMap .onClick(() => { diff --git a/assets/themes/playgrounds/playgrounds.json b/assets/themes/playgrounds/playgrounds.json index f5db303..2959206 100644 --- a/assets/themes/playgrounds/playgrounds.json +++ b/assets/themes/playgrounds/playgrounds.json @@ -1,13 +1,13 @@ { "id": "playgrounds", "title": { - "nl": "Speelzones" + "nl": "Speelplekken" }, "shortDescription": { - "nl": "Speelzones en speeltuinen" + "nl": "Speelplekken en sportplekken" }, "description": { - "nl": "Deze kaart toont speelzones in het groen" + "nl": "Op deze kaart vind je speelplekken zoals speeltuinen, speelbossen en sportterreinen" }, "language": [ "nl" @@ -20,7 +20,6 @@ "startZoom": 10, "widenFactor": 0.05, "socialImage": "", - "hideFromOverview": true, "layers": [ { "id": "playgrounds", @@ -33,6 +32,9 @@ "leisure=playground" ] }, + "description": { + "nl": "Speeltuinen en speelbossen" + }, "title": { "render": { "nl": "Speeltuin" @@ -41,18 +43,28 @@ { "if": { "and": [ + "playground=forest", "name~*" ] }, + "then": { + "nl": "Speelbos {name}" + } + }, + { + "if": "playground=forest", + "then": { + "nl": "Speelbos" + } + }, + { + "if": "name~*", "then": { "nl": "Speeltuin {name}" } } ] }, - "description": { - "nl": "Alle speeltuinen" - }, "tagRenderings": [ "images", { diff --git a/index.html b/index.html index 38f6155..e0cbf78 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ - + diff --git a/scripts/createLayouts.ts b/scripts/createLayouts.ts index 6ea5f7e..9a5857c 100644 --- a/scripts/createLayouts.ts +++ b/scripts/createLayouts.ts @@ -218,7 +218,7 @@ async function createLandingPage(layout: LayoutConfig) { } let output = template - .replace("./index.webmanifest", `${enc(layout.id)}.webmanifest`) + .replace("./index.manifest", `${enc(layout.id)}.webmanifest`) .replace("", og) .replace(/.+?<\/title>/, `<title>${ogTitle}`) .replace("Loading MapComplete, hang on...", `Loading MapComplete theme ${ogTitle}...`) @@ -294,7 +294,7 @@ writeFile(generatedDir + "/wikiIndex", wikiPage, (err) => { description:"MapComplete as a map viewer and editor which show thematic POI based on OpenStreetMap" }),"").then(manifObj => { const manif = JSON.stringify(manifObj, undefined, 2); - writeFileSync("index.webmanifest",manif) + writeFileSync("index.manifest",manif) }) console.log("Counting all translations")