Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions .github/workflows/suppress_warning.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,34 @@
"""
Dictionary of fields that should not appear in translation check warnings
per each language
per each language.

each maintainer kindly PR's STR_nnnn he has checked and found being reported
incorectly
Each maintainer kindly PRs STR_nnnn they have checked and found being reported
incorrectly.
"""

SUPPRESS_WARNING = dict()
from collections import defaultdict

SUPPRESS_WARNING = defaultdict(list)
"""
This gets imported in translation_check.py, which checks it against all
languages present in repo.
languages present in the repo.

Please note: Failing to add new language in this dictionary will cause
KeyError being raised in translation_check.py and therefore it
will break GitHub Action job
Note: Missing languages are automatically handled via defaultdict, so you
only need to add entries here if a language has specific warnings to suppress.

Example of population:
SUPPRESS_WARNING['qq-JJ'] = ['STR_0123', 'STR_5678', 'STR_8900']
"""

SUPPRESS_WARNING['ar-EG'] = []
SUPPRESS_WARNING['ca-ES'] = ['STR_3247', 'STR_6651', 'STR_6689', 'STR_6744']
SUPPRESS_WARNING['cs-CZ'] = []
SUPPRESS_WARNING['da-DK'] = []
SUPPRESS_WARNING['de-DE'] = []
SUPPRESS_WARNING['en-US'] = []

SUPPRESS_WARNING['eo-ZZ'] = ['STR_0839', 'STR_0840']
SUPPRESS_WARNING['es-ES'] = []
SUPPRESS_WARNING['fi-FI'] = []
SUPPRESS_WARNING['fr-CA'] = []

# fr-FR uses em dashes (—) instead of en dashes (-) for separators and must have a non-breaking space before colons
SUPPRESS_WARNING['fr-FR'] = ['STR_1165', 'STR_1333', 'STR_1334', 'STR_2781', 'STR_6229', 'STR_6230', 'STR_6231']
SUPPRESS_WARNING['gl-ES'] = []

# hu-HU needs to change order of {STRINGID}s for news and research to translate them properly.
SUPPRESS_WARNING['hu-HU'] = ['STR_2235', 'STR_2289']
SUPPRESS_WARNING['it-IT'] = []
SUPPRESS_WARNING['ja-JP'] = []

# ko-KR needs to change order of {STRINGID}s for news and research to translate them properly. STR_1218, 1219 is changed by @AaronVanGeffen at 738e920.
SUPPRESS_WARNING['ko-KR'] = ['STR_1218', 'STR_1219', 'STR_2235', 'STR_2289']
SUPPRESS_WARNING['nb-NO'] = []
SUPPRESS_WARNING['nl-NL'] = []
SUPPRESS_WARNING['pl-PL'] = []
SUPPRESS_WARNING['pt-BR'] = []
SUPPRESS_WARNING['ru-RU'] = []
SUPPRESS_WARNING['sv-SE'] = []
SUPPRESS_WARNING['tr-TR'] = []
SUPPRESS_WARNING['uk-UA'] = []
SUPPRESS_WARNING['vi-VN'] = []
SUPPRESS_WARNING['zh-CN'] = []
SUPPRESS_WARNING['zh-TW'] = []