forked from MapComplete/MapComplete
Fix: add check for missing 'noopener' attributes; add missing noopener attributes
This commit is contained in:
parent
39572f4767
commit
6e8617c93f
11 changed files with 470 additions and 468 deletions
|
@ -610,23 +610,30 @@
|
|||
"he": "האם יש אתר אינטרנט עם מידע נוסף על היצירה הזו?"
|
||||
},
|
||||
"render": {
|
||||
"en": "More information on <a href='{website}' target='_blank'>this website</a>",
|
||||
"nl": "Meer informatie op <a href='{website}' target='_blank'>deze website</a>",
|
||||
"fr": "Plus d'info <a href='{website}' target='_blank'>sûr ce site web</a>",
|
||||
"de": "Weitere Informationen auf <a href='{website}' target='_blank'>dieser Webseite</a>",
|
||||
"id": "Info lanjut tersedia di <a href='{website}' target='_blank'>laman web</a> ini",
|
||||
"it": "Ulteriori informazioni su <a href='{website}' target='_blank'>questo sito web</a>",
|
||||
"ru": "Больше информации на <a href='{website}' target='_blank'>этом сайте</a>",
|
||||
"ja": "<a href='{website}' target='_blank'>Webサイト</a>に詳細情報がある",
|
||||
"zh_Hant": "<a href='{website}' target='_blank'>這個網站</a>有更多資訊",
|
||||
"nb_NO": "Mer info er å finne på <a href='{website}' target='_blank'>denne nettsiden</a>",
|
||||
"pt": "Mais informações <a href='{website}' target='_blank'>neste site</a>",
|
||||
"hu": "További információ <a href='{website}' target='_blank'>ezen a weboldalon</a>",
|
||||
"pl": "Więcej informacji na <a href='{website}' target='_blank'>tej stronie</a>",
|
||||
"es": "Más información en <a href='{website}' target='_blank'>este sitio web</a>",
|
||||
"da": "Yderligere oplysninger på <a href='{website}' target='_blank'> dette websted</a>",
|
||||
"cs": "Více informací na <a href='{website}' target='_blank'>této webové stránce</a>",
|
||||
"ca": "Més informació a <a href='{website}' target='_blank'>aquesta pàgina web</a>"
|
||||
"special": {
|
||||
"type": "link",
|
||||
"href": "{website}",
|
||||
"text": {
|
||||
"en": "More information on this website",
|
||||
"nl": "Meer informatie op deze website",
|
||||
"fr": "Plus d'info sûr ce site web",
|
||||
"de": "Weitere Informationen auf dieser Webseite",
|
||||
"id": "Info lanjut tersedia di laman web ini",
|
||||
"it": "Ulteriori informazioni su questo sito web",
|
||||
"ru": "Больше информации на этом сайте",
|
||||
"ja": "Webサイトに詳細情報がある",
|
||||
"zh_Hant": "這個網站有更多資訊",
|
||||
"nb_NO": "Mer info er å finne på denne nettsiden",
|
||||
"pt": "Mais informações neste site",
|
||||
"hu": "További információ ezen a weboldalon",
|
||||
"pl": "Więcej informacji na tej stronie",
|
||||
"es": "Más información en este sitio web",
|
||||
"da": "Yderligere oplysninger på dette websted",
|
||||
"cs": "Více informací na této webové stránce",
|
||||
"ca": "Més informació a aquesta pàgina web"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
"freeform": {
|
||||
"key": "website",
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"club="
|
||||
]
|
||||
},
|
||||
"render": "<a href='{url}' target='_blank'>{url}</a>",
|
||||
"render": "<a href='{url}' target='_blank' rel='noopener'>{url}</a>",
|
||||
"freeform": {
|
||||
"key": "url",
|
||||
"type": "url"
|
||||
|
|
|
@ -360,14 +360,7 @@
|
|||
"ca": "A quina adreça de correu electrònic es pot enviar amb preguntes i problemes amb aquest parc natural?"
|
||||
},
|
||||
"render": {
|
||||
"nl": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"en": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"ca": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"de": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"fr": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"it": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"ru": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"id": "<a href='mailto:{email}' target='_blank'>{email}</a>"
|
||||
"*": "<a href='mailto:{email}' target='_blank' rel='noopener'>{email}</a>"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "email",
|
||||
|
@ -393,7 +386,7 @@
|
|||
"ca": "A quin número de telèfon es pot trucar amb preguntes i problemes amb aquest parc natural?"
|
||||
},
|
||||
"render": {
|
||||
"*": "<a href='tel:{phone}' target='_blank'>{phone}</a>"
|
||||
"*": "<a href='tel:{phone}' target='_blank' rel='noopener'>{phone}</a>"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "phone",
|
||||
|
|
|
@ -208,7 +208,7 @@
|
|||
{
|
||||
"id": "osmlink",
|
||||
"render": {
|
||||
"*": "<a href='https://openstreetmap.org/{id}' target='_blank'><img src='./assets/svg/osm-logo-us.svg'/></a>"
|
||||
"*": "<a href='https://openstreetmap.org/{id}' target='_blank' rel='noopener'F><img src='./assets/svg/osm-logo-us.svg'/></a>"
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
|
@ -220,7 +220,7 @@
|
|||
{
|
||||
"id": "email",
|
||||
"render": {
|
||||
"*": "<a href='mailto:{email}' target='_blank'>{email}</a>"
|
||||
"*": "<a href='mailto:{email}' target='_blank' rel='noopener'>{email}</a>"
|
||||
},
|
||||
"icon": "./assets/svg/envelope.svg",
|
||||
"labels": [
|
||||
|
@ -255,7 +255,7 @@
|
|||
{
|
||||
"if": "contact:email~*",
|
||||
"icon": "./assets/svg/envelope.svg",
|
||||
"then": "<a href='mailto:{contact:email}' target='_blank'>{contact:email}</a>",
|
||||
"then": "<a href='mailto:{contact:email}' target='_blank' rel='noopener'>{contact:email}</a>",
|
||||
"hideInAnswer": true
|
||||
}
|
||||
],
|
||||
|
|
|
@ -491,7 +491,7 @@
|
|||
"key": "email",
|
||||
"type": "email"
|
||||
},
|
||||
"render": "<a href='mailto:{email}' target='_blank'>{email}</a>",
|
||||
"render": "<a href='mailto:{email}' target='_blank' rel='noopener'>{email}</a>",
|
||||
"id": "sport_pitch-email"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -406,7 +406,7 @@
|
|||
"special": {
|
||||
"type": "multi",
|
||||
"key": "_translation_links",
|
||||
"tagrendering": "<a href='{link}' target='_blank'>Translate entries of {id}</a>"
|
||||
"tagrendering": "<a href='{link}' target='_blank' rel='noopener'>Translate entries of {id}</a>"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -416,20 +416,20 @@
|
|||
{
|
||||
"if": "_mastodon_link~*",
|
||||
"then": {
|
||||
"en": "A link to your Mastodon-profile has been been found: <a href='{_mastodon_link}' target='_blank'>{_mastodon_link}</a>",
|
||||
"de": "Es wurde ein Link zu deinem Mastodon-Profil gefunden: <a href='{_mastodon_link}' target='_blank'>{_mastodon_link}</a>",
|
||||
"nl": "Een link naar je Mastodon-profiel werd gevonden: <a href='{_mastodon_link}' target='_blank'>{_mastodon_link}</a>",
|
||||
"fr": "Un lien vers votre profil Mastodon a été trouvé : <a href='{_mastodon_link}' target='_blank'>{_mastodon_link}</a>",
|
||||
"ca": "S'ha trobat un enllaç al vostre perfil de Mastodon: <a href='{_mastodon_link}' target='_blank'>{_mastodon_link}</a>"
|
||||
"en": "A link to your Mastodon-profile has been been found: <a href='{_mastodon_link}' target='_blank' rel='noopener'>{_mastodon_link}</a>",
|
||||
"de": "Es wurde ein Link zu deinem Mastodon-Profil gefunden: <a href='{_mastodon_link}' target='_blank' rel='noopener'>{_mastodon_link}</a>",
|
||||
"nl": "Een link naar je Mastodon-profiel werd gevonden: <a href='{_mastodon_link}' target='_blank' rel='noopener'>{_mastodon_link}</a>",
|
||||
"fr": "Un lien vers votre profil Mastodon a été trouvé : <a href='{_mastodon_link}' target='_blank' rel='noopener'>{_mastodon_link}</a>",
|
||||
"ca": "S'ha trobat un enllaç al vostre perfil de Mastodon: <a href='{_mastodon_link}' target='_blank' rel='noopener'>{_mastodon_link}</a>"
|
||||
},
|
||||
"icon": "mastodon"
|
||||
},
|
||||
{
|
||||
"if": "_mastodon_candidate~*",
|
||||
"then": {
|
||||
"en": "We found a link to what looks to be a mastodon account, but it is unverified. <a href='https://www.openstreetmap.org/profile/edit' target='_blank'>Edit your profile description</a> and place the following there: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>",
|
||||
"de": "Wir haben einen Link gefunden, der aussieht wie ein Mastodon-Konto, aber nicht verifiziert ist. <a href='https://www.openstreetmap.org/profile/edit' target='_blank'>Bearbeiten Sie Ihre Profilbeschreibung</a> und fügen Sie dort Folgendes ein: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>",
|
||||
"nl": "Je profielbeschrijving bevat een link die vermoedelijk naar je Mastodon gaat, maar deze link is niet verifieerdbaar voor Mastodon.<a href='https://www.openstreetmap.org/profile/edit' target='_blank'>Pas je profielbeschrijving aan</a> en plaats er de volgende code: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>"
|
||||
"en": "We found a link to what looks to be a mastodon account, but it is unverified. <a href='https://www.openstreetmap.org/profile/edit' target='_blank' rel='noopener'>Edit your profile description</a> and place the following there: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>",
|
||||
"de": "Wir haben einen Link gefunden, der aussieht wie ein Mastodon-Konto, aber nicht verifiziert ist. <a href='https://www.openstreetmap.org/profile/edit' target='_blank' rel='noopener'>Bearbeiten Sie Ihre Profilbeschreibung</a> und fügen Sie dort Folgendes ein: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>",
|
||||
"nl": "Je profielbeschrijving bevat een link die vermoedelijk naar je Mastodon gaat, maar deze link is niet verifieerdbaar voor Mastodon.<a href='https://www.openstreetmap.org/profile/edit' target='_blank' rel='noopener'>Pas je profielbeschrijving aan</a> en plaats er de volgende code: <span class='code'><a href=\"{_mastodon_candidate}\" rel=\"me\">Mastodon</a>"
|
||||
},
|
||||
"icon": "invalid"
|
||||
}
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"title": {
|
||||
"en": "Changes made with MapComplete",
|
||||
"de": "Mit MapComplete erstellte Änderungen",
|
||||
"fr": "Changements faits avec MapComplete",
|
||||
"nl": "Wijzigingen gemaakt met MapComplete"
|
||||
"en": "Changes made with MapComplete"
|
||||
},
|
||||
"shortDescription": {
|
||||
"en": "Show changes made with MapComplete",
|
||||
"de": "Mit MapComplete erstellte Änderungen anzeigen",
|
||||
"nl": "Toon wijzigingen gemaakt met MapComplete"
|
||||
"en": "Shows changes made by MapComplete"
|
||||
},
|
||||
"description": {
|
||||
"en": "This maps shows all the changes made with MapComplete",
|
||||
"de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen",
|
||||
"fr": "Cette carte montre tous les changements faits avec MapComplete",
|
||||
"nl": "Deze kaart toont alle wijzigingen die met MapComplete gemaakt werden"
|
||||
"en": "This maps shows all the changes made with MapComplete"
|
||||
},
|
||||
"icon": "./assets/svg/logo.svg",
|
||||
"hideFromOverview": true,
|
||||
|
@ -28,9 +20,7 @@
|
|||
{
|
||||
"id": "mapcomplete-changes",
|
||||
"name": {
|
||||
"en": "Changeset centers",
|
||||
"de": "Zentrum der Änderungssätze",
|
||||
"nl": "Centerpunt van changeset"
|
||||
"en": "Changeset centers"
|
||||
},
|
||||
"minzoom": 0,
|
||||
"source": {
|
||||
|
@ -41,57 +31,41 @@
|
|||
},
|
||||
"title": {
|
||||
"render": {
|
||||
"en": "Changeset for {theme}",
|
||||
"de": "Änderungssatz für {theme}",
|
||||
"fr": "Groupe de modifications pour {theme}"
|
||||
"en": "Changeset for {theme}"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"en": "Show all MapComplete changes",
|
||||
"de": "Alle MapComplete-Änderungen anzeigen",
|
||||
"nl": "Toon alle MapComplete wijzigingen"
|
||||
"en": "Shows all MapComplete changes"
|
||||
},
|
||||
"tagRenderings": [
|
||||
{
|
||||
"id": "show_changeset_id",
|
||||
"render": {
|
||||
"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>",
|
||||
"fr": "Groupe de modifications <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
"en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contributor",
|
||||
"question": {
|
||||
"en": "Which contributor made this change?",
|
||||
"de": "Welcher Mitwirkende hat diese Änderung vorgenommen?",
|
||||
"fr": "Quel contributeur a fait cette modification ?",
|
||||
"nl": "Welke bijdrager maakte deze wijziging?"
|
||||
"en": "What contributor did make this change?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "user"
|
||||
},
|
||||
"render": {
|
||||
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"de": "Änderung gemacht von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"fr": "Modification faite par <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
|
||||
"nl": "Wijziging gemaakt door <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>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "theme-id",
|
||||
"question": {
|
||||
"en": "What theme was used to make this change?",
|
||||
"de": "Welches Thema wurde für diese Änderung verwendet?",
|
||||
"fr": "Quel thème a été utilisé pour faire cette modification ?"
|
||||
"en": "What theme was used to make this change?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "theme"
|
||||
},
|
||||
"render": {
|
||||
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"de": "Geändert mit Thema <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>",
|
||||
"fr": "Modifié avec le thème <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
|
||||
"en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -100,29 +74,19 @@
|
|||
"key": "locale"
|
||||
},
|
||||
"question": {
|
||||
"en": "What locale (language) was this change made in?",
|
||||
"de": "In welcher Sprache wurde diese Änderung vorgenommen?",
|
||||
"fr": "En quelle langue est-ce que ce changement a été fait ?",
|
||||
"nl": "In welke locale (taal) werd deze wijziging gemaakt?"
|
||||
"en": "What locale (language) was this change made in?"
|
||||
},
|
||||
"render": {
|
||||
"en": "User locale is {locale}",
|
||||
"de": "Usersprache ist {locale}",
|
||||
"nl": "De gebruikerstaal is {locale}"
|
||||
"en": "User locale is {locale}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "host",
|
||||
"render": {
|
||||
"en": "Change made with <a href='{host}'>{host}</a>",
|
||||
"de": "Änderung vorgenommen mit <a href='{host}'>{host}</a>",
|
||||
"fr": "Modification faite avec <a href='{host}'>{host}</a>",
|
||||
"nl": "Wijziging gemaakt met <a href='{host}'>{host}</a>"
|
||||
"en": "Change with with <a href='{host}'>{host}</a>"
|
||||
},
|
||||
"question": {
|
||||
"en": "What host (website) was this change made with?",
|
||||
"de": "Mit welchem Host / welcher Website wurde diese Änderung gemacht?",
|
||||
"nl": "Met welke host (website) werd deze wijziging gemaakt?"
|
||||
"en": "What host (website) was this change made with?"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "host"
|
||||
|
@ -143,14 +107,10 @@
|
|||
{
|
||||
"id": "version",
|
||||
"question": {
|
||||
"en": "What version of MapComplete was used to make this change?",
|
||||
"de": "Mit welcher Version von MapComplete wurde diese Änderung gemacht?",
|
||||
"fr": "Quelle version de MapComplete a été utilisée pour faire cette modification ?"
|
||||
"en": "What version of MapComplete was used to make this change?"
|
||||
},
|
||||
"render": {
|
||||
"en": "Made with {editor}",
|
||||
"de": "Erstellt mit {editor}",
|
||||
"fr": "Fait avec {editor}"
|
||||
"en": "Made with {editor}"
|
||||
},
|
||||
"freeform": {
|
||||
"key": "editor"
|
||||
|
@ -492,9 +452,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Theme name contains {search}",
|
||||
"de": "Themenname enthält {search}",
|
||||
"nl": "Themenaam bevat {search}"
|
||||
"en": "Themename contains {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -510,9 +468,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made by contributor {search}",
|
||||
"de": "Erstellt von {search}",
|
||||
"nl": "Gemaakt door bijdrager {search}"
|
||||
"en": "Made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -528,9 +484,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "<b>Not</b> made by contributor {search}",
|
||||
"de": "<b>Nicht</b> erstellt von {search}",
|
||||
"nl": "<b>Niet</b> gemaakt door bijdrager {search}"
|
||||
"en": "<b>Not</b> made by contributor {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -547,9 +501,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made before {search}",
|
||||
"de": "Erstellt vor {search}",
|
||||
"nl": "Gemaakt voor {search}"
|
||||
"en": "Made before {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -566,9 +518,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made after {search}",
|
||||
"de": "Erstellt nach {search}",
|
||||
"nl": "Gemaakt na {search}"
|
||||
"en": "Made after {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -584,10 +534,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "User language (iso-code) {search}",
|
||||
"de": "Benutzersprache (ISO-Code) {search}",
|
||||
"fr": "Langage utilisateur (code-ISO) {search}",
|
||||
"nl": "De taal van de bijdrager is {search}"
|
||||
"en": "User language (iso-code) {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -603,9 +550,7 @@
|
|||
}
|
||||
],
|
||||
"question": {
|
||||
"en": "Made with host {search}",
|
||||
"de": "Erstellt mit Host {search}",
|
||||
"nl": "Gemaakt met host {search}"
|
||||
"en": "Made with host {search}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -616,10 +561,7 @@
|
|||
{
|
||||
"osmTags": "add-image>0",
|
||||
"question": {
|
||||
"en": "Changeset added at least one image",
|
||||
"de": "Changeset fügte mindestens ein Bild hinzu",
|
||||
"fr": "Le groupe de modifications a ajouté au moins une image",
|
||||
"nl": "Changeset bevat minstens één afbeelding"
|
||||
"en": "Changeset added at least one image"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -634,9 +576,7 @@
|
|||
{
|
||||
"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>",
|
||||
"de": "Mehr Statistiken gibt es <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>",
|
||||
"fr": "D'autres statistiques sont disponibles <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>ici</a>"
|
||||
"en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -666,4 +606,4 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -4,9 +4,6 @@ import { Utils } from "../Utils"
|
|||
export type PriviligedLayerType = (typeof Constants.priviliged_layers)[number]
|
||||
|
||||
export default class Constants {
|
||||
static {
|
||||
console.log("Meta (package:json)", meta)
|
||||
}
|
||||
public static vNumber = meta.version
|
||||
|
||||
public static ImgurApiKey = meta.config.api_keys.imgur
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -233,6 +233,7 @@ export class Translation extends BaseUIElement {
|
|||
*
|
||||
* new Translation({"en": "This is a sentence. This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence <br/> This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence <br> This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence"
|
||||
* new Translation({"en": "This is a sentence with a <b>bold</b> word. This is another sentence"}).FirstSentence().textFor("en") // "This is a sentence with a <b>bold</b> word"
|
||||
* @constructor
|
||||
*/
|
||||
|
@ -243,7 +244,7 @@ export class Translation extends BaseUIElement {
|
|||
continue
|
||||
}
|
||||
let txt = this.translations[lng]
|
||||
txt = txt.replace(/(\.|<br\/>).*/, "")
|
||||
txt = txt.replace(/(\.|<br\/>|<br>).*/, "")
|
||||
txt = Utils.EllipsesAfter(txt, 255)
|
||||
tr[lng] = txt.trim()
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import colors from "./assets/colors.json"
|
||||
import { HTMLElement } from "node-html-parser"
|
||||
|
||||
export class Utils {
|
||||
/**
|
||||
|
@ -490,7 +489,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
"\nThe value is",
|
||||
v
|
||||
)
|
||||
v = (<HTMLElement>v.InnerConstructElement())?.textContent
|
||||
v = v.InnerConstructElement()?.textContent
|
||||
}
|
||||
|
||||
if (typeof v !== "string") {
|
||||
|
|
Loading…
Reference in a new issue