From 133ea2f8dcbc796926ad0018109be8fbfe8397b0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 18 Jun 2024 00:51:17 +0200 Subject: [PATCH] Fix tests --- .../mapcomplete-changes.json | 90 +++++++++++++------ assets/themes/playgrounds/playgrounds.json | 1 - langs/layers/en.json | 7 ++ langs/layers/nl.json | 7 ++ src/Logic/Actors/InitialMapPositioning.ts | 2 +- 5 files changed, 76 insertions(+), 31 deletions(-) diff --git a/assets/themes/mapcomplete-changes/mapcomplete-changes.json b/assets/themes/mapcomplete-changes/mapcomplete-changes.json index 71a45eb7f..b4818b4eb 100644 --- a/assets/themes/mapcomplete-changes/mapcomplete-changes.json +++ b/assets/themes/mapcomplete-changes/mapcomplete-changes.json @@ -1,13 +1,17 @@ { "id": "mapcomplete-changes", "title": { - "en": "Changes made with MapComplete" + "en": "Changes made with MapComplete", + "de": "Änderungen mit MapComplete" }, "shortDescription": { - "en": "Shows changes made by MapComplete" + "en": "Shows changes made by MapComplete", + "de": "Änderungen von MapComplete anzeigen" }, "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 mit MapComplete vorgenommenen Änderungen", + "pl": "Ta mapa pokazuje wszystkie zmiany wprowadzone za pomocą MapComplete" }, "icon": "./assets/svg/logo.svg", "hideFromOverview": true, @@ -18,7 +22,9 @@ { "id": "mapcomplete-changes", "name": { - "en": "Changeset centers" + "en": "Changeset centers", + "de": "Zentrum der Änderungssätze", + "zh_Hant": "變更集中心" }, "minzoom": 0, "source": { @@ -28,41 +34,48 @@ }, "title": { "render": { - "en": "Changeset for {theme}" + "en": "Changeset for {theme}", + "de": "Änderungssatz für {theme}" } }, "description": { - "en": "Shows all MapComplete changes" + "en": "Shows all MapComplete changes", + "de": "Alle MapComplete-Änderungen anzeigen" }, "tagRenderings": [ { "id": "show_changeset_id", "render": { - "en": "Changeset {id}" + "en": "Changeset {id}", + "de": "Änderungssatz {id}" } }, { "id": "contributor", "question": { - "en": "What contributor did make this change?" + "en": "What contributor did make this change?", + "de": "Welcher Mitwirkende hat diese Änderung vorgenommen?" }, "freeform": { "key": "user" }, "render": { - "en": "Change made by {user}" + "en": "Change made by {user}", + "de": "Änderung vorgenommen von {user}" } }, { "id": "theme-id", "question": { - "en": "What theme was used to make this change?" + "en": "What theme was used to make this change?", + "de": "Welches Thema wurde für die Änderung verwendet?" }, "freeform": { "key": "theme" }, "render": { - "en": "Change with theme {theme}" + "en": "Change with theme {theme}", + "de": "Geändert mit Thema {theme}" } }, { @@ -71,19 +84,23 @@ "key": "locale" }, "question": { - "en": "What locale (language) was this change made in?" + "en": "What locale (language) was this change made in?", + "de": "In welcher Benutzersprache wurde die Änderung vorgenommen?" }, "render": { - "en": "User locale is {locale}" + "en": "User locale is {locale}", + "de": "Benutzersprache {locale}" } }, { "id": "host", "render": { - "en": "Change with with {host}" + "en": "Change with with {host}", + "de": "Änderung über {host}" }, "question": { - "en": "What host (website) was this change made with?" + "en": "What host (website) was this change made with?", + "de": "Über welchen Host (Webseite) wurde diese Änderung vorgenommen?" }, "freeform": { "key": "host" @@ -104,10 +121,12 @@ { "id": "version", "question": { - "en": "What version of MapComplete was used to make this change?" + "en": "What version of MapComplete was used to make this change?", + "de": "Mit welcher MapComplete Version wurde die Änderung vorgenommen?" }, "render": { - "en": "Made with {editor}" + "en": "Made with {editor}", + "de": "Erstellt mit {editor}" }, "freeform": { "key": "editor" @@ -493,7 +512,9 @@ } ], "question": { - "en": "Themename contains {search}" + "en": "Themename contains {search}", + "de": "Themenname enthält {search}", + "pl": "Nazwa tematu zawiera {search}" } } ] @@ -509,7 +530,8 @@ } ], "question": { - "en": "Themename does not contain {search}" + "en": "Themename does not contain {search}", + "de": "Themename enthält not {search}" } } ] @@ -525,7 +547,8 @@ } ], "question": { - "en": "Made by contributor {search}" + "en": "Made by contributor {search}", + "de": "Erstellt vom Mitwirkenden {search}" } } ] @@ -541,7 +564,8 @@ } ], "question": { - "en": "Not made by contributor {search}" + "en": "Not made by contributor {search}", + "de": "Nicht erstellt von Mitwirkendem {search}" } } ] @@ -558,7 +582,8 @@ } ], "question": { - "en": "Made before {search}" + "en": "Made before {search}", + "de": "Erstellt vor {search}" } } ] @@ -575,7 +600,8 @@ } ], "question": { - "en": "Made after {search}" + "en": "Made after {search}", + "de": "Erstellt nach {search}" } } ] @@ -591,7 +617,8 @@ } ], "question": { - "en": "User language (iso-code) {search}" + "en": "User language (iso-code) {search}", + "de": "Benutzersprache (ISO-Code) {search}" } } ] @@ -607,7 +634,8 @@ } ], "question": { - "en": "Made with host {search}" + "en": "Made with host {search}", + "de": "Erstellt mit Host {search}" } } ] @@ -618,7 +646,8 @@ { "osmTags": "add-image>0", "question": { - "en": "Changeset added at least one image" + "en": "Changeset added at least one image", + "de": "Änderungssatz hat mindestens ein Bild hinzugefügt" } } ] @@ -629,7 +658,8 @@ { "osmTags": "theme!=grb", "question": { - "en": "Exclude GRB theme" + "en": "Exclude GRB theme", + "de": "GRB-Thema ausschließen" } } ] @@ -640,7 +670,8 @@ { "osmTags": "theme!=etymology", "question": { - "en": "Exclude etymology theme" + "en": "Exclude etymology theme", + "de": "Etymologie-Thema ausschließen" } } ] @@ -655,7 +686,8 @@ { "id": "link_to_more", "render": { - "en": "More statistics can be found here" + "en": "More statistics can be found here", + "de": "Weitere Statistiken gibt es hier" } }, { diff --git a/assets/themes/playgrounds/playgrounds.json b/assets/themes/playgrounds/playgrounds.json index 8b4322aa4..4af9def0b 100644 --- a/assets/themes/playgrounds/playgrounds.json +++ b/assets/themes/playgrounds/playgrounds.json @@ -1,5 +1,4 @@ { - "id": "playgrounds", "title": { "en": "Playgrounds", diff --git a/langs/layers/en.json b/langs/layers/en.json index 7c37df27f..888625333 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -7948,6 +7948,13 @@ "render": "This elevator goes to floors {level}" } }, + "nothing_known": { + "render": { + "special": { + "text": "Nothing is known about this place. Help by filling out the questions" + } + } + }, "opening_hours": { "mappings": { "0": { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index 1820be7fd..fb83e611b 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -6574,6 +6574,13 @@ "render": "Deze lift gaat naar de verdiepingen {level}" } }, + "nothing_known": { + "render": { + "special": { + "text": "Er is nog niets geweten. Help mee door de vragen te beantwoorden" + } + } + }, "opening_hours": { "mappings": { "0": { diff --git a/src/Logic/Actors/InitialMapPositioning.ts b/src/Logic/Actors/InitialMapPositioning.ts index 70193fec0..f39d8ccdd 100644 --- a/src/Logic/Actors/InitialMapPositioning.ts +++ b/src/Logic/Actors/InitialMapPositioning.ts @@ -92,7 +92,7 @@ export default class InitialMapPositioning { const [lat, lon] = osmObject.centerpoint() this.location.setData({ lon, lat }) }) - } else if (Constants.GeoIpServer && lat.data === defaultLat && lon.data === defaultLon) { + } else if (Constants.GeoIpServer && lat.data === defaultLat && lon.data === defaultLon && !Utils.runningFromConsole) { console.log("Using geoip to determine start location...") // We use geo-IP to zoom to some location Utils.downloadJson<{ latitude: number, longitude: number }>(