forked from MapComplete/MapComplete
Attempt to fix social image previews
This commit is contained in:
parent
25f956c808
commit
5c71bfa294
18 changed files with 147 additions and 83 deletions
|
@ -9,6 +9,7 @@ import DependencyCalculator from "../Models/ThemeConfig/DependencyCalculator";
|
|||
import Constants from "../Models/Constants";
|
||||
import {Utils} from "../Utils";
|
||||
import Link from "../UI/Base/Link";
|
||||
import {LayoutConfigJson} from "../Models/ThemeConfig/Json/LayoutConfigJson";
|
||||
|
||||
export class AllKnownLayouts {
|
||||
// Must be below the list...
|
||||
|
@ -173,22 +174,20 @@ export class AllKnownLayouts {
|
|||
private static AllLayouts(): Map<string, LayoutConfig> {
|
||||
const dict: Map<string, LayoutConfig> = new Map();
|
||||
for (const layoutConfigJson of known_themes.themes) {
|
||||
// @ts-ignore
|
||||
const layout = new LayoutConfig(layoutConfigJson, true)
|
||||
dict.set(layout.id, layout)
|
||||
|
||||
for (let i = 0; i < layout.layers.length; i++) {
|
||||
let layer = layout.layers[i];
|
||||
if (typeof (layer) === "string") {
|
||||
layer = AllKnownLayouts.sharedLayers.get(layer);
|
||||
layout.layers[i] = layer
|
||||
if (layer === undefined) {
|
||||
console.log("Defined layers are ", AllKnownLayouts.sharedLayers.keys())
|
||||
throw `Layer ${layer} was not found or defined - probably a type was made`
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
const layout = new LayoutConfig(<LayoutConfigJson> layoutConfigJson, true)
|
||||
dict.set(layout.id, layout)
|
||||
for (let i = 0; i < layout.layers.length; i++) {
|
||||
let layer = layout.layers[i];
|
||||
if (typeof (layer) === "string") {
|
||||
layer = AllKnownLayouts.sharedLayers.get(layer);
|
||||
layout.layers[i] = layer
|
||||
if (layer === undefined) {
|
||||
console.log("Defined layers are ", AllKnownLayouts.sharedLayers.keys())
|
||||
throw `Layer ${layer} was not found or defined - probably a type was made`
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
|
|
@ -898,18 +898,20 @@ class AddDependencyLayersToTheme extends DesugaringStep<LayoutConfigJson> {
|
|||
}
|
||||
}
|
||||
|
||||
class SetDefault extends DesugaringStep<LayerConfigJson> {
|
||||
private readonly value: object;
|
||||
class SetDefault<T> extends DesugaringStep<T> {
|
||||
private readonly value: any;
|
||||
private readonly key: string;
|
||||
private readonly _overrideEmptyString: boolean;
|
||||
|
||||
constructor(key: string, value: object) {
|
||||
constructor(key: string, value: any, overrideEmptyString = false) {
|
||||
super("Sets " + key + " to a default value if undefined");
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
this._overrideEmptyString = overrideEmptyString;
|
||||
}
|
||||
|
||||
convert(state: DesugaringContext, json: LayerConfigJson, context: string): { result: LayerConfigJson; errors: string[]; warnings: string[] } {
|
||||
if (json[this.key] === undefined) {
|
||||
convert(state: DesugaringContext, json: T, context: string): { result: T; errors: string[]; warnings: string[] } {
|
||||
if (json[this.key] === undefined || (json[this.key] === "" && this._overrideEmptyString)) {
|
||||
json = {...json}
|
||||
json[this.key] = this.value
|
||||
}
|
||||
|
@ -1044,6 +1046,7 @@ export class PrepareTheme extends Fuse<LayoutConfigJson> {
|
|||
super(
|
||||
"Fully prepares and expands a theme",
|
||||
new OnEveryConcat("layers", new SubstituteLayer()),
|
||||
new SetDefault("socialImage", "assets/SocialImage.png", true),
|
||||
new AddDefaultLayers(),
|
||||
new AddDependencyLayersToTheme(),
|
||||
new OnEvery("layers", new PrepareLayer()),
|
||||
|
|
|
@ -102,6 +102,11 @@ export default class LayoutConfig {
|
|||
this.descriptionTail = json.descriptionTail === undefined ? undefined : new Translation(json.descriptionTail, context + ".descriptionTail");
|
||||
this.icon = json.icon;
|
||||
this.socialImage = json.socialImage;
|
||||
if(this.socialImage === null || this.socialImage === "" || this.socialImage === undefined){
|
||||
if(official){
|
||||
throw "Theme "+json.id+" has no social image defined"
|
||||
}
|
||||
}
|
||||
this.startZoom = json.startZoom;
|
||||
this.startLat = json.startLat;
|
||||
this.startLon = json.startLon;
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"de": "Bekannte Adressen in OSM",
|
||||
"zh_Hant": "OSM 上已知的地址",
|
||||
"hu": "Ismert címek az OSM-en",
|
||||
"nl": "Bekende adressen in OSM"
|
||||
"nl": "Bekende adressen in OSM",
|
||||
"fr": "Adresses connues d’OpenStreetMap"
|
||||
},
|
||||
"minzoom": 18,
|
||||
"source": {
|
||||
|
@ -27,7 +28,8 @@
|
|||
"en": "Known address",
|
||||
"de": "Bekannte Adresse",
|
||||
"hu": "Ismert cím",
|
||||
"nl": "Bekend adres"
|
||||
"nl": "Bekend adres",
|
||||
"fr": "Adresse connue"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
|
@ -36,7 +38,8 @@
|
|||
"de": "Adressen",
|
||||
"ru": "Адреса",
|
||||
"zh_Hant": "地址",
|
||||
"hu": "Címek"
|
||||
"hu": "Címek",
|
||||
"fr": "Adresses"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
|
@ -45,13 +48,15 @@
|
|||
"en": "The housenumber is <b>{addr:housenumber}</b>",
|
||||
"nl": "Het huisnummer is <b>{addr:housenumber}</b>",
|
||||
"de": "Die Hausnummer ist <b>{addr:housenumber}</b>",
|
||||
"hu": "A házszám: <b>{addr:housenumber}</b>"
|
||||
"hu": "A házszám: <b>{addr:housenumber}</b>",
|
||||
"fr": "Son numéro est le <b>{addr:housenumber}</b>"
|
||||
},
|
||||
"question": {
|
||||
"en": "What is the number of this house?",
|
||||
"de": "Wie lautet die Nummer dieses Hauses?",
|
||||
"hu": "Mi ennek az épületnek a házszáma?",
|
||||
"nl": "Wat is het huisnummer van dit huis?"
|
||||
"nl": "Wat is het huisnummer van dit huis?",
|
||||
"fr": "Quel est le numéro de ce bâtiment ?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "addr:housenumber",
|
||||
|
@ -70,7 +75,8 @@
|
|||
"en": "This building has no house number",
|
||||
"nl": "Dit gebouw heeft geen huisnummer",
|
||||
"de": "Dieses Gebäude hat keine Hausnummer",
|
||||
"hu": "Ennek az épületnek nincs házszáma"
|
||||
"hu": "Ennek az épületnek nincs házszáma",
|
||||
"fr": "Ce bâtiment n’a pas de numéro"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -81,13 +87,15 @@
|
|||
"en": "This address is in street <b>{addr:street}</b>",
|
||||
"de": "Diese Adresse befindet sich in der Straße <b>{addr:street}</b>",
|
||||
"hu": "Ez a cím a következő utcában van: <b>{addr:street}</b>",
|
||||
"nl": "Dit adres bevindt zich in de straat <b>{addr:street}</b>"
|
||||
"nl": "Dit adres bevindt zich in de straat <b>{addr:street}</b>",
|
||||
"fr": "Le nom de la voie est <b>{addr:street}</b>"
|
||||
},
|
||||
"question": {
|
||||
"en": "What street is this address located in?",
|
||||
"de": "In welcher Straße befindet sich diese Adresse?",
|
||||
"hu": "Melyik utcában található ez a cím?",
|
||||
"nl": "In welke straat bevindt dit adres zich?"
|
||||
"nl": "In welke straat bevindt dit adres zich?",
|
||||
"fr": "Dans quelle rue est située l’adresse ?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "addr:street"
|
||||
|
@ -122,7 +130,8 @@
|
|||
"en": "What should be fixed here? Please explain",
|
||||
"zh_Hant": "這裡需要修什麼?請直接解釋",
|
||||
"de": "Was sollte hier korrigiert werden? Bitte erläutern",
|
||||
"hu": "Mit kellene itt kijavítani? Légy szíves, magyarázd el"
|
||||
"hu": "Mit kellene itt kijavítani? Légy szíves, magyarázd el",
|
||||
"fr": "Précisez ce qui devrait être corrigé ici"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "fixme"
|
||||
|
|
|
@ -5,13 +5,15 @@
|
|||
"nl": "Barrières",
|
||||
"de": "Hindernisse",
|
||||
"ru": "Препятствия",
|
||||
"hu": "Akadályok"
|
||||
"hu": "Akadályok",
|
||||
"fr": "Barrières"
|
||||
},
|
||||
"description": {
|
||||
"en": "Obstacles while cycling, such as bollards and cycle barriers",
|
||||
"nl": "Hindernissen tijdens het fietsen, zoals paaltjes en fietshekjes",
|
||||
"de": "Hindernisse beim Fahrradfahren, wie zum Beispiel Poller und Fahrrad Barrieren",
|
||||
"hu": "Kerékpározás közbeni akadályok, például terelőoszlopok és kerékpárakadályok"
|
||||
"hu": "Kerékpározás közbeni akadályok, például terelőoszlopok és kerékpárakadályok",
|
||||
"fr": "Obstacles à vélo, tels que des potelets ou des barrières"
|
||||
},
|
||||
"source": {
|
||||
"osmTags": {
|
||||
|
@ -27,7 +29,8 @@
|
|||
"en": "Barrier",
|
||||
"nl": "Barrière",
|
||||
"de": "Hindernis",
|
||||
"ru": "Препятствие"
|
||||
"ru": "Препятствие",
|
||||
"fr": "Barrière"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -45,7 +48,8 @@
|
|||
"then": {
|
||||
"en": "Cycling Barrier",
|
||||
"nl": "Fietshekjes",
|
||||
"de": "Barriere für Radfahrer"
|
||||
"de": "Barriere für Radfahrer",
|
||||
"fr": "Barrière cyclable"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -67,7 +71,8 @@
|
|||
"en": "A bollard in the road",
|
||||
"nl": "Een paaltje in de weg",
|
||||
"de": "Ein Poller auf der Straße",
|
||||
"hu": "Terelőoszlop az úton"
|
||||
"hu": "Terelőoszlop az úton",
|
||||
"fr": "Un potelet sur le chemin"
|
||||
},
|
||||
"preciseInput": {
|
||||
"preferredBackground": [
|
||||
|
@ -82,7 +87,8 @@
|
|||
"en": "Cycle barrier",
|
||||
"nl": "Fietshekjes",
|
||||
"de": "Fahrradhindernis",
|
||||
"hu": "Kerékpárakadály"
|
||||
"hu": "Kerékpárakadály",
|
||||
"fr": "Barrière cyclable"
|
||||
},
|
||||
"tags": [
|
||||
"barrier=cycle_barrier"
|
||||
|
@ -91,7 +97,8 @@
|
|||
"en": "Cycle barrier, slowing down cyclists",
|
||||
"nl": "Fietshekjes, voor het afremmen van fietsers",
|
||||
"de": "Fahrradhindernis, das Radfahrer abbremst",
|
||||
"hu": "A kerékpáros sebességét csökkentő kerékpárakadály"
|
||||
"hu": "A kerékpáros sebességét csökkentő kerékpárakadály",
|
||||
"fr": "Barrières cyclables, ralentissant les cyclistes"
|
||||
},
|
||||
"preciseInput": {
|
||||
"preferredBackground": [
|
||||
|
@ -223,7 +230,8 @@
|
|||
"en": "What kind of cycling barrier is this?",
|
||||
"nl": "Wat voor fietshekjes zijn dit?",
|
||||
"de": "Um welche Art Fahrradhindernis handelt es sich?",
|
||||
"hu": "Milyen fajta kerékpárakadály ez?"
|
||||
"hu": "Milyen fajta kerékpárakadály ez?",
|
||||
"fr": "Quel est ce type de barrière cyclable ?"
|
||||
},
|
||||
"condition": "barrier=cycle_barrier",
|
||||
"mappings": [
|
||||
|
@ -233,7 +241,8 @@
|
|||
"en": "Single, just two barriers with a space inbetween <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>",
|
||||
"nl": "Enkelvoudig, slechts twee hekjes met ruimte ertussen <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>",
|
||||
"de": "Einfach, nur zwei Barrieren mit einem Zwischenraum <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>",
|
||||
"hu": "Egyszeres: csak két korlát, közöttük térköz <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>"
|
||||
"hu": "Egyszeres: csak két korlát, közöttük térköz <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>",
|
||||
"fr": "Simple, deux barrières côte à côte <img src='./assets/themes/cycle_infra/Cycle_barrier_single.png' style='width:8em'>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -242,7 +251,8 @@
|
|||
"en": "Double, two barriers behind each other <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>",
|
||||
"nl": "Dubbel, twee hekjes achter elkaar <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>",
|
||||
"de": "Doppelt, zwei Barrieren hintereinander <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>",
|
||||
"hu": "Kétszeres: két, egymáshoz képest eltolt korlát egymás után <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>"
|
||||
"hu": "Kétszeres: két, egymáshoz képest eltolt korlát egymás után <img src='./assets/themes/cycle_infra/Cycle_barrier_double.svg' style='width:8em'>",
|
||||
"fr": "Double, deux barrières successives"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -251,7 +261,8 @@
|
|||
"en": "Triple, three barriers behind each other <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>",
|
||||
"nl": "Drievoudig, drie hekjes achter elkaar <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>",
|
||||
"de": "Dreifach, drei Barrieren hintereinander <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>",
|
||||
"hu": "Háromszoros: három, egymáshoz képest eltolt korlát egymás után <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>"
|
||||
"hu": "Háromszoros: három, egymáshoz képest eltolt korlát egymás után <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>",
|
||||
"fr": "Triple, trois barrières successives <img src='./assets/themes/cycle_infra/Cycle_barrier_triple.png' style='width:8em'>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -260,7 +271,8 @@
|
|||
"en": "Squeeze gate, gap is smaller at top, than at the bottom <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>",
|
||||
"nl": "Knijppoort, ruimte is smaller aan de top, dan aan de bodem <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>",
|
||||
"de": "Eine Durchfahrtsbeschränkung, Durchfahrtsbreite ist oben kleiner als unten <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>",
|
||||
"hu": "Szűkítőkapu: a rés felül keskenyebb, mint alul <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>"
|
||||
"hu": "Szűkítőkapu: a rés felül keskenyebb, mint alul <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>",
|
||||
"fr": "Poire, l’espace en hauteur est plus faible qu’au sol <img src='./assets/themes/cycle_infra/Cycle_barrier_squeeze.png' style='width:8em'>"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -278,7 +290,8 @@
|
|||
"en": "How wide is the gap left over besides the barrier?",
|
||||
"nl": "Hoe breed is de ruimte naast de barrière?",
|
||||
"de": "Welche Durchfahrtsbreite hat das Hindernis?",
|
||||
"hu": "Milyen széles az akadályon az a rés, amelyen át lehet haladni?"
|
||||
"hu": "Milyen széles az akadályon az a rés, amelyen át lehet haladni?",
|
||||
"fr": "Quelle est la largeur du passage ?"
|
||||
},
|
||||
"condition": {
|
||||
"and": [
|
||||
|
@ -301,13 +314,15 @@
|
|||
"en": "Space between barriers (along the length of the road): {width:separation} m",
|
||||
"nl": "Ruimte tussen barrières (langs de lengte van de weg): {width:separation} m",
|
||||
"de": "Abstand zwischen den Barrieren (entlang der Straße): {width:separation} m",
|
||||
"hu": "A korlátok közötti távolság (az út irányában): {width:separation} m"
|
||||
"hu": "A korlátok közötti távolság (az út irányában): {width:separation} m",
|
||||
"fr": "Espace entre deux barrières successives : {width:separation} m"
|
||||
},
|
||||
"question": {
|
||||
"en": "How much space is there between the barriers (along the length of the road)?",
|
||||
"nl": "Hoeveel ruimte is er tussen de barrières (langs de lengte van de weg)?",
|
||||
"de": "Wie groß ist der Abstand zwischen den Barrieren (entlang der Straße)?",
|
||||
"hu": "Mekkora távolság van a korlátok között (az út irányában)?"
|
||||
"hu": "Mekkora távolság van a korlátok között (az út irányában)?",
|
||||
"fr": "Combien d’espace sépare deux barrières successives ?"
|
||||
},
|
||||
"condition": {
|
||||
"or": [
|
||||
|
@ -359,13 +374,15 @@
|
|||
"render": {
|
||||
"en": "Overlap: {overlap} m",
|
||||
"de": "Überschneidung: {overlap} m",
|
||||
"hu": "Átfedés: {overlap} m"
|
||||
"hu": "Átfedés: {overlap} m",
|
||||
"fr": "Chevauchement : {overlap} m"
|
||||
},
|
||||
"question": {
|
||||
"en": "How much overlap do the barriers have?",
|
||||
"nl": "Hoeveel overlappen de barrières?",
|
||||
"de": "Wie stark überschneiden sich die Barrieren?",
|
||||
"hu": "Mekkora a korlátok átfedése?"
|
||||
"hu": "Mekkora a korlátok átfedése?",
|
||||
"fr": "Quel est le chevauchement des barrières ?"
|
||||
},
|
||||
"condition": {
|
||||
"or": [
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
"name": {
|
||||
"en": "Crossings",
|
||||
"nl": "Oversteekplaatsen",
|
||||
"de": "Kreuzungen"
|
||||
"de": "Kreuzungen",
|
||||
"fr": "Traversée"
|
||||
},
|
||||
"description": {
|
||||
"en": "Crossings for pedestrians and cyclists",
|
||||
"nl": "Oversteekplaatsen voor voetgangers en fietsers",
|
||||
"de": "Übergänge für Fußgänger und Radfahrer"
|
||||
"de": "Übergänge für Fußgänger und Radfahrer",
|
||||
"fr": "Traversée pour piétons et cyclistes"
|
||||
},
|
||||
"source": {
|
||||
"osmTags": {
|
||||
|
@ -23,7 +25,8 @@
|
|||
"render": {
|
||||
"en": "Crossing",
|
||||
"nl": "Oversteekplaats",
|
||||
"de": "Kreuzung"
|
||||
"de": "Kreuzung",
|
||||
"fr": "Traversée"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -32,7 +35,8 @@
|
|||
"en": "Traffic signal",
|
||||
"nl": "Verkeerslicht",
|
||||
"ru": "Светофор",
|
||||
"de": "Ampel"
|
||||
"de": "Ampel",
|
||||
"fr": "Feu de signalisation"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -40,7 +44,8 @@
|
|||
"then": {
|
||||
"en": "Crossing with traffic signals",
|
||||
"nl": "Oversteektplaats met verkeerslichten",
|
||||
"de": "Kreuzung mit Ampeln"
|
||||
"de": "Kreuzung mit Ampeln",
|
||||
"fr": "Traversée avec feu de signalisation"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -50,7 +55,8 @@
|
|||
"title": {
|
||||
"en": "Crossing",
|
||||
"nl": "Oversteekplaats",
|
||||
"de": "Kreuzung"
|
||||
"de": "Kreuzung",
|
||||
"fr": "Traversée"
|
||||
},
|
||||
"tags": [
|
||||
"highway=crossing"
|
||||
|
@ -58,7 +64,8 @@
|
|||
"description": {
|
||||
"en": "Crossing for pedestrians and/or cyclists",
|
||||
"nl": "Oversteekplaats voor voetgangers en/of fietsers",
|
||||
"de": "Kreuzung für Fußgänger und/oder Radfahrer"
|
||||
"de": "Kreuzung für Fußgänger und/oder Radfahrer",
|
||||
"fr": "Traversée pour piétons et/ou cyclistes"
|
||||
},
|
||||
"preciseInput": {
|
||||
"preferredBackground": [
|
||||
|
@ -73,7 +80,8 @@
|
|||
"en": "Traffic signal",
|
||||
"nl": "Verkeerslicht",
|
||||
"ru": "Светофор",
|
||||
"de": "Ampel"
|
||||
"de": "Ampel",
|
||||
"fr": "Feu de signalisation"
|
||||
},
|
||||
"tags": [
|
||||
"highway=traffic_signals"
|
||||
|
@ -81,7 +89,8 @@
|
|||
"description": {
|
||||
"en": "Traffic signal on a road",
|
||||
"nl": "Verkeerslicht op een weg",
|
||||
"de": "Ampel an einer Straße"
|
||||
"de": "Ampel an einer Straße",
|
||||
"fr": "Feu de signalisation sur la voie"
|
||||
},
|
||||
"preciseInput": {
|
||||
"preferredBackground": [
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"name": {
|
||||
"en": "Cycleways and roads",
|
||||
"nl": "Fietspaden, straten en wegen",
|
||||
"de": "Radwege und Straßen"
|
||||
"de": "Radwege und Straßen",
|
||||
"fr": "Pistes cyclables et routes"
|
||||
},
|
||||
"minzoom": 16,
|
||||
"source": {
|
||||
|
@ -33,7 +34,8 @@
|
|||
"en": "Cycleways",
|
||||
"nl": "Fietspaden",
|
||||
"de": "Radwege",
|
||||
"ru": "Велосипедные дорожки"
|
||||
"ru": "Велосипедные дорожки",
|
||||
"fr": "Pistes cyclables"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -47,7 +49,8 @@
|
|||
"nl": "Fietsweg",
|
||||
"en": "Cycleway",
|
||||
"de": "Radweg",
|
||||
"ru": "Велосипедная дорожка"
|
||||
"ru": "Велосипедная дорожка",
|
||||
"fr": "Piste cyclable"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -55,7 +58,8 @@
|
|||
"then": {
|
||||
"nl": "Fietssuggestiestrook",
|
||||
"en": "Shared lane",
|
||||
"de": "Gemeinsame Fahrspur"
|
||||
"de": "Gemeinsame Fahrspur",
|
||||
"fr": "Voie partagée"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -63,7 +67,8 @@
|
|||
"then": {
|
||||
"nl": "Fietsstrook",
|
||||
"en": "Bike lane",
|
||||
"de": "Fahrradspur"
|
||||
"de": "Fahrradspur",
|
||||
"fr": "Bande cyclable"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -71,7 +76,8 @@
|
|||
"then": {
|
||||
"en": "Cycleway next to the road",
|
||||
"nl": "Fietsweg naast de weg",
|
||||
"de": "Radweg neben der Straße"
|
||||
"de": "Radweg neben der Straße",
|
||||
"fr": "Piste cyclable séparée de la route"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -79,7 +85,8 @@
|
|||
"then": {
|
||||
"nl": "Fietsstraat",
|
||||
"en": "Cyclestreet",
|
||||
"de": "Fahrradstraße"
|
||||
"de": "Fahrradstraße",
|
||||
"fr": "Vélorue"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"en": "Trails",
|
||||
"nl": "Wandeltochten",
|
||||
"ru": "Тропы",
|
||||
"de": "Wanderwege"
|
||||
"de": "Wanderwege",
|
||||
"fr": "Sentiers"
|
||||
},
|
||||
"minzoom": 12,
|
||||
"source": {
|
||||
|
@ -25,7 +26,8 @@
|
|||
"en": "Trail",
|
||||
"nl": "Wandeltocht",
|
||||
"ru": "Тропа",
|
||||
"de": "Wanderweg"
|
||||
"de": "Wanderweg",
|
||||
"fr": "Sentier"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
"en": "{name}",
|
||||
"de": "{name}",
|
||||
"ru": "{name}",
|
||||
"eo": "{name}"
|
||||
"eo": "{name}",
|
||||
"fr": "{name}"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -48,7 +49,8 @@
|
|||
"en": "{name}",
|
||||
"de": "{name}",
|
||||
"ru": "{name}",
|
||||
"eo": "{name}"
|
||||
"eo": "{name}",
|
||||
"fr": "{name}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"en": "Watermill",
|
||||
"de": "Wassermühle",
|
||||
"ru": "Водяная мельница",
|
||||
"id": "Kincir Air"
|
||||
"id": "Kincir Air",
|
||||
"fr": "Moulin à eau"
|
||||
},
|
||||
"minzoom": 12,
|
||||
"source": {
|
||||
|
|
|
@ -109,7 +109,8 @@
|
|||
"nb_NO": "Hva er respektivt element på Wikipedia?",
|
||||
"ca": "Quin és l'ítem a Viquipèdia?",
|
||||
"sv": "Vad är det motsvarande objektet på Wikipedia?",
|
||||
"zh_Hant": "維基百科上對應的項目是什麼?"
|
||||
"zh_Hant": "維基百科上對應的項目是什麼?",
|
||||
"fr": "Quel est l’élément Wikipédia correspondant ?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -462,7 +463,8 @@
|
|||
"de": "Gibt es an dieser Einrichtung Steckdosen, an denen Kunden ihre Geräte laden können?",
|
||||
"sv": "Har den här bekvämligheten eluttag tillgängliga för kunder när de är inne?",
|
||||
"zh_Hant": "這個便利設施有電器設備,能給客戶使用嗎?",
|
||||
"hu": "Van-e ebben a létesítményben olyan konnektor, amely a bent tartózkodó ügyfelek rendelkezésére áll?"
|
||||
"hu": "Van-e ebben a létesítményben olyan konnektor, amely a bent tartózkodó ügyfelek rendelkezésére áll?",
|
||||
"fr": "Des prises sont elles à disposition des client·e·s en intérieur ?"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -474,7 +476,8 @@
|
|||
"de": "Für Kunden stehen im Innenraum viele Steckdosen zur Verfügung, an denen sie ihre Geräte laden können",
|
||||
"sv": "Det finns gott om hushållsuttag tillgängliga för kunder som sitter inomhus, där de kan ladda sin elektronik",
|
||||
"zh_Hant": "這邊的客戶座位有不少個室內插座,而且可以為電器充電",
|
||||
"hu": "Számos konnektor áll a belső térben ügyfelek rendelkezésére, ahol elektromos készülékeiket tölthetik"
|
||||
"hu": "Számos konnektor áll a belső térben ügyfelek rendelkezésére, ahol elektromos készülékeiket tölthetik",
|
||||
"fr": "Il y a suffisamment de prises disponibles pour les client·e·s en intérieur souhaitant recharger leurs appareils"
|
||||
},
|
||||
"if": "service:electricity=yes"
|
||||
},
|
||||
|
@ -487,7 +490,8 @@
|
|||
"de": "Für Kunden stehen im Innenraum wenig Steckdosen zur Verfügung, an denen sie ihre Geräte laden können",
|
||||
"sv": "Det finns ett fåtal hushållsuttag tillgängliga för kunder som sitter inomhus, där de kan ladda sin elektronik",
|
||||
"zh_Hant": "這邊客戶座位有一些室內插座,可以為電器充電",
|
||||
"hu": "Csupán néhány konnektor áll a belső térben ügyfelek rendelkezésére, ahol elektromos készülékeiket tölthetik"
|
||||
"hu": "Csupán néhány konnektor áll a belső térben ügyfelek rendelkezésére, ahol elektromos készülékeiket tölthetik",
|
||||
"fr": "Il y a peu de prises disponibles pour les client·e·s en intérieur souhaitant recharger leurs appareils"
|
||||
},
|
||||
"if": "service:electricity=limited"
|
||||
},
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
"de": "Fahrradbibliotheken sind Orte, um Fahrräder auszuleihen, oft gegen eine geringe Gebühr. Ein wichtiger Anwendungsfall sind Fahrradbibliotheken für Kinder, die es ihnen ermöglichen, auf ein größeres Fahrrad umzusteigen, wenn sie aus ihrem aktuellen Fahrrad herausgewachsen sind"
|
||||
},
|
||||
"icon": "./assets/themes/bicyclelib/logo.svg",
|
||||
"socialImage": null,
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
"it": "Una minibiblioteca è una piccola cabina a lato della strada, una scatola, una vecchia cabina telefonica o qualche altro contenitore che ospita libri. Tutti può lasciare o prendere un libro. Questa mappa punta a rappresentarle tutte. Puoi facilmente scoprire nuove minibiblioteche nelle tue vicinanze e, con un account gratuito su OpenStreetMap, puoi aggiungerne altre."
|
||||
},
|
||||
"icon": "./assets/themes/bookcases/bookcase.svg",
|
||||
"socialImage": null,
|
||||
"startLat": 0,
|
||||
"startLon": 0,
|
||||
"startZoom": 1,
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./assets/svg/mapcomplete_logo.svg",
|
||||
"src": "assets/svg/mapcomplete_logo.svg",
|
||||
"sizes": "513x513",
|
||||
"type": "image/svg"
|
||||
}
|
||||
|
|
|
@ -55,6 +55,6 @@ cd dist
|
|||
echo -e "Fixing social images..."
|
||||
for file in $(ls *.html)
|
||||
do
|
||||
sed -i 's!<meta content="\([^"]\+\)" property="og:image">!<meta content="./\1" property="og:image">!' $file
|
||||
sed -i 's!<meta property="og:image" content="\([^"]\+\)">!<meta content="./\1" property="og:image">!' $file
|
||||
# sed -i 's!<meta content="\([^"]\+\)" property="og:image">!<meta content="./\1" property="og:image">!' $file
|
||||
# sed -i 's!<meta property="og:image" content="\([^"]\+\)">!<meta content="./\1" property="og:image">!' $file
|
||||
done
|
|
@ -114,8 +114,8 @@ async function createLandingPage(layout: LayoutConfig, manifest) {
|
|||
|
||||
Locale.language.setData(layout.language[0]);
|
||||
|
||||
const ogTitle = Translations.WT(layout.title).txt;
|
||||
const ogDescr = Translations.WT(layout.shortDescription ?? "Easily add and edit geodata with OpenStreetMap").txt;
|
||||
const ogTitle = Translations.WT(layout.title).txt.replace(/"/g, '\\"');
|
||||
const ogDescr = Translations.WT(layout.shortDescription ?? "Easily add and edit geodata with OpenStreetMap").txt.replace(/"/g, '\\"');
|
||||
const ogImage = layout.socialImage;
|
||||
|
||||
let customCss = "";
|
||||
|
@ -130,9 +130,15 @@ async function createLandingPage(layout: LayoutConfig, manifest) {
|
|||
}
|
||||
|
||||
const og = `
|
||||
<meta property="og:image" content="${ogImage ?? './assets/SocialImage.png'}">
|
||||
<meta property="og:image" content="${ogImage ?? 'assets/SocialImage.png'}">
|
||||
<meta property="og:title" content="${ogTitle}">
|
||||
<meta property="og:description" content="${ogDescr}">`
|
||||
<meta property="og:description" content="${ogDescr}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@mapcomplete.osm;be">
|
||||
<meta name="twitter:creator" content="@pietervdvn">
|
||||
<meta name="twitter:title" content="${ogTitle}">
|
||||
<meta name="twitter:description" content="${ogDescr}">
|
||||
<meta name="twitter:image" content="${ogImage}">`
|
||||
|
||||
let icon = layout.icon;
|
||||
if (icon.startsWith("<?xml") || icon.startsWith("<svg")) {
|
||||
|
@ -154,7 +160,6 @@ async function createLandingPage(layout: LayoutConfig, manifest) {
|
|||
`<link rel="manifest" href="${enc(layout.id)}.webmanifest">`,
|
||||
og,
|
||||
customCss,
|
||||
`<link rel="icon" href="assets/svg/add.svg" sizes="any" type="image/svg+xml">`,
|
||||
`<link rel="icon" href="${icon}" sizes="any" type="image/svg+xml">`,
|
||||
...apple_icons
|
||||
].join("\n")
|
||||
|
@ -217,11 +222,12 @@ for (const i in all) {
|
|||
}
|
||||
|
||||
createManifest(new LayoutConfig({
|
||||
icon: "./assets/svg/mapcomplete_logo.svg",
|
||||
icon: "assets/svg/mapcomplete_logo.svg",
|
||||
id: "index",
|
||||
language: "en",
|
||||
layers: [],
|
||||
maintainer: "Pieter Vander Vennet",
|
||||
socialImage: "assets/SocialImage.png",
|
||||
startLat: 0,
|
||||
startLon: 0,
|
||||
startZoom: 0,
|
||||
|
|
|
@ -19,6 +19,7 @@ export default class LegacyThemeLoaderSpec extends T {
|
|||
"language": [
|
||||
"en"
|
||||
],
|
||||
socialImage: "img.jpg",
|
||||
"version": "2021-10-02",
|
||||
"startLat": 51.1599,
|
||||
"startLon": 3.34750,
|
||||
|
|
|
@ -19,6 +19,7 @@ export default class ReplaceGeometrySpec extends T {
|
|||
"nl",
|
||||
"en"
|
||||
],
|
||||
socialImage: "img.jpg",
|
||||
"version": "0",
|
||||
"startLat": 51.0249,
|
||||
"startLon": 4.026489,
|
||||
|
|
Loading…
Reference in a new issue