Commit 89393d28 authored by Michal Čihař's avatar Michal Čihař

Improve same check

parent 1e18b36e
...@@ -40,7 +40,6 @@ C_PRINTF_MATCH = re.compile(''' ...@@ -40,7 +40,6 @@ C_PRINTF_MATCH = re.compile('''
# We ignore some words which are usually not translated # We ignore some words which are usually not translated
SAME_BLACKLIST = frozenset(( SAME_BLACKLIST = frozenset((
'b',
'bluetooth', 'bluetooth',
'bzip2', 'bzip2',
'csv', 'csv',
...@@ -68,6 +67,7 @@ SAME_BLACKLIST = frozenset(( ...@@ -68,6 +67,7 @@ SAME_BLACKLIST = frozenset((
'mib', 'mib',
'mm', 'mm',
'n/a', 'n/a',
'name',
'ok', 'ok',
'open document', 'open document',
'pdf', 'pdf',
...@@ -79,10 +79,12 @@ SAME_BLACKLIST = frozenset(( ...@@ -79,10 +79,12 @@ SAME_BLACKLIST = frozenset((
'smsc', 'smsc',
'software', 'software',
'sql', 'sql',
'status',
'text', 'text',
'tib', 'tib',
'vcalendar', 'vcalendar',
'vcard', 'vcard',
'version',
'web', 'web',
'wiki', 'wiki',
'www', 'www',
...@@ -198,7 +200,7 @@ class SameCheck(Check): ...@@ -198,7 +200,7 @@ class SameCheck(Check):
return False return False
# Ignore words which are often same in foreigh language # Ignore words which are often same in foreigh language
if source.lower() in SAME_BLACKLIST or source.lower().rstrip(': ') in SAME_BLACKLIST: if source.lower() in SAME_BLACKLIST or source.lower().strip('&: ') in SAME_BLACKLIST:
return False return False
return (source == target) return (source == target)
......
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