gconf translation QA checker for keys (was Re: wrong translations of gconf key values)



OK, I promised a test to find these errors and here it is... I'm a
sucker for writing QA checks.

Stats
=====
I've only tested these teams:
Spanish: 35 strings
Dzongkha: 8 strings
French: 9 strings
German: 7 Strings

Instructions on how to run this yourself at the end.


The Test
========
I extended the Translate Toolkit's pofilter (see this commit
http://translate.svn.sourceforge.net/viewvc/translate?view=rev&revision=10019 it will be in release 1.3 in a few days) to run the gcnonf check on any entry that has a location comment of *.schemas.in.  In those entries it looks for "[a-z_]+" in the msgid and checks that it occurs in the msgstr.

Of course tests like this have diminishing returns.  Once everyone has
fixed this error the test is not that useful.  But it is still available
to ensure that nobody makes that error again.  The tests are integrated
into Pootle and we'll integrate them into Virtaal, our new localisation
tool.

pofilter
========
pofilter is a tool we at Translate.org.za wrote in our early days to
check the quality of translations at a technical level.  Machines are so
much better at finding these types of errors then humans.

Yes you can use grep, I do, but the escaping and wrapping can mess with
anyone trying that. Actually you should use pogrep from the Translate
Toolkit anyway.

With the new gconf test we're sitting at 47 tests.  Quite a lot of
effort has gone in to reduce false positive and to make the test adapt
to the punctuation found in various languages.


How to use it the new gconf test
================================

Picking on the Spanish team whose bug Andre pointed out:

Spanish has 35 strings with potential issues which I found using
pofilter.

Follow these instructions to install the toolkit from SVN or wait till
be release v1.3:
http://translate.sourceforge.net/wiki/toolkit/installation#installing_from_subversion

Here are the steps I followed:

1) Download the PO files for Spanish:
http://l10n.gnome.org/languages/es/gnome-2-26/ui.tar.gz

2) Untarred them into gnome-2-26-es/

3) Find the faulty string by running the gconf test:
pofilter --gnome -t gconf gnome-2-26-es gnome-2-26-es-gconf

4) Edit and review the PO files found in gnome-2-26-es-gconf

5) Merge the fixes back into the PO files
pomerge -t gnome-2-26-es gnome-2-26-es-gconf gnome-2-26-new

6) New updated files are in gnome-2-26-new commit these fixes the same
way as you would normally do it.

And your done all fixed.

On Wed, 2009-01-28 at 18:55 +0100, Andre Klapper wrote:
> Dear translators,
> 
> Gconf key values should not be translated to your language only (by
> dropping the original english string) because it makes it impossible for
> users to set them manually, e.g. by using gconf-editor.
> That is what the literal quotes should imply, see 
> http://live.gnome.org/TranslationProject/DevGuidelines/Enclose%20literal%20values%20in%20double%20quotes .
> 
> Example:
> msgid "Possible values are \"always\", "\"bonded\"."
> bad msgstr "Los valores posibles son: «siempre», «vinculados».
> good msgstr "Los valores posibles son: «always» (siempre), «bonded» (vinculados)."
> 
> 
> I've grep'ed the evolution po files and found 37 wrong po files.
> Nautilus: 21 po files. Epiphany: 20 po files.
> 
> While I'm going to file bug reports for the rest of the evening I ask
> you how to avoid this. :-)
> 
> To me it's obvious by looking at the filename of the string (ending with
> ".schemas.in") that these values should not be translated, but to lots
> of other translators it's not.
> In http://bugzilla.gnome.org/show_bug.cgi?id=569457 aloriel proposes to
> add a comment to each of these strings.
> 
> Other opinions/comments?
> 
> andre
-- 
Dwayne Bailey
Associate                                      +27 12 460 1095 (w)
Translate.org.za                               +27 83 443 7114 (c)

Recent blog posts:
* xclip - where have you been all of my life!
http://www.translate.org.za/blogs/dwayne/en/content/xclip-where-have-you-been-all-my-life
* Virtaal on Fedora
* Translate Toolkit on Fedora.  Status of Virtaal and Pootle

Stop Digital Apartheid! - http://www.digitalapartheid.com
Firefox web browser in Afrikaans - http://af.www.mozilla.com/af/
African Network for Localisation (ANLoc) - http://africanlocalisation.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]