diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-05-27 23:50:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-05-27 23:57:18 +0100 |
| commit | ec9cb6719c72930243afc534120da12323e29568 (patch) | |
| tree | 748635ae20a490ec474f2bc39fd703c0a4b07ed0 /hacks | |
| parent | cbd2876db6b68e35cb6e7b111ce6b14180c4f97f (diff) | |
Fix several bits of bad i18n markup and add start of checking script.
Diffstat (limited to 'hacks')
| -rw-r--r-- | hacks/check_i18n | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hacks/check_i18n b/hacks/check_i18n new file mode 100644 index 000000000..b07c0ad17 --- /dev/null +++ b/hacks/check_i18n @@ -0,0 +1,17 @@ +#!/usr/bin/python3 + +import os + +for (dirpath, dirs, files) in os.walk('.'): + for filename in files: + if filename.endswith('.po'): + with open(os.path.join(dirpath, filename), 'r') as f: + for l in f.readlines(): + # Pango markup with corrupted quotation marks + if l.find('span') != -1 and (l.find('«') != -1 or l.find('“') != -1): + print(os.path.join(dirpath, filename)) + print(l) + # Badly-spaced placeholders + if not l.find('%%') and (l.find('% 1') != -1 or l.find('% 2') != -1 or l.find('% s') != -1 or l.find('% d') != -1 or l.find('% f') != -1): + print(os.path.join(dirpath, filename)) + print(l) |
