Chore: translation fix

This commit is contained in:
Pieter Vander Vennet 2025-02-12 02:02:53 +01:00
parent 252a2d8398
commit 5dbeba17da
3 changed files with 33 additions and 65 deletions

View file

@ -206,7 +206,7 @@
"fr": "Cette voie fait {canonical(climbing:length)} de long", "fr": "Cette voie fait {canonical(climbing:length)} de long",
"cs": "Tato trasa je {canonical(climbing:length)} dlouhá", "cs": "Tato trasa je {canonical(climbing:length)} dlouhá",
"es": "Esta vía mide {canonical(climbing:length)} de largo", "es": "Esta vía mide {canonical(climbing:length)} de largo",
"ca": "Aquesta ruta és {canonical(escalada: longitud)} llarga" "ca": "Aquesta ruta és {canonical(climbing:length)} llarga"
}, },
"freeform": { "freeform": {
"key": "climbing:length", "key": "climbing:length",

View file

@ -790,7 +790,7 @@
] ]
}, },
{ {
"id": "platform", "id": "added-image",
"options": [ "options": [
{ {
"question": { "question": {
@ -800,27 +800,16 @@
"es": "El conjunto de cambios agregó al menos una imagen", "es": "El conjunto de cambios agregó al menos una imagen",
"ko": "주요 변경사항에 최소 하나의 이미지가 추가 되었습니다", "ko": "주요 변경사항에 최소 하나의 이미지가 추가 되었습니다",
"nl": "Changeset voegde minstens één afbeelding toe" "nl": "Changeset voegde minstens één afbeelding toe"
}
},
{
"question": {
"en": "Made with Android"
}, },
"osmTags": "android=yes" "osmTags": "add-image>0"
},
{
"question": {
"en": "Made on the web"
},
"osmTags": "android="
} }
] ]
}, },
{ {
"id": "added-image", "id": "exclude_grb",
"options": [ "options": [
{ {
"osmTags": "add-image>0", "osmTags": "theme!=grb",
"question": { "question": {
"en": "Exclude GRB theme", "en": "Exclude GRB theme",
"de": "GRB-Thema ausschließen", "de": "GRB-Thema ausschließen",
@ -833,10 +822,10 @@
] ]
}, },
{ {
"id": "exclude_grb", "id": "exclude_etymology",
"options": [ "options": [
{ {
"osmTags": "theme!=grb", "osmTags": "theme!=etymology",
"question": { "question": {
"en": "Exclude etymology theme", "en": "Exclude etymology theme",
"de": "Etymologie-Thema ausschließen", "de": "Etymologie-Thema ausschließen",
@ -849,18 +838,25 @@
] ]
}, },
{ {
"id": "exclude_etymology", "id": "platform",
"options": [ "options": [
{ {
"osmTags": "theme!=etymology",
"question": { "question": {
"en": "Exclude etymology theme", "en": "All platforms"
"de": "Etymologie-Thema ausschließen", },
"es": "Excluir el tema de etimología", "quesiton": "All platforms"
"cs": "Vyloučit etymologii tématu", },
"nl": "Thema etymologie uitsluiten", {
"ko": "어원 테마 제외" "question": {
} "en": "Made with Android"
},
"osmTags": "android=yes"
},
{
"question": {
"en": "Made on the web"
},
"osmTags": "android="
} }
] ]
} }

View file

@ -1,42 +1,14 @@
import { Utils } from "../../Utils" import { Utils } from "../../Utils"
/** This code is autogenerated - do not edit. Edit ./assets/layers/usersettings/usersettings.json instead */ /** This code is autogenerated - do not edit. Edit ./assets/layers/usersettings/usersettings.json instead */
export class ThemeMetaTagging { export class ThemeMetaTagging {
public static readonly themeName = "usersettings" public static readonly themeName = "usersettings"
public metaTaggging_for_usersettings(feat: { properties: Record<string, string> }) { public metaTaggging_for_usersettings(feat: {properties: Record<string, string>}) {
Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_md", () => Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_md', () => feat.properties._description.match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/)?.at(1) )
feat.properties._description Utils.AddLazyProperty(feat.properties, '_d', () => feat.properties._description?.replace(/&lt;/g,'<')?.replace(/&gt;/g,'>') ?? '' )
.match(/\[[^\]]*\]\((.*(mastodon|en.osm.town).*)\).*/) Utils.AddLazyProperty(feat.properties, '_mastodon_candidate_a', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.href.match(/mastodon|en.osm.town/) !== null)[0]?.href }) (feat) )
?.at(1) Utils.AddLazyProperty(feat.properties, '_mastodon_link', () => (feat => {const e = document.createElement('div');e.innerHTML = feat.properties._d;return Array.from(e.getElementsByTagName("a")).filter(a => a.getAttribute("rel")?.indexOf('me') >= 0)[0]?.href})(feat) )
) Utils.AddLazyProperty(feat.properties, '_mastodon_candidate', () => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a )
Utils.AddLazyProperty( feat.properties['__current_backgroun'] = 'initial_value'
feat.properties, }
"_d", }
() => feat.properties._description?.replace(/&lt;/g, "<")?.replace(/&gt;/g, ">") ?? ""
)
Utils.AddLazyProperty(feat.properties, "_mastodon_candidate_a", () =>
((feat) => {
const e = document.createElement("div")
e.innerHTML = feat.properties._d
return Array.from(e.getElementsByTagName("a")).filter(
(a) => a.href.match(/mastodon|en.osm.town/) !== null
)[0]?.href
})(feat)
)
Utils.AddLazyProperty(feat.properties, "_mastodon_link", () =>
((feat) => {
const e = document.createElement("div")
e.innerHTML = feat.properties._d
return Array.from(e.getElementsByTagName("a")).filter(
(a) => a.getAttribute("rel")?.indexOf("me") >= 0
)[0]?.href
})(feat)
)
Utils.AddLazyProperty(
feat.properties,
"_mastodon_candidate",
() => feat.properties._mastodon_candidate_md ?? feat.properties._mastodon_candidate_a
)
feat.properties["__current_backgroun"] = "initial_value"
}
}