Small fixes to GRB theme
This commit is contained in:
parent
bdcc3329b7
commit
6dbd950ca6
5 changed files with 81 additions and 23 deletions
|
@ -54,11 +54,13 @@ abstract class AbstractImportButton implements SpecialVisualizations {
|
|||
public readonly docs: string
|
||||
public readonly args: { name: string, defaultValue?: string, doc: string }[]
|
||||
private readonly showRemovedTags: boolean;
|
||||
private readonly cannotBeImportedMessage: BaseUIElement | undefined;
|
||||
|
||||
constructor(funcName: string, docsIntro: string, extraArgs: { name: string, doc: string, defaultValue?: string, required?: boolean }[], showRemovedTags = true) {
|
||||
constructor(funcName: string, docsIntro: string, extraArgs: { name: string, doc: string, defaultValue?: string, required?: boolean }[],
|
||||
options?: {showRemovedTags? : true | boolean, cannotBeImportedMessage?: BaseUIElement}) {
|
||||
this.funcName = funcName
|
||||
this.showRemovedTags = showRemovedTags;
|
||||
|
||||
this.showRemovedTags = options?.showRemovedTags ?? true;
|
||||
this.cannotBeImportedMessage = options?.cannotBeImportedMessage
|
||||
this.docs = `${docsIntro}
|
||||
|
||||
Note that the contributor must zoom to at least zoomlevel 18 to be able to use this functionality.
|
||||
|
@ -200,7 +202,7 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
pleaseLoginButton,
|
||||
state
|
||||
),
|
||||
t.wrongType,
|
||||
this.cannotBeImportedMessage ?? t.wrongType,
|
||||
new UIEventSource(this.canBeImported(feature)))
|
||||
|
||||
}
|
||||
|
@ -304,7 +306,10 @@ export class ConflateButton extends AbstractImportButton {
|
|||
[{
|
||||
name: "way_to_conflate",
|
||||
doc: "The key, of which the corresponding value is the id of the OSM-way that must be conflated; typically a calculatedTag"
|
||||
}]
|
||||
}],
|
||||
{
|
||||
cannotBeImportedMessage: Translations.t.general.add.import.wrongTypeToConflate
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -393,7 +398,7 @@ export class ImportWayButton extends AbstractImportButton implements AutoAction
|
|||
doc: "Distance to distort the geometry to snap to this layer",
|
||||
defaultValue: "0.1"
|
||||
}],
|
||||
false
|
||||
{ showRemovedTags: false}
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -548,7 +553,7 @@ export class ImportPointButton extends AbstractImportButton {
|
|||
{name:"location_picker",
|
||||
defaultValue: "photo",
|
||||
doc: "Chooses the background for the precise location picker, options are 'map', 'photo' or 'osmbasedmap' or 'none' if the precise input picker should be disabled"}],
|
||||
false
|
||||
{ showRemovedTags: false}
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ import {ConflateButton, ImportPointButton, ImportWayButton} from "./Popup/Import
|
|||
import TagApplyButton from "./Popup/TagApplyButton";
|
||||
import AutoApplyButton from "./Popup/AutoApplyButton";
|
||||
import * as left_right_style_json from "../assets/layers/left_right_style/left_right_style.json";
|
||||
import {OpenIdEditor} from "./BigComponents/CopyrightPanel";
|
||||
import {OpenIdEditor, OpenJosm} from "./BigComponents/CopyrightPanel";
|
||||
import Toggle from "./Input/Toggle";
|
||||
import Img from "./Base/Img";
|
||||
import NoteCommentElement from "./Popup/NoteCommentElement";
|
||||
|
@ -886,7 +886,14 @@ export default class SpecialVisualizations {
|
|||
return new OpenIdEditor(state, undefined, feature.data.id)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
funcName: "open_in_josm",
|
||||
docs: "Opens the current view in the JOSM-editor",
|
||||
args: [],
|
||||
constr: (state, feature) => {
|
||||
return new OpenJosm(state)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
funcName: "clear_location_history",
|
||||
|
|
|
@ -498,6 +498,20 @@
|
|||
"de": "Metatags noch nicht berechnet... Dieses Fenster erneut öffnen"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
|
||||
"and": [
|
||||
"id~relation/*",
|
||||
"_overlap_percentage>50",
|
||||
"_reverse_overlap_percentage>50",
|
||||
"_overlaps_with!="
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"en": "This building has holes and is modeled as a relation. As such, it cannot be conflated. Conflate it manually via <a href='https://buildings.osm.be/#/'>the building export site</a> {open_in_josm()}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"#": "Actually the same as below, except that the text shows 'add the address' too",
|
||||
"if": {
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
{
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"maintainer": "",
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
|
@ -22,7 +30,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 +47,47 @@
|
|||
],
|
||||
"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}"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "Shows all MapComplete changes"
|
||||
"en": "Shows all MapComplete changes",
|
||||
"de": "Zeigt alle MapComplete Änderungen",
|
||||
"es": "Muestra todos los cambios de MapComplete"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "render_id",
|
||||
"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": "Änderung <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"es": "Conjunto de cambios <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
|
||||
"nb_NO": "Endringssett <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contributor",
|
||||
"render": {
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>",
|
||||
"de": "Änderung wurde von <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a> gemacht",
|
||||
"es": "Cambio hecho por <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "theme",
|
||||
"render": {
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"de": "Änderung mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"if": "theme~http.*",
|
||||
"then": {
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>",
|
||||
"de": "Änderung mit <b>inoffiziellem</b> Thema <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -332,7 +355,9 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Themename contains {search}"
|
||||
"en": "Themename contains {search}",
|
||||
"de": "Themenname enthält {search}",
|
||||
"nb_NO": "Temanavn inneholder {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -348,7 +373,9 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made by contributor {search}"
|
||||
"en": "Made by contributor {search}",
|
||||
"de": "Erstellt von {search}",
|
||||
"es": "Hecho por contributor/a {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -364,7 +391,9 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "<b>Not</b> made by contributor {search}"
|
||||
"en": "<b>Not</b> made by contributor {search}",
|
||||
"de": "<b>Nicht</b> erstellt von {search}",
|
||||
"es": "<b>No</b> hecho por contributor/a {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -379,7 +408,9 @@
|
|||
{
|
||||
"id": "link_to_more",
|
||||
"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 finden Sie <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
|
||||
"es": "Se pueden encontrar más estadísticas <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>aquí</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
"importTags": "The element will receive {tags}",
|
||||
"officialThemesOnly": "The import button is disabled for unofficial themes to prevent accidents",
|
||||
"wrongType": "This element is not a point or a way and can not be imported",
|
||||
"wrongTypeToConflate": "This element is not a point or a way and can not be conflated",
|
||||
"zoomInMore": "Zoom in more to import this feature"
|
||||
},
|
||||
"importTags": "The element will receive {tags}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue