diff --git a/assets/layers/note/note.json b/assets/layers/note/note.json index 9405256f8..39e251fec 100644 --- a/assets/layers/note/note.json +++ b/assets/layers/note/note.json @@ -291,6 +291,23 @@ } ] }, + { + "id": "search_not_any", + "options": [ + { + "osmTags": "_all_comments!~i~.*{search}.*", + "fields": [ + { + "name": "search" + } + ], + "question": { + "en": "Should not mention {search} in any comment" + } + } + ] + }, + { "id": "opened_by", "options": [ diff --git a/langs/layers/ca.json b/langs/layers/ca.json index e92ff82db..32b1ce0db 100644 --- a/langs/layers/ca.json +++ b/langs/layers/ca.json @@ -5137,14 +5137,21 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Creada abans de {search}" + "question": "Editat per última vega pel contribuïdor {search}" } } }, "12": { + "options": { + "0": { + "question": "Creada abans de {search}" + } + } + }, + "13": { "options": { "0": { "question": "Creada després de {search}" @@ -5178,26 +5185,19 @@ } } }, - "6": { + "7": { "options": { "0": { "question": "Obert pel contribuïdor {search}" } } }, - "7": { + "8": { "options": { "0": { "question": "No obert pel contribuïdor {search}" } } - }, - "9": { - "options": { - "0": { - "question": "Editat per última vega pel contribuïdor {search}" - } - } } }, "name": "Notes d'OpenStreetMap", diff --git a/langs/layers/cs.json b/langs/layers/cs.json index f0cf51d7f..72389b371 100644 --- a/langs/layers/cs.json +++ b/langs/layers/cs.json @@ -5363,14 +5363,21 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Vytvořeno před {search}" + "question": "Naposledy upravil přispěvatel {search}" } } }, "12": { + "options": { + "0": { + "question": "Vytvořeno před {search}" + } + } + }, + "13": { "options": { "0": { "question": "Vytvořeno po {search}" @@ -5404,26 +5411,19 @@ } } }, - "6": { + "7": { "options": { "0": { "question": "Otevřeno přispěvatelem {search}" } } }, - "7": { + "8": { "options": { "0": { "question": "Není otevřeno přispěvatelem {search}" } } - }, - "9": { - "options": { - "0": { - "question": "Naposledy upravil přispěvatel {search}" - } - } } }, "name": "Poznámky OpenStreetMap", diff --git a/langs/layers/da.json b/langs/layers/da.json index 2d570bcc6..9ea5bbee4 100644 --- a/langs/layers/da.json +++ b/langs/layers/da.json @@ -1633,7 +1633,7 @@ }, "note": { "filter": { - "9": { + "10": { "options": { "0": { "question": "Senest redigeret af bidragsyder {search}" diff --git a/langs/layers/de.json b/langs/layers/de.json index 378413c6b..5a5718447 100644 --- a/langs/layers/de.json +++ b/langs/layers/de.json @@ -5176,9 +5176,6 @@ "4": { "then": "Sandwichladen" }, - "5": { - "then": "Burgerrestaurant" - }, "6": { "then": "Hier wird Sushi serviert" }, @@ -6773,14 +6770,21 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Erstellt vor dem {search}" + "question": "Zuletzt bearbeitet von {search}" } } }, "12": { + "options": { + "0": { + "question": "Erstellt vor dem {search}" + } + } + }, + "13": { "options": { "0": { "question": "Erstellt nach dem {search}" @@ -6814,26 +6818,19 @@ } } }, - "6": { + "7": { "options": { "0": { "question": "Erstellt von {search}" } } }, - "7": { + "8": { "options": { "0": { "question": "Nicht erstellt von {search}" } } - }, - "9": { - "options": { - "0": { - "question": "Zuletzt bearbeitet von {search}" - } - } } }, "name": "OpenStreetMap-Hinweise", @@ -12231,4 +12228,4 @@ "render": "Windrad" } } -} +} \ No newline at end of file diff --git a/langs/layers/en.json b/langs/layers/en.json index 5dc29a970..c67d85317 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -6786,32 +6786,39 @@ "10": { "options": { "0": { - "question": "Not edited as last by {search}" + "question": "Last edited by contributor {search}" } } }, "11": { "options": { "0": { - "question": "Created before {search}" + "question": "Not edited as last by {search}" } } }, "12": { "options": { "0": { - "question": "Created after {search}" + "question": "Created before {search}" } } }, "13": { "options": { "0": { - "question": "Last edited before {search}" + "question": "Created after {search}" } } }, "14": { + "options": { + "0": { + "question": "Last edited before {search}" + } + } + }, + "15": { "options": { "0": { "question": "Last edited after {search}" @@ -6855,28 +6862,28 @@ "6": { "options": { "0": { - "question": "Opened by contributor {search}" + "question": "Should not mention {search} in any comment" } } }, "7": { "options": { "0": { - "question": "Not opened by contributor {search}" + "question": "Opened by contributor {search}" } } }, "8": { "options": { "0": { - "question": "Edited or commented on by any user with name {search}" + "question": "Not opened by contributor {search}" } } }, "9": { "options": { "0": { - "question": "Last edited by contributor {search}" + "question": "Edited or commented on by any user with name {search}" } } } diff --git a/langs/layers/es.json b/langs/layers/es.json index 5a9881870..0279b5b2d 100644 --- a/langs/layers/es.json +++ b/langs/layers/es.json @@ -3146,14 +3146,21 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Creada antes de {search}" + "question": "Editada por última vez por el contributor {search}" } } }, "12": { + "options": { + "0": { + "question": "Creada antes de {search}" + } + } + }, + "13": { "options": { "0": { "question": "Creada después de {search}" @@ -3187,26 +3194,19 @@ } } }, - "6": { + "7": { "options": { "0": { "question": "Abierto por el contributor {search}" } } }, - "7": { + "8": { "options": { "0": { "question": "No abierto por el contributor {search}" } } - }, - "9": { - "options": { - "0": { - "question": "Editada por última vez por el contributor {search}" - } - } } }, "name": "Notas de OpenStreetMap", diff --git a/langs/layers/fr.json b/langs/layers/fr.json index 0a320cd47..42d05b6af 100644 --- a/langs/layers/fr.json +++ b/langs/layers/fr.json @@ -4439,45 +4439,45 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Créée avant le {search}" + "question": "Dernière modification par {search}" } } }, "12": { "options": { "0": { - "question": "Créée après le {search}" + "question": "Créée avant le {search}" } } }, - "2": { + "13": { "options": { "0": { - "question": "Toutes les notes" + "question": "Créée après le {search}" } } }, - "6": { + "2": { "options": { "0": { - "question": "Ouverte par {search}" + "question": "Toutes les notes" } } }, "7": { "options": { "0": { - "question": "Exclureles notes ouvertes par {search}" + "question": "Ouverte par {search}" } } }, - "9": { + "8": { "options": { "0": { - "question": "Dernière modification par {search}" + "question": "Exclureles notes ouvertes par {search}" } } } diff --git a/langs/layers/nl.json b/langs/layers/nl.json index fb412fb08..693637837 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -5534,14 +5534,21 @@ } } }, - "11": { + "10": { "options": { "0": { - "question": "Aangemaakt voor {search}" + "question": "Laatst bewerkt door bijdrager {search}" } } }, "12": { + "options": { + "0": { + "question": "Aangemaakt voor {search}" + } + } + }, + "13": { "options": { "0": { "question": "Aangemaakt na {search}" @@ -5575,26 +5582,19 @@ } } }, - "6": { + "7": { "options": { "0": { "question": "Geopend door bijdrager {search}" } } }, - "7": { + "8": { "options": { "0": { "question": "Niet geopend door bijdrager {search}" } } - }, - "9": { - "options": { - "0": { - "question": "Laatst bewerkt door bijdrager {search}" - } - } } }, "name": "OpenStreetMap Notes", diff --git a/src/Models/FilteredLayer.ts b/src/Models/FilteredLayer.ts index 2ced53af5..01b5de0b8 100644 --- a/src/Models/FilteredLayer.ts +++ b/src/Models/FilteredLayer.ts @@ -131,6 +131,13 @@ export default class FilteredLayer { return values } + /** + * import Translations from "../UI/i18n/Translations" + * import { RegexTag } from "../Logic/Tags/RegexTag" + * + * const option: FilterConfigOption = {question: Translations.T("question"), osmTags: undefined, originalTagsSpec: "key~.*{search}.*", fields: [{name: "search", type: "string"}] } + * FilteredLayer.fieldsToTags(option, {search: "value_regex"}) // => new RegexTag("key", /^(.*(value_regex).*)$/) + */ private static fieldsToTags( option: FilterConfigOption, fieldstate: string | Record @@ -153,7 +160,7 @@ export default class FilteredLayer { } for (const key in properties) { - v = (v).replace("{" + key + "}", properties[key]) + v = (v).replace("{" + key + "}", "(" + properties[key] + ")") } return v diff --git a/src/Models/ThemeConfig/FilterConfig.ts b/src/Models/ThemeConfig/FilterConfig.ts index 4dfddc64b..73842d79b 100644 --- a/src/Models/ThemeConfig/FilterConfig.ts +++ b/src/Models/ThemeConfig/FilterConfig.ts @@ -8,9 +8,6 @@ import { UIEventSource } from "../../Logic/UIEventSource" import { QueryParameters } from "../../Logic/Web/QueryParameters" import { Utils } from "../../Utils" import { RegexTag } from "../../Logic/Tags/RegexTag" -import BaseUIElement from "../../UI/BaseUIElement" -import Table from "../../UI/Base/Table" -import Combine from "../../UI/Base/Combine" import MarkdownUtils from "../../Utils/MarkdownUtils" import Validators, { ValidatorType } from "../../UI/InputElement/Validators" @@ -70,12 +67,12 @@ export default class FilterConfig { } return { name: f.name, - type, + type } }) for (const field of fields) { - for (let ln in question.translations) { + for (const ln in question.translations) { const txt = question.translations[ln] if (ln.startsWith("_")) { continue @@ -111,7 +108,7 @@ export default class FilterConfig { question: question, osmTags: osmTags, fields, - originalTagsSpec: option.osmTags, + originalTagsSpec: option.osmTags } }) @@ -223,7 +220,7 @@ export default class FilterConfig { opt.osmTags?.asHumanString() ?? "", opt.fields?.length > 0 ? opt.fields.map((f) => f.name + " (" + f.type + ")").join(" ") - : undefined, + : undefined ]) ) })