]> git.koha-community.org Git - koha.git/commit
Bug 11631: Make i18n toolchain ignore useless strings
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Thu, 24 Apr 2014 08:01:52 +0000 (11:01 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 16 May 2014 10:43:39 +0000 (12:43 +0200)
commitfe4e5eded2c4531600f700cbd1f0b0582f316bbb
treec4a132b1593c0311db0f74e25fff61309d06fcd5
parentc69dfd1de219230187928fe258dff9a9ca3b8f2f
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2295530401f53653386ff07a43c668a6a574d65)
misc/translator/xgettext.pl