forked from MapComplete/MapComplete
Ignore search terms in generate translations
This commit is contained in:
parent
d3817eba85
commit
819f813853
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,7 @@ import ScriptUtils from "./ScriptUtils"
|
|||
import Script from "./Script"
|
||||
|
||||
const knownLanguages = ["en", "nl", "de", "fr", "es", "gl", "ca"]
|
||||
|
||||
const ignoreTerms = ["searchTerms"]
|
||||
class TranslationPart {
|
||||
contents: Map<string, TranslationPart | string> = new Map<string, TranslationPart | string>()
|
||||
|
||||
|
@ -49,6 +49,7 @@ class TranslationPart {
|
|||
if (!translations.hasOwnProperty(translationsKey)) {
|
||||
continue
|
||||
}
|
||||
|
||||
const v = translations[translationsKey]
|
||||
if (typeof v != "string") {
|
||||
console.error(
|
||||
|
@ -106,6 +107,9 @@ class TranslationPart {
|
|||
if (!object.hasOwnProperty(key)) {
|
||||
continue
|
||||
}
|
||||
if (ignoreTerms.indexOf(key) >= 0) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (dontTranslateKeys?.indexOf(key) >= 0) {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue