Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2024-09-16 15:12:36 +02:00
commit 5ff52b5c1d
21 changed files with 415 additions and 146 deletions

View file

@ -2,6 +2,22 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.46.9](https://github.com/USERNAME/REPOSITORY_NAME/compare/v0.46.8...v0.46.9) (2024-09-14)
### Bug Fixes
* fix [#2142](https://github.com/pietervdvn/MapComplete/issues/2142) ([f2fca2d](https://github.com/USERNAME/REPOSITORY_NAME/commitsf2fca2dad8576a18629591e886e511912c1d99e9))
* nobrand= is actually applied when using the Name suggestion index ([c3bb0cb](https://github.com/USERNAME/REPOSITORY_NAME/commitsc3bb0cb83787c299ee4a92e8df6046aa448d77c8))
* scroll horizontal images into view ([0397863](https://github.com/USERNAME/REPOSITORY_NAME/commits03978631ebd1e61abd13dd7a53bdb400c3d0f059))
* some fixes to make studio useable again, probably fixes [#2139](https://github.com/pietervdvn/MapComplete/issues/2139) ([6672fc8](https://github.com/USERNAME/REPOSITORY_NAME/commits6672fc87b4326db65289dfa31599ec0583d6c0f4))
### Theme improvements
* **disaster_respone:** add a police station layer, add this and more layers to disaster_response theme ([418a4a7](https://github.com/USERNAME/REPOSITORY_NAME/commits418a4a71af5824487e4aa6754701e5d14371beae))
* **disaster_response:** add defibrillators and logical zoom levels ([65fceb9](https://github.com/USERNAME/REPOSITORY_NAME/commits65fceb9434294051c8f565d89f42443c6afe3fb8))
### [0.46.8](https://github.com/USERNAME/REPOSITORY_NAME/compare/v0.46.7...v0.46.8) (2024-09-13) ### [0.46.8](https://github.com/USERNAME/REPOSITORY_NAME/compare/v0.46.7...v0.46.8) (2024-09-13)

View file

@ -1,13 +1,18 @@
{ {
"id": "mapcomplete-changes", "id": "mapcomplete-changes",
"title": { "title": {
"en": "Changes made with MapComplete" "en": "Changes made with MapComplete",
"de": "Änderungen mit MapComplete"
}, },
"shortDescription": { "shortDescription": {
"en": "Shows changes made by MapComplete" "en": "Shows changes made by MapComplete",
"de": "Zeigt die von MapComplete vorgenommenen Änderungen an"
}, },
"description": { "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",
"es": "Este mapa muestra todos los cambios realizados con MapComplete",
"pl": "Ta mapa pokazuje wszystkie zmiany wprowadzone za pomocą MapComplete"
}, },
"icon": "./assets/svg/logo.svg", "icon": "./assets/svg/logo.svg",
"hideFromOverview": true, "hideFromOverview": true,
@ -18,7 +23,8 @@
{ {
"id": "mapcomplete-changes", "id": "mapcomplete-changes",
"name": { "name": {
"en": "Changeset centers" "en": "Changeset centers",
"de": "Changeset-Zentren"
}, },
"minzoom": 0, "minzoom": 0,
"source": { "source": {
@ -28,41 +34,49 @@
}, },
"title": { "title": {
"render": { "render": {
"en": "Changeset for {theme}" "en": "Changeset for {theme}",
"de": "Änderungssatz für {theme}"
} }
}, },
"description": { "description": {
"en": "Shows all MapComplete changes" "en": "Shows all MapComplete changes",
"de": "Zeigt alle MapComplete-Änderungen",
"es": "Muestra todos los cambios de MapComplete"
}, },
"tagRenderings": [ "tagRenderings": [
{ {
"id": "show_changeset_id", "id": "show_changeset_id",
"render": { "render": {
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>" "en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
} }
}, },
{ {
"id": "contributor", "id": "contributor",
"question": { "question": {
"en": "What contributor did make this change?" "en": "What contributor did make this change?",
"de": "Wer hat zu dieser Änderung beigetragen?"
}, },
"freeform": { "freeform": {
"key": "user" "key": "user"
}, },
"render": { "render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>" "en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"de": "Änderung vorgenommen von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
} }
}, },
{ {
"id": "theme-id", "id": "theme-id",
"question": { "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 diese Änderung verwendet?"
}, },
"freeform": { "freeform": {
"key": "theme" "key": "theme"
}, },
"render": { "render": {
"en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>" "en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>",
"de": "Änderung mit Thema <a href='https://mapcomplete.org/{theme}'>{theme}</a>"
} }
}, },
{ {
@ -71,19 +85,23 @@
"key": "locale" "key": "locale"
}, },
"question": { "question": {
"en": "What locale (language) was this change made in?" "en": "What locale (language) was this change made in?",
"de": "In welcher Sprache (Locale) wurde diese Änderung vorgenommen?"
}, },
"render": { "render": {
"en": "User locale is {locale}" "en": "User locale is {locale}",
"de": "Die Benutzersprache ist {locale}"
} }
}, },
{ {
"id": "host", "id": "host",
"render": { "render": {
"en": "Change with with <a href='{host}'>{host}</a>" "en": "Change with with <a href='{host}'>{host}</a>",
"de": "Änderung mit <a href='{host}'>{host}</a>"
}, },
"question": { "question": {
"en": "What host (website) was this change made with?" "en": "What host (website) was this change made with?",
"de": "Bei welchem Host (Website) wurde diese Änderung vorgenommen?"
}, },
"freeform": { "freeform": {
"key": "host" "key": "host"
@ -104,10 +122,12 @@
{ {
"id": "version", "id": "version",
"question": { "question": {
"en": "What version of MapComplete was used to make this change?" "en": "What version of MapComplete was used to make this change?",
"de": "Welche Version von MapComplete wurde verwendet, um diese Änderung vorzunehmen?"
}, },
"render": { "render": {
"en": "Made with {editor}" "en": "Made with {editor}",
"de": "Erstellt mit {editor}"
}, },
"freeform": { "freeform": {
"key": "editor" "key": "editor"
@ -505,7 +525,10 @@
} }
], ],
"question": { "question": {
"en": "Themename contains {search}" "en": "Themename contains {search}",
"de": "Themenname enthält {search}",
"es": "El nombre contiene {search}",
"pl": "Nazwa tematu zawiera {search}"
} }
} }
] ]
@ -521,7 +544,9 @@
} }
], ],
"question": { "question": {
"en": "Themename does <b>not</b> contain {search}" "en": "Themename does <b>not</b> contain {search}",
"de": "Themename enthält <b>nicht</b> {search}",
"es": "El nombre del tema <b>no</b> contiene {search}"
} }
} }
] ]
@ -537,7 +562,9 @@
} }
], ],
"question": { "question": {
"en": "Made by contributor {search}" "en": "Made by contributor {search}",
"de": "Erstellt von Mitwirkendem {search}",
"es": "Hecho por el colaborador {search}"
} }
} }
] ]
@ -553,7 +580,9 @@
} }
], ],
"question": { "question": {
"en": "<b>Not</b> made by contributor {search}" "en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von Mitwirkendem {search}",
"es": "<b>No</b> realizado por el colaborador {search}"
} }
} }
] ]
@ -570,7 +599,9 @@
} }
], ],
"question": { "question": {
"en": "Made before {search}" "en": "Made before {search}",
"de": "Erstellt vor {search}",
"es": "Realizado antes de {search}"
} }
} }
] ]
@ -587,7 +618,9 @@
} }
], ],
"question": { "question": {
"en": "Made after {search}" "en": "Made after {search}",
"de": "Erstellt nach {search}",
"es": "Realizado después de {search}"
} }
} }
] ]
@ -603,7 +636,9 @@
} }
], ],
"question": { "question": {
"en": "User language (iso-code) {search}" "en": "User language (iso-code) {search}",
"de": "Benutzersprache (ISO-Code) {search}",
"es": "Idioma del usuario (código iso) {search}"
} }
} }
] ]
@ -619,7 +654,8 @@
} }
], ],
"question": { "question": {
"en": "Made with host {search}" "en": "Made with host {search}",
"de": "Erstellt mit Host {search}"
} }
} }
] ]
@ -630,7 +666,8 @@
{ {
"osmTags": "add-image>0", "osmTags": "add-image>0",
"question": { "question": {
"en": "Changeset added at least one image" "en": "Changeset added at least one image",
"de": "Changeset hat mindestens ein Bild hinzugefügt"
} }
} }
] ]
@ -641,7 +678,8 @@
{ {
"osmTags": "theme!=grb", "osmTags": "theme!=grb",
"question": { "question": {
"en": "Exclude GRB theme" "en": "Exclude GRB theme",
"de": "GRB-Thema ausschließen"
} }
} }
] ]
@ -652,7 +690,9 @@
{ {
"osmTags": "theme!=etymology", "osmTags": "theme!=etymology",
"question": { "question": {
"en": "Exclude etymology theme" "en": "Exclude etymology theme",
"de": "Etymologie-Thema ausschließen",
"es": "Excluir el tema de la etimología"
} }
} }
] ]
@ -667,7 +707,8 @@
{ {
"id": "link_to_more", "id": "link_to_more",
"render": { "render": {
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>" "en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
"de": "Weitere Statistiken findest du <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>"
} }
}, },
{ {

View file

@ -1,13 +1,18 @@
{ {
"id": "mapcomplete-changes", "id": "mapcomplete-changes",
"title": { "title": {
"en": "Changes made with MapComplete" "en": "Changes made with MapComplete",
"de": "Änderungen mit MapComplete"
}, },
"shortDescription": { "shortDescription": {
"en": "Shows changes made by MapComplete" "en": "Shows changes made by MapComplete",
"de": "Zeigt die von MapComplete vorgenommenen Änderungen an"
}, },
"description": { "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",
"es": "Este mapa muestra todos los cambios realizados con MapComplete",
"pl": "Ta mapa pokazuje wszystkie zmiany wprowadzone za pomocą MapComplete"
}, },
"icon": "./assets/svg/logo.svg", "icon": "./assets/svg/logo.svg",
"hideFromOverview": true, "hideFromOverview": true,
@ -18,7 +23,8 @@
{ {
"id": "mapcomplete-changes", "id": "mapcomplete-changes",
"name": { "name": {
"en": "Changeset centers" "en": "Changeset centers",
"de": "Changeset-Zentren"
}, },
"minzoom": 0, "minzoom": 0,
"source": { "source": {
@ -28,41 +34,49 @@
}, },
"title": { "title": {
"render": { "render": {
"en": "Changeset for {theme}" "en": "Changeset for {theme}",
"de": "Änderungssatz für {theme}"
} }
}, },
"description": { "description": {
"en": "Shows all MapComplete changes" "en": "Shows all MapComplete changes",
"de": "Zeigt alle MapComplete-Änderungen",
"es": "Muestra todos los cambios de MapComplete"
}, },
"tagRenderings": [ "tagRenderings": [
{ {
"id": "show_changeset_id", "id": "show_changeset_id",
"render": { "render": {
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>" "en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
"de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
} }
}, },
{ {
"id": "contributor", "id": "contributor",
"question": { "question": {
"en": "What contributor did make this change?" "en": "What contributor did make this change?",
"de": "Wer hat zu dieser Änderung beigetragen?"
}, },
"freeform": { "freeform": {
"key": "user" "key": "user"
}, },
"render": { "render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>" "en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
"de": "Änderung vorgenommen von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
} }
}, },
{ {
"id": "theme-id", "id": "theme-id",
"question": { "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 diese Änderung verwendet?"
}, },
"freeform": { "freeform": {
"key": "theme" "key": "theme"
}, },
"render": { "render": {
"en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>" "en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>",
"de": "Änderung mit Thema <a href='https://mapcomplete.org/{theme}'>{theme}</a>"
} }
}, },
{ {
@ -71,19 +85,23 @@
"key": "locale" "key": "locale"
}, },
"question": { "question": {
"en": "What locale (language) was this change made in?" "en": "What locale (language) was this change made in?",
"de": "In welcher Sprache (Locale) wurde diese Änderung vorgenommen?"
}, },
"render": { "render": {
"en": "User locale is {locale}" "en": "User locale is {locale}",
"de": "Die Benutzersprache ist {locale}"
} }
}, },
{ {
"id": "host", "id": "host",
"render": { "render": {
"en": "Change with with <a href='{host}'>{host}</a>" "en": "Change with with <a href='{host}'>{host}</a>",
"de": "Änderung mit <a href='{host}'>{host}</a>"
}, },
"question": { "question": {
"en": "What host (website) was this change made with?" "en": "What host (website) was this change made with?",
"de": "Bei welchem Host (Website) wurde diese Änderung vorgenommen?"
}, },
"freeform": { "freeform": {
"key": "host" "key": "host"
@ -104,10 +122,12 @@
{ {
"id": "version", "id": "version",
"question": { "question": {
"en": "What version of MapComplete was used to make this change?" "en": "What version of MapComplete was used to make this change?",
"de": "Welche Version von MapComplete wurde verwendet, um diese Änderung vorzunehmen?"
}, },
"render": { "render": {
"en": "Made with {editor}" "en": "Made with {editor}",
"de": "Erstellt mit {editor}"
}, },
"freeform": { "freeform": {
"key": "editor" "key": "editor"
@ -143,7 +163,10 @@
} }
], ],
"question": { "question": {
"en": "Themename contains {search}" "en": "Themename contains {search}",
"de": "Themenname enthält {search}",
"es": "El nombre contiene {search}",
"pl": "Nazwa tematu zawiera {search}"
} }
} }
] ]
@ -159,7 +182,9 @@
} }
], ],
"question": { "question": {
"en": "Themename does <b>not</b> contain {search}" "en": "Themename does <b>not</b> contain {search}",
"de": "Themename enthält <b>nicht</b> {search}",
"es": "El nombre del tema <b>no</b> contiene {search}"
} }
} }
] ]
@ -175,7 +200,9 @@
} }
], ],
"question": { "question": {
"en": "Made by contributor {search}" "en": "Made by contributor {search}",
"de": "Erstellt von Mitwirkendem {search}",
"es": "Hecho por el colaborador {search}"
} }
} }
] ]
@ -191,7 +218,9 @@
} }
], ],
"question": { "question": {
"en": "<b>Not</b> made by contributor {search}" "en": "<b>Not</b> made by contributor {search}",
"de": "<b>Nicht</b> erstellt von Mitwirkendem {search}",
"es": "<b>No</b> realizado por el colaborador {search}"
} }
} }
] ]
@ -208,7 +237,9 @@
} }
], ],
"question": { "question": {
"en": "Made before {search}" "en": "Made before {search}",
"de": "Erstellt vor {search}",
"es": "Realizado antes de {search}"
} }
} }
] ]
@ -225,7 +256,9 @@
} }
], ],
"question": { "question": {
"en": "Made after {search}" "en": "Made after {search}",
"de": "Erstellt nach {search}",
"es": "Realizado después de {search}"
} }
} }
] ]
@ -241,7 +274,9 @@
} }
], ],
"question": { "question": {
"en": "User language (iso-code) {search}" "en": "User language (iso-code) {search}",
"de": "Benutzersprache (ISO-Code) {search}",
"es": "Idioma del usuario (código iso) {search}"
} }
} }
] ]
@ -257,7 +292,8 @@
} }
], ],
"question": { "question": {
"en": "Made with host {search}" "en": "Made with host {search}",
"de": "Erstellt mit Host {search}"
} }
} }
] ]
@ -268,7 +304,8 @@
{ {
"osmTags": "add-image>0", "osmTags": "add-image>0",
"question": { "question": {
"en": "Changeset added at least one image" "en": "Changeset added at least one image",
"de": "Changeset hat mindestens ein Bild hinzugefügt"
} }
} }
] ]
@ -279,7 +316,8 @@
{ {
"osmTags": "theme!=grb", "osmTags": "theme!=grb",
"question": { "question": {
"en": "Exclude GRB theme" "en": "Exclude GRB theme",
"de": "GRB-Thema ausschließen"
} }
} }
] ]
@ -290,7 +328,9 @@
{ {
"osmTags": "theme!=etymology", "osmTags": "theme!=etymology",
"question": { "question": {
"en": "Exclude etymology theme" "en": "Exclude etymology theme",
"de": "Etymologie-Thema ausschließen",
"es": "Excluir el tema de la etimología"
} }
} }
] ]
@ -305,7 +345,8 @@
{ {
"id": "link_to_more", "id": "link_to_more",
"render": { "render": {
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>" "en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
"de": "Weitere Statistiken findest du <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>"
} }
}, },
{ {

View file

@ -194,7 +194,7 @@
"josmNotOpened": "JOSM konnte nicht erreicht werden. Bitte sicherstellen, dass das Programm geöffnet und Remote Control aktiviert ist", "josmNotOpened": "JOSM konnte nicht erreicht werden. Bitte sicherstellen, dass das Programm geöffnet und Remote Control aktiviert ist",
"josmOpened": "JOSM ist geöffnet", "josmOpened": "JOSM ist geöffnet",
"madeBy": "Erstellt von <b>{author}</b>", "madeBy": "Erstellt von <b>{author}</b>",
"mapContributionsBy": "Die angezeigten Daten wurden bearbeitet durch {contributors}", "mapContributionsBy": "Angezeigte Daten wurden bearbeitet durch {contributors}",
"mapContributionsByAndHidden": "Die angezeigten Daten wurden bearbeitet von {contributors} und {hiddenCount} weiteren Beitragenden", "mapContributionsByAndHidden": "Die angezeigten Daten wurden bearbeitet von {contributors} und {hiddenCount} weiteren Beitragenden",
"mapDataByOsm": "Kartendaten: OpenStreetMap", "mapDataByOsm": "Kartendaten: OpenStreetMap",
"mapillaryHelp": "<b>Mapillary</b> ist ein Online-Dienst, der Straßenbilder sammelt und sie unter einer freien Lizenz anbietet. Mitwirkende dürfen diese Bilder verwenden, um OpenStreetMap zu verbessern", "mapillaryHelp": "<b>Mapillary</b> ist ein Online-Dienst, der Straßenbilder sammelt und sie unter einer freien Lizenz anbietet. Mitwirkende dürfen diese Bilder verwenden, um OpenStreetMap zu verbessern",

View file

@ -618,7 +618,7 @@
"#": "These texts are shown above the theme buttons when no theme is loaded", "#": "These texts are shown above the theme buttons when no theme is loaded",
"about": "About MapComplete", "about": "About MapComplete",
"featuredThemeTitle": "Featured this week", "featuredThemeTitle": "Featured this week",
"intro": "Maps about various topics which you contribute to", "intro": "Maps about various topics which you can contribute to",
"learnMore": "Learn more", "learnMore": "Learn more",
"logIn": "Log in to see other themes you previously visited", "logIn": "Log in to see other themes you previously visited",
"pickTheme": "Pick a theme below to get started.", "pickTheme": "Pick a theme below to get started.",

View file

@ -420,7 +420,8 @@
"index": { "index": {
"#": "Estos textos son mostrados sobre los botones del tema cuando no hay un tema cargado", "#": "Estos textos son mostrados sobre los botones del tema cuando no hay un tema cargado",
"featuredThemeTitle": "Esta semana destacamos", "featuredThemeTitle": "Esta semana destacamos",
"intro": "Mapas sobre diversos temas a los que contribuye", "intro": "Mapas sobre diversos temas a los que puedes contribuir",
"learnMore": "Más información",
"logIn": "Inicia sesión para ver otros temas que visitaste anteriormente", "logIn": "Inicia sesión para ver otros temas que visitaste anteriormente",
"pickTheme": "Elige un tema de abajo para empezar.", "pickTheme": "Elige un tema de abajo para empezar.",
"title": "MapComplete" "title": "MapComplete"

View file

@ -5176,6 +5176,9 @@
"4": { "4": {
"then": "Sandwichladen" "then": "Sandwichladen"
}, },
"5": {
"then": "Burgerrestaurant"
},
"6": { "6": {
"then": "Hier wird Sushi serviert" "then": "Hier wird Sushi serviert"
}, },

View file

@ -7697,6 +7697,50 @@
"render": "Playground device" "render": "Playground device"
} }
}, },
"police": {
"description": "Many types of police facilities ",
"name": "Police stations",
"presets": {
"0": {
"description": "A police office where the general public can enter for inquiries",
"title": "a police office"
},
"1": {
"description": "A place where police performs checks on travelling people",
"title": "a police checkpoint"
},
"2": {
"description": "An administrative police office without services for the general public.",
"title": "an administrative, police backoffice"
},
"3": {
"description": "A jail run by the police without public services. People are detained here for a short time (at most a few days), e.g. for small misdemeanors, disturbance of the public order or awaiting a trial"
},
"4": {
"description": "A naval or maritime base for the maritime police; often with a pier and police boats nearby"
}
},
"tagRenderings": {
"4_z2nrdhy6tyyh4fd": {
"mappings": {
"0": {
"then": "This police office has some cells to detain people"
},
"1": {
"then": "This police office does not have cells to detain people"
}
},
"question": "Does this police office have detention facilities?"
},
"police_name": {
"question": "What is the name of this police facility?",
"render": "<b>{name}</b>"
}
},
"title": {
"render": "{name}"
}
},
"postboxes": { "postboxes": {
"description": "The layer showing postboxes.", "description": "The layer showing postboxes.",
"name": "Postboxes", "name": "Postboxes",

View file

@ -808,6 +808,72 @@
"description": "Los faros son edificios altos con una luz en la parte superior para guiar el tráfico marítimo.", "description": "Los faros son edificios altos con una luz en la parte superior para guiar el tráfico marítimo.",
"title": "Faros" "title": "Faros"
}, },
"mapcomplete-changes": {
"description": "Este mapa muestra todos los cambios realizados con MapComplete",
"layers": {
"0": {
"description": "Muestra todos los cambios de MapComplete",
"filter": {
"0": {
"options": {
"0": {
"question": "El nombre contiene {search}"
}
}
},
"1": {
"options": {
"0": {
"question": "El nombre del tema <b>no</b> contiene {search}"
}
}
},
"10": {
"options": {
"0": {
"question": "Excluir el tema de la etimología"
}
}
},
"2": {
"options": {
"0": {
"question": "Hecho por el colaborador {search}"
}
}
},
"3": {
"options": {
"0": {
"question": "<b>No</b> realizado por el colaborador {search}"
}
}
},
"4": {
"options": {
"0": {
"question": "Realizado antes de {search}"
}
}
},
"5": {
"options": {
"0": {
"question": "Realizado después de {search}"
}
}
},
"6": {
"options": {
"0": {
"question": "Idioma del usuario (código iso) {search}"
}
}
}
}
}
}
},
"maproulette": { "maproulette": {
"description": "Tema que muestra las tareas de MapRoulette, permitiendo buscarlas, filtrarlas y arreglarlas.", "description": "Tema que muestra las tareas de MapRoulette, permitiendo buscarlas, filtrarlas y arreglarlas.",
"title": "Tareas de MapRoulette" "title": "Tareas de MapRoulette"

View file

@ -644,6 +644,22 @@
}, },
"title": "Krawężniki i przejścia" "title": "Krawężniki i przejścia"
}, },
"mapcomplete-changes": {
"description": "Ta mapa pokazuje wszystkie zmiany wprowadzone za pomocą MapComplete",
"layers": {
"0": {
"filter": {
"0": {
"options": {
"0": {
"question": "Nazwa tematu zawiera {search}"
}
}
}
}
}
}
},
"maproulette": { "maproulette": {
"description": "Temat pokazujący zadania MapRoulette, umożliwiający ich wyszukiwanie, filtrowanie i naprawianie.", "description": "Temat pokazujący zadania MapRoulette, umożliwiający ich wyszukiwanie, filtrowanie i naprawianie.",
"title": "Zadania MapRoulette" "title": "Zadania MapRoulette"

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "mapcomplete", "name": "mapcomplete",
"version": "0.46.8", "version": "0.46.9",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mapcomplete", "name": "mapcomplete",
"version": "0.46.8", "version": "0.46.9",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"dependencies": { "dependencies": {
"@comunica/core": "^3.0.1", "@comunica/core": "^3.0.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "mapcomplete", "name": "mapcomplete",
"version": "0.46.8", "version": "0.46.9",
"repository": "https://github.com/pietervdvn/MapComplete", "repository": "https://github.com/pietervdvn/MapComplete",
"description": "A small website to edit OSM easily", "description": "A small website to edit OSM easily",
"bugs": "https://github.com/pietervdvn/MapComplete/issues", "bugs": "https://github.com/pietervdvn/MapComplete/issues",
@ -121,7 +121,7 @@
"reuse-compliance": "reuse lint", "reuse-compliance": "reuse lint",
"housekeeping": "git pull && npx update-browserslist-db@latest && npm run weblate:merge-heavy && npm run generate && npm run generate:docs && npm run generate:schemas && npm run generate:contributor-list && vite-node scripts/fetchLanguages.ts && vite-node scripts/generateSunnyUnlabeled.ts && npm run format && git add assets/ langs/ Docs/ **/*.ts Docs/* src/* && git commit -m 'chore: automated housekeeping...'", "housekeeping": "git pull && npx update-browserslist-db@latest && npm run weblate:merge-heavy && npm run generate && npm run generate:docs && npm run generate:schemas && npm run generate:contributor-list && vite-node scripts/fetchLanguages.ts && vite-node scripts/generateSunnyUnlabeled.ts && npm run format && git add assets/ langs/ Docs/ **/*.ts Docs/* src/* && git commit -m 'chore: automated housekeeping...'",
"###": "MICROSERVICES AND SERVER MAINTAINENCE", "###": "MICROSERVICES AND SERVER MAINTAINENCE",
"release": "standard-version", "release": "standard-version && git push --follow-tags",
"release:minor": "standard-version --release-as minor", "release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch", "release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major", "release:major": "standard-version --release-as major",

View file

@ -94,14 +94,28 @@ export default class ScriptUtils {
}) })
} }
public static getThemePaths(): string[] { public static getThemePaths(useTranslationPaths = false): string[] {
return ScriptUtils.readDirRecSync("./assets/themes") const normalFiles = ScriptUtils.readDirRecSync("./assets/themes")
.filter((path) => path.endsWith(".json") && !path.endsWith(".proto.json")) .filter((path) => path.endsWith(".json") && !path.endsWith(".proto.json"))
.filter((path) => path.indexOf("license_info.json") < 0) .filter((path) => path.indexOf("license_info.json") < 0)
if (!useTranslationPaths) {
return normalFiles
}
const specialfiles = ["./assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json"]
const blacklist = ["assets/themes/mapcomplete-changes/mapcomplete-changes.json"]
const filtered = normalFiles.filter(path => !blacklist.some(black => path.endsWith(black)))
return filtered.concat(specialfiles)
} }
public static getThemeFiles(): { parsed: LayoutConfigJson; path: string; raw: string }[] { public static getThemeFiles(useTranslationPaths = false): {
return this.getThemePaths().map((path) => { parsed: LayoutConfigJson;
path: string;
raw: string
}[] {
return this.getThemePaths(useTranslationPaths).map((path) => {
try { try {
const contents = readFileSync(path, { encoding: "utf8" }) const contents = readFileSync(path, { encoding: "utf8" })
if (contents === "") { if (contents === "") {
@ -148,6 +162,7 @@ export default class ScriptUtils {
const data = await ScriptUtils.Download(url, headers) const data = await ScriptUtils.Download(url, headers)
return JSON.parse(data["content"]) return JSON.parse(data["content"])
} }
public static async DownloadFetch( public static async DownloadFetch(
url: string, url: string,
headers?: any headers?: any
@ -158,6 +173,7 @@ export default class ScriptUtils {
console.log("Fetched", url, data) console.log("Fetched", url, data)
return { content: data } return { content: data }
} }
public static Download( public static Download(
url: string, url: string,
headers?: any headers?: any
@ -193,17 +209,17 @@ export default class ScriptUtils {
path: urlObj.pathname + urlObj.search, path: urlObj.pathname + urlObj.search,
port: urlObj.port, port: urlObj.port,
headers: headers, headers: headers
}, },
(res) => { (res) => {
const parts: string[] = [] const parts: string[] = []
res.setEncoding("utf8") res.setEncoding("utf8")
res.on("data", function (chunk) { res.on("data", function(chunk) {
// @ts-ignore // @ts-ignore
parts.push(chunk) parts.push(chunk)
}) })
res.addListener("end", function () { res.addListener("end", function() {
if (res.statusCode === 301 || res.statusCode === 302) { if (res.statusCode === 301 || res.statusCode === 302) {
console.log("Got a redirect:", res.headers.location) console.log("Got a redirect:", res.headers.location)
resolve({ redirect: res.headers.location }) resolve({ redirect: res.headers.location })
@ -221,7 +237,7 @@ export default class ScriptUtils {
}) })
} }
) )
request.on("error", function (e) { request.on("error", function(e) {
reject(e) reject(e)
}) })
} catch (e) { } catch (e) {

View file

@ -426,7 +426,8 @@ class LayerOverviewUtils extends Script {
priviliged.delete("summary") priviliged.delete("summary")
priviliged.delete("last_click") priviliged.delete("last_click")
if (priviliged.size > 0) { const isBoostrapping = AllSharedLayers.getSharedLayersConfigs().size == 0
if (!isBoostrapping && priviliged.size > 0) {
throw ( throw (
"Priviliged layer " + "Priviliged layer " +
Array.from(priviliged).join(", ") + Array.from(priviliged).join(", ") +

View file

@ -670,7 +670,7 @@ function removeNonEnglishTranslations(object: any) {
* Load the translations into the theme files * Load the translations into the theme files
*/ */
function mergeThemeTranslations(englishOnly: boolean = false) { function mergeThemeTranslations(englishOnly: boolean = false) {
const themeFiles = ScriptUtils.getThemeFiles() const themeFiles = ScriptUtils.getThemeFiles(true)
for (const themeFile of themeFiles) { for (const themeFile of themeFiles) {
let config = themeFile.parsed let config = themeFile.parsed
mergeLayerTranslation(config, themeFile.path, loadTranslationFilesFrom("themes")) mergeLayerTranslation(config, themeFile.path, loadTranslationFilesFrom("themes"))
@ -723,7 +723,7 @@ class GenerateTranslations extends Script {
{ {
const l1 = generateTranslationsObjectFrom(ScriptUtils.getLayerFiles(), "layers") const l1 = generateTranslationsObjectFrom(ScriptUtils.getLayerFiles(), "layers")
const l2 = generateTranslationsObjectFrom( const l2 = generateTranslationsObjectFrom(
ScriptUtils.getThemeFiles().filter( ScriptUtils.getThemeFiles(true).filter(
(th) => th.parsed.mustHaveLanguage === undefined (th) => th.parsed.mustHaveLanguage === undefined
), ),
"themes" "themes"

View file

@ -220,8 +220,8 @@
<td/> <td/>
{/if} {/if}
{#each range(7) as wd} {#each range(7) as wd}
<OHCell type="half" {h} {wd} on:start={() => startSelection(wd, h)} on:end={() => endSelection(wd, h)} <OHCell type="half" {h} {wd} on:start={() => startSelection(wd, h + 0.5)} on:end={() => endSelection(wd, h + 0.5)}
on:move={() => moved(wd, h)} on:clear={() => clearSelection()} /> on:move={() => moved(wd, h + 0.5)} on:clear={() => clearSelection()} />
{/each} {/each}
</tr> </tr>

View file

@ -30,7 +30,7 @@
.getSchemaStartingWith(schema.path) .getSchemaStartingWith(schema.path)
.filter((part) => part.path.length - 1 === schema.path.length) .filter((part) => part.path.length - 1 === schema.path.length)
let usesOverride = value["builtin"] !== undefined let usesOverride = value?.["builtin"] !== undefined
function schemaForMultitype() { function schemaForMultitype() {
const sch = { ...schema } const sch = { ...schema }
@ -138,7 +138,7 @@
</div> </div>
{:else if typeof value === "string"} {:else if typeof value === "string"}
Builtin: <b>{value}</b> Builtin: <b>{value}</b>
{:else if value["builtin"]} {:else if value?.["builtin"]}
reused tagrendering <span class="font-bold">{JSON.stringify(value["builtin"])}</span> reused tagrendering <span class="font-bold">{JSON.stringify(value["builtin"])}</span>
{:else} {:else}
<Tr cls="font-bold" t={Translations.T(value?.question ?? value?.render)} /> <Tr cls="font-bold" t={Translations.T(value?.question ?? value?.render)} />

View file

@ -159,6 +159,9 @@ export abstract class EditJsonState<T> {
} }
public getSchemaStartingWith(path: string[]) { public getSchemaStartingWith(path: string[]) {
if(path === undefined){
return undefined
}
return this.schema.filter( return this.schema.filter(
(sch) => (sch) =>
!path.some((part, i) => !(sch.path.length > path.length && sch.path[i] === part)) !path.some((part, i) => !(sch.path.length > path.length && sch.path[i] === part))

View file

@ -5,18 +5,23 @@
import { TrashIcon } from "@babeard/svelte-heroicons/mini" import { TrashIcon } from "@babeard/svelte-heroicons/mini"
import ShowConversionMessage from "./ShowConversionMessage.svelte" import ShowConversionMessage from "./ShowConversionMessage.svelte"
import Markdown from "../Base/Markdown.svelte" import Markdown from "../Base/Markdown.svelte"
import type { QuestionableTagRenderingConfigJson } from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson" import type {
QuestionableTagRenderingConfigJson
} from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"
import CollapsedTagRenderingPreview from "./CollapsedTagRenderingPreview.svelte" import CollapsedTagRenderingPreview from "./CollapsedTagRenderingPreview.svelte"
import { Accordion } from "flowbite-svelte" import { Accordion } from "flowbite-svelte"
import { Utils } from "../../Utils"
export let state: EditJsonState<any> export let state: EditJsonState<any>
export let path: (string | number)[] = [] export let path: (string | number)[] = []
let schema: ConfigMeta = state.getSchema(path)[0] let schema: ConfigMeta = state.getSchema(path)[0]
console.log("SBA got schema", schema, "for path", path)
let title = schema.path.at(-1)
let title = schema?.path?.at(-1)
let singular = title let singular = title
if (title?.endsWith("s")) { if (title?.endsWith("s")) {
singular = title.slice(0, title.length - 1) singular = title?.slice(0, title.length - 1)
} }
let article = "a" let article = "a"
if (singular?.match(/^[aeoui]/)) { if (singular?.match(/^[aeoui]/)) {
@ -25,18 +30,20 @@
const isTagRenderingBlock = path.length === 1 && path[0] === "tagRenderings" const isTagRenderingBlock = path.length === 1 && path[0] === "tagRenderings"
if (isTagRenderingBlock) { if (isTagRenderingBlock && schema !== undefined) {
schema = { ...schema } schema = { ...schema }
schema.description = undefined schema.description = undefined
} }
const subparts: ConfigMeta[] = state const subparts: ConfigMeta[] = state
.getSchemaStartingWith(schema.path) .getSchemaStartingWith(schema?.path)
.filter((part) => part.path.length - 1 === schema.path.length) ?.filter((part) => part.path.length - 1 === schema?.path?.length)
let messages = state.messagesFor(path) let messages = state.messagesFor(path)
let datapath = path let datapath = path
const currentValue = state.getStoreFor<(string | QuestionableTagRenderingConfigJson)[]>(datapath) const currentValue = state.getStoreFor<(string | QuestionableTagRenderingConfigJson)[]>(datapath)
currentValue.set(Utils.DedupT(currentValue.data))
console.log("Current value is", currentValue.data)
if (currentValue.data === undefined) { if (currentValue.data === undefined) {
currentValue.setData([]) currentValue.setData([])
} }
@ -62,68 +69,69 @@
currentValue.ping() currentValue.ping()
} }
</script> </script>
{#if schema !== undefined}
<div class="pl-2">
<h3>{schema.path.at(-1)}</h3>
<div class="pl-2"> {#if subparts.length > 0}
<h3>{schema.path.at(-1)}</h3> <Markdown src={schema.description} />
{#if subparts.length > 0}
<Markdown src={schema.description} />
{/if}
{#if $currentValue === undefined}
No array defined
{:else if !Array.isArray($currentValue)}
Not an array: {typeof $currentValue}
{JSON.stringify(path)}
{JSON.stringify($currentValue).slice(0, 120)}
{:else if $currentValue?.length === 0}
No values are defined
{#if $messages.length > 0}
{#each $messages as message}
<ShowConversionMessage {message} />
{/each}
{/if} {/if}
{:else if subparts.length === 0} {#if $currentValue === undefined}
<!-- We need an array of values, so we use the typehint of the _parent_ element as field --> No array defined
{#each $currentValue as value, i} {:else if !Array.isArray($currentValue)}
<div class="flex w-full"> Not an array: {typeof $currentValue}
<SchemaBasedField {state} {schema} path={fusePath(i)} /> {JSON.stringify(path)}
<button {JSON.stringify($currentValue).slice(0, 120)}
class="h-fit w-fit rounded-full border border-black p-1" {:else if $currentValue?.length === 0}
on:click={() => { No values are defined
{#if $messages.length > 0}
{#each $messages as message}
<ShowConversionMessage {message} />
{/each}
{/if}
{:else if subparts.length === 0}
<!-- We need an array of values, so we use the typehint of the _parent_ element as field -->
{#each $currentValue as value, i}
<div class="flex w-full">
<SchemaBasedField {state} {schema} path={fusePath(i)} />
<button
class="h-fit w-fit rounded-full border border-black p-1"
on:click={() => {
del(i) del(i)
}} }}
> >
<TrashIcon class="h-4 w-4" /> <TrashIcon class="h-4 w-4" />
</button> </button>
</div> </div>
{/each}
{:else}
<Accordion>
{#each $currentValue as value, i (value)}
<CollapsedTagRenderingPreview
{state}
{isTagRenderingBlock}
{schema}
{currentValue}
{value}
{i}
{singular}
path={fusePath(i)}
/>
{/each} {/each}
</Accordion> {:else}
{/if} <Accordion>
<div class="flex"> {#each $currentValue as value, i}
<button on:click={() => createItem()}>Add {article} {singular}</button> <CollapsedTagRenderingPreview
{#if path.length === 1 && path[0] === "tagRenderings"} {state}
<button {isTagRenderingBlock}
on:click={() => { {schema}
{currentValue}
{value}
{i}
{singular}
path={fusePath(i)}
/>
{/each}
</Accordion>
{/if}
<div class="flex">
<button on:click={() => createItem()}>Add {article} {singular}</button>
{#if path.length === 1 && path[0] === "tagRenderings"}
<button
on:click={() => {
createItem("images") createItem("images")
}} }}
> >
Add a builtin tagRendering Add a builtin tagRendering
</button> </button>
{/if} {/if}
<slot name="extra-button" /> <slot name="extra-button" />
</div>
</div> </div>
</div> {/if}

View file

@ -401,6 +401,19 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
return newArr return newArr
} }
public static DedupT<T>(arr: T[]): T[]{
if(!arr){
return arr
}
const items = []
for (const item of arr) {
if(items.indexOf(item) < 0){
items.push(item)
}
}
return items
}
/** /**
* Finds all duplicates in a list of strings * Finds all duplicates in a list of strings
* *