From be8d329492f36e1135524c660724a192b87a5cab Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Wed, 14 Oct 2015 16:03:29 +0100 Subject: [PATCH] Omit line numbers from translation files - too noisy in commit history. --- l10n.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n.py b/l10n.py index a2d2fcd3..5ddc554f 100755 --- a/l10n.py +++ b/l10n.py @@ -142,8 +142,8 @@ if __name__ == "__main__": for line in h: lineno += 1 match = regexp.search(line) - if match and not match.group(2) in seen: # only record first instance of a string - seen[match.group(2)] = (match.group(4) and (match.group(4)[1:].strip()) + '. ' or '') + '[%s:%d]' % (f,lineno) + if match and not seen.get(match.group(2)): # only record first commented instance of a string + seen[match.group(2)] = (match.group(4) and (match.group(4)[1:].strip()) + '. ' or '') + '[%s]' % f if seen: template = codecs.open('L10n/en.template', 'w', 'utf-8') for thing in sorted(seen, key=unicode.lower):