From 174a0e1852f1ff5e580647f2dd60a09cd9caeb3a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 22 Jun 2022 20:18:17 +0200 Subject: [PATCH] Fix build, remove no longer used 'favourite layers --- Logic/State/UserRelatedState.ts | 18 +---- assets/layers/cafe_pub/cafe_pub.json | 2 +- assets/layers/etymology/etymology.json | 2 +- .../mapcomplete-changes.json | 75 +++++++++++++++---- langs/layers/en.json | 31 ++++++++ langs/layers/es.json | 22 ++++++ langs/layers/nl.json | 31 ++++++++ 7 files changed, 149 insertions(+), 32 deletions(-) diff --git a/Logic/State/UserRelatedState.ts b/Logic/State/UserRelatedState.ts index febeb9201..8fbd9c5df 100644 --- a/Logic/State/UserRelatedState.ts +++ b/Logic/State/UserRelatedState.ts @@ -33,14 +33,10 @@ export default class UserRelatedState extends ElementsState { * The key for mangrove */ public mangroveIdentity: MangroveIdentity; - /** - * Which layers are enabled in the personal theme - */ - public favouriteLayers: UIEventSource; public readonly isTranslator : Store; - public readonly installedUserThemes: UIEventSource + public readonly installedUserThemes: Store constructor(layoutToUse: LayoutConfig, options?: { attemptLogin: true | boolean }) { super(layoutToUse); @@ -107,16 +103,6 @@ export default class UserRelatedState extends ElementsState { })) } - - // Important: the favourite layers are initialized _after_ the installed themes, as these might contain an installedTheme - this.favouriteLayers = LocalStorageSource.Get("favouriteLayers") - .syncWith(this.osmConnection.GetLongPreference("favouriteLayers")) - .sync( - (str) => Utils.Dedup(str?.split(";")) ?? [], - [], - (layers) => Utils.Dedup(layers)?.join(";") - ); - this.InitializeLanguage(); new SelectedElementTagsUpdater(this) this.installedUserThemes = this.InitInstalledUserThemes(); @@ -149,7 +135,7 @@ export default class UserRelatedState extends ElementsState { Locale.language.ping(); } - private InitInstalledUserThemes(): UIEventSource{ + private InitInstalledUserThemes(): Store{ const prefix = "mapcomplete-unofficial-theme-"; const postfix = "-combined-length" return this.osmConnection.preferencesHandler.preferences.map(prefs => diff --git a/assets/layers/cafe_pub/cafe_pub.json b/assets/layers/cafe_pub/cafe_pub.json index 3223ca960..843999ce7 100644 --- a/assets/layers/cafe_pub/cafe_pub.json +++ b/assets/layers/cafe_pub/cafe_pub.json @@ -335,4 +335,4 @@ "es": "Una capa que muestra cafeterías y bares donde uno se puede reunir con una bebida. La capa hace algunas preguntas relevantes", "da": "Et lag med caféer og pubber, hvor man kan samles omkring en drink. Laget stiller nogle relevante spørgsmål" } -} +} \ No newline at end of file diff --git a/assets/layers/etymology/etymology.json b/assets/layers/etymology/etymology.json index 846d8f119..3e3ad2cce 100644 --- a/assets/layers/etymology/etymology.json +++ b/assets/layers/etymology/etymology.json @@ -330,4 +330,4 @@ } } ] -} +} \ No newline at end of file diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 996bd4deb..c909ddf2e 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,13 +1,24 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete" + "en": "Changes made with MapComplete", + "de": "Änderungen mit MapComplete", + "es": "Cambios hechos con MapComplete", + "nb_NO": "Endringer utført med MapComplete", + "nl": "Wijzigingen gemaakt met MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete" + "en": "Shows changes made by MapComplete", + "de": "Zeigt Änderungen von MapComplete", + "es": "Muestra los cambios hechos por MapComplete", + "nb_NO": "Vis endringer utført med MapComplete", + "nl": "Toont wijzigingen gemaakt met MapComplete" }, "description": { - "en": "This maps shows all the changes made with MapComplete" + "en": "This maps shows all the changes made with MapComplete", + "de": "Diese Karte zeigt alle Änderungen die mit MapComplete gemacht wurden", + "es": "Este mapa muestra todos los cambios hechos con MapComplete", + "nl": "Deze kaart toont alle wijzigingen die met MapComplete werden gemaakt" }, "maintainer": "", "icon": "./assets/svg/logo.svg", @@ -22,7 +33,10 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers" + "en": "Changeset centers", + "de": "Schwerpunkte von Änderungssätzen", + "es": "Centros de conjuntos de cambios", + "nb_NO": "Endringssettsenter" }, "minzoom": 0, "source": { @@ -36,35 +50,55 @@ ], "title": { "render": { - "en": "Changeset for {theme}" + "en": "Changeset for {theme}", + "de": "Änderungen für {theme}", + "es": "Conjunto de cambios para {theme}", + "nb_NO": "Endringssett for {theme}", + "nl": "Wijzigingset voor {theme}" } }, "description": { - "en": "Shows all MapComplete changes" + "en": "Shows all MapComplete changes", + "de": "Zeigt alle MapComplete Änderungen", + "es": "Muestra todos los cambios de MapComplete", + "nl": "Toont alle wijzigingen met MapComplete" }, "tagRenderings": [ { "id": "render_id", "render": { - "en": "Changeset {id}" + "en": "Changeset {id}", + "de": "Änderung {id}", + "es": "Conjunto de cambios {id}", + "nb_NO": "Endringssett {id}", + "nl": "Wijzigingset {id}" } }, { "id": "contributor", "render": { - "en": "Change made by {_last_edit:contributor}" + "en": "Change made by {_last_edit:contributor}", + "de": "Änderung wurde von {_last_edit:contributor} gemacht", + "es": "Cambio hecho por {_last_edit:contributor}", + "nl": "Wijziging gemaakt door {_last_edit:contributor}" } }, { "id": "theme", "render": { - "en": "Change with theme {theme}" + "en": "Change with theme {theme}", + "de": "Änderung mit Thema {theme}", + "es": "Cambio con tema {theme}", + "nl": "Wijziging met thema {theme}" }, "mappings": [ { "if": "theme~http.*", "then": { - "en": "Change with unofficial theme {theme}" + "en": "Change with unofficial theme {theme}", + "de": "Änderung mit inoffiziellem Thema {theme}", + "es": "Cambio con tema no oficial {theme}", + "nl": "Wijziging met officieus thema {theme}" } } ] @@ -340,7 +374,11 @@ } ], "question": { - "en": "Themename contains {search}" + "en": "Themename contains {search}", + "de": "Themenname enthält {search}", + "es": "Nombre del tema contiene {search}", + "nb_NO": "Temanavn inneholder {search}", + "nl": "Themanaam bevat {search}" } } ] @@ -356,7 +394,10 @@ } ], "question": { - "en": "Made by contributor {search}" + "en": "Made by contributor {search}", + "de": "Erstellt von {search}", + "es": "Hecho por contributor/a {search}", + "nl": "Gemaakt door bijdrager {search}" } } ] @@ -372,7 +413,10 @@ } ], "question": { - "en": "Not made by contributor {search}" + "en": "Not made by contributor {search}", + "de": "Nicht erstellt von {search}", + "es": "No hecho por contributor/a {search}", + "nl": "Niet gemaakt door bijdrager {search}" } } ] @@ -387,7 +431,10 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here" + "en": "More statistics can be found here", + "de": "Weitere Statistiken finden Sie hier", + "es": "Se pueden encontrar más estadísticas aquí", + "nl": "Meer statistieken kunnen hier gevonden worden" } }, { diff --git a/langs/layers/en.json b/langs/layers/en.json index bd486da80..bc89b97ef 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -3895,6 +3895,37 @@ } }, "tagRenderings": { + "6": { + "renderings": { + "0": { + "mappings": { + "0": { + "then": "There is {device-name} available at this hackerspace" + }, + "1": { + "then": "There is no {negative-name} available at this hackerspace" + } + }, + "question": "Is {device-name} available at this hackerspace?" + } + }, + "rewrite": { + "into": { + "0": { + "1": "a 3D-printer", + "2": "3D-printer" + }, + "1": { + "1": "a laser cutter", + "2": "laser cutter" + }, + "2": { + "1": "a CNC drill", + "2": "CNC drill" + } + } + } + }, "hackerspaces-name": { "question": "What is the name of this hackerspace?", "render": "This hackerspace is named {name}" diff --git a/langs/layers/es.json b/langs/layers/es.json index 1271f9bfc..f474d7ae9 100644 --- a/langs/layers/es.json +++ b/langs/layers/es.json @@ -2612,6 +2612,28 @@ "render": "Mapa" } }, + "maxspeed": { + "name": "Velocidad", + "tagRenderings": { + "maxspeed-maxspeed": { + "question": "Qué velocidad tiene" + } + }, + "units": { + "0": { + "applicableUnits": { + "0": { + "human": "kilómetros/hora", + "humanShort": "km/h" + }, + "1": { + "human": "millas/hora", + "humanShort": "mph" + } + } + } + } + }, "nature_reserve": { "description": "", "tagRenderings": { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 67b1fae19..d6331dd9c 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -3824,6 +3824,37 @@ } }, "tagRenderings": { + "6": { + "renderings": { + "0": { + "mappings": { + "0": { + "then": "Er is {device-name} beschikbaar in deze hackerspace" + }, + "1": { + "then": "Er is geen {negative-name} beschikbaar in deze hackerspace" + } + }, + "question": "Is er {device-name} beschikbaar in deze hackerspace?" + } + }, + "rewrite": { + "into": { + "0": { + "1": "een 3D-printer", + "2": "3D-printer" + }, + "1": { + "1": "een lasercutter", + "2": "lasercutter" + }, + "2": { + "1": "een CNC-boormachine", + "2": "CNC-boormachine" + } + } + } + }, "hackerspaces-name": { "question": "Wat is de naam van deze hackerspace?", "render": "Deze hackerspace heet {name}"