Commit 0e714fae authored by Michal Čihař's avatar Michal Čihař

Merge remote-tracking branch 'origin/master'

parents 2d8a7eee 36384184
......@@ -116,6 +116,8 @@ Not translated
++++++++++++++
The source and translated strings are same at least in one of plural forms.
This checks ignores some strings which are quite usually same in all
languages.
.. _check-begin_newline:
......
......@@ -36,6 +36,39 @@ C_PRINTF_MATCH = re.compile('''
(?P<type>[\w%])) # type (%s, %d, etc.)
)''', re.VERBOSE)
# We ignore some words which are usually not translated
SAME_BLACKLIST = [
'b',
'bzip2',
'data',
'e-mail',
'eib',
'export',
'firmware',
'gib',
'gzip',
'id',
'imei',
'import',
'kib',
'latex',
'mib',
'ok',
'open document',
'pdf',
'pib',
'port',
'server',
'sim',
'smsc',
'software',
'sql',
'text',
'tib',
'wiki',
'xml',
'zip',
]
CHECKS = {}
......@@ -61,6 +94,8 @@ def plural_check(f):
def check_same(source, target, flags, language):
if language.code.split('_')[0] == 'en':
return False
if source.lower() in SAME_BLACKLIST:
return False
return (source == target)
CHECKS['same'] = (_('Not translated'), check_same, _('Source and translated strings are same'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment