GNOME Bugzilla – Bug 523912
Automated translation diff tool
Last modified: 2011-07-29 23:05:59 UTC
In translating things to proper^WBritish English, the original strings sometimes get small mistakes fixed without having the changes backported to the C locale. I've hacked en_GB.pl to try and flag up such changes by translating the msgid strings and comparing them to the already-translated en_GB msgstrs, and for a first go it works fairly well. I plan to go through the modules I translated for 2.22 with it and see what comes up, but here's the first draft anyway. It could do with cleaning up and potentially integrating into en_GB.pl itself, as it shares all the word pairs and a lot of the parsing code, but that's something to discuss here.
Created attachment 107836 [details] Automated translation diff tool
Created attachment 107880 [details] Automated translation diff tool (updated) This version aligns the messages when outputting them for comparison, and ignores the header msgid and translator-credits msgid.
Fine for me to commit, but wouldn't it be easier to make it 1) automatic when an en_GB.po already exists in the directory, or 2) a run-time option for en_GB.pl?
I'll probably make it a run-time option for en_GB.pl, sorry. I should've mentioned that's only a draft.
Created attachment 119233 [details] [review] Automated translation diff tool (updated again) Here's a version integrated with the main en_GB.pl. Just call `en_GB.pl --check /path/to/my/en_GB.po > /my/output.txt` and it should work. This doesn't include the extra translations from bug #524049.
Ping?
More ping?
Created attachment 168913 [details] [review] Whitespace fixes in en_GB.pl
Created attachment 168914 [details] [review] Automated translation diff tool (updated somewhat again) This is an updated version; the result of migrating the patch to git and splitting out the whitespace changes to make it more readable.
Created attachment 168915 [details] Example of --check mode output This is an example of the output gained from applying it to Empathy's current en_GB.po with the following command: en_GB.pl --check /path/to/empathy/en_GB.po > check-example
This is very useful, and should be committed some day. I hope to make use of it for a string review in time for GNOME 3.0.
Comment on attachment 168913 [details] [review] Whitespace fixes in en_GB.pl commit 261e200f133cc82757cf6e1540e191873c52cfd3 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Fri Aug 27 17:29:47 2010 +0100 Whitespace fixes in en_GB.pl en_GB/en_GB.pl | 84 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 42 insertions(+), 42 deletions(-)
Comment on attachment 168914 [details] [review] Automated translation diff tool (updated somewhat again) commit 6a1bd4f8861d16ff7c478db3fb06df7fe2e78cc1 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Fri Aug 27 17:40:44 2010 +0100 Bug 523912 — Automated translation diff tool Add a --check mode to en_GB.pl to allow automated checking of manual translations. This highlights errors in the manual translation, as well as errors in the C locale string which were fixed in the manual translation. Closes: bgo#523912 en_GB/en_GB.pl | 102 ++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 70 insertions(+), 32 deletions(-)
I got bored of waiting.