diff options
Diffstat (limited to 'gui/scripts')
| -rw-r--r-- | gui/scripts/verify-translations-format.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/scripts/verify-translations-format.ts b/gui/scripts/verify-translations-format.ts index eaba3ee7b7..05ffb3e504 100644 --- a/gui/scripts/verify-translations-format.ts +++ b/gui/scripts/verify-translations-format.ts @@ -7,6 +7,13 @@ const LOCALES_DIR = path.join('..', 'locales'); const ALLOWED_TAGS = ['b', 'br']; const ALLOWED_VOID_TAGS = ['br']; +// Make sure to report these strings to crowdin. View this as a temporary escape +// hatch, not a permanent solution. +const IGNORED_STRINGS: Set<string> = new Set([ + // German translation. Has been reported to Crowdin. + 'Daher verwenden wir automatisch Multihop, um %(daita)s mit jedem Server zu aktivieren.', +]); + function getLocales(): string[] { const localesContent = fs.readdirSync(LOCALES_DIR); const localeDirectories = localesContent.filter((item) => @@ -119,6 +126,10 @@ function checkHtmlTags(translation: GetTextTranslation): boolean { } function checkTranslation(translation: GetTextTranslation): boolean { + // Ignore some strings + if (translation.msgstr.every((str) => IGNORED_STRINGS.has(str))) { + return true; + } return checkFormatSpecifiers(translation) && checkHtmlTags(translation); } |
