After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523912 - Automated translation diff tool
Automated translation diff tool
Status: RESOLVED FIXED
Product: l10n
Classification: Infrastructure
Component: British English [en_GB]
unspecified
Other Linux
: Normal normal
: ---
Assigned To: l10n en_GB maintainers
l10n en_GB maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-22 22:28 UTC by Philip Withnall
Modified: 2011-07-29 23:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Automated translation diff tool (10.17 KB, application/x-perl)
2008-03-22 22:28 UTC, Philip Withnall
  Details
Automated translation diff tool (updated) (10.34 KB, text/plain)
2008-03-23 18:48 UTC, Philip Withnall
  Details
Automated translation diff tool (updated again) (9.19 KB, patch)
2008-09-23 15:59 UTC, Philip Withnall
none Details | Review
Whitespace fixes in en_GB.pl (5.81 KB, patch)
2010-08-27 16:44 UTC, Philip Withnall
committed Details | Review
Automated translation diff tool (updated somewhat again) (5.42 KB, patch)
2010-08-27 16:45 UTC, Philip Withnall
committed Details | Review
Example of --check mode output (1.15 KB, text/plain)
2010-08-27 16:46 UTC, Philip Withnall
  Details

Description Philip Withnall 2008-03-22 22:28:06 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.
Comment 1 Philip Withnall 2008-03-22 22:28:42 UTC
Created attachment 107836 [details]
Automated translation diff tool
Comment 2 Philip Withnall 2008-03-23 18:48:30 UTC
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.
Comment 3 Bastien Nocera 2008-04-21 10:14:20 UTC
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?
Comment 4 Philip Withnall 2008-04-22 19:29:54 UTC
I'll probably make it a run-time option for en_GB.pl, sorry. I should've mentioned that's only a draft.
Comment 5 Philip Withnall 2008-09-23 15:59:14 UTC
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.
Comment 6 Philip Withnall 2008-10-09 17:02:29 UTC
Ping?
Comment 7 Philip Withnall 2009-03-11 07:52:09 UTC
More ping?
Comment 8 Philip Withnall 2010-08-27 16:44:05 UTC
Created attachment 168913 [details] [review]
Whitespace fixes in en_GB.pl
Comment 9 Philip Withnall 2010-08-27 16:45:16 UTC
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.
Comment 10 Philip Withnall 2010-08-27 16:46:28 UTC
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
Comment 11 Bruce Cowan 2010-09-01 22:41:18 UTC
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 12 Philip Withnall 2011-07-29 23:05:28 UTC
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 13 Philip Withnall 2011-07-29 23:05:43 UTC
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(-)
Comment 14 Philip Withnall 2011-07-29 23:05:59 UTC
I got bored of waiting.