Chromium translations in launchpad and errors

Fabien Tassin fta at ubuntu.com
Tue Dec 14 16:09:35 GMT 2010


Hi,

based on the most common mistakes i've noticed so far, i'd like to
clarify something.

In the error page, i show both <ph> variables (as upstream needs them),
and %{} variables (as i decided to expose them in gettext, it's supposed
to be more readable).

ex:
       Grit                  GetText
 "<ph name="DOMAIN"/>" <=> "%{DOMAIN}"

It's important to respect:

- the variable names (don't change the case, or name or anything inside
the braces). The syntax is %{NAME}, in that order, no space between '%'
and '{'

- all the variables from the untranslated string *must* be in the
translated string (you can change their order if it's better in your
lang, but you must have the same number and names of variables overall)

(It's too bad it's not possible to auto-check that in LP. Maybe i should
file a feature request in rosetta)

in case you didn't notice, you can already see your work in the
packages. In the the daily PPA, it's almost an instant reward.
Besides the PPAs, I just posted a new Chromium update with as many
strings as possible (except the inspector-* template, which still needs
some work upstream). It's already in Natty, and will land in Maverick
and Lucid shortly.

/Fabien

-----Original Message-----
From: Fabien Tassin <fta at ubuntu.com>
To: launchpad-translators at lists.launchpad.net,
ubuntu-translators at lists.ubuntu.com
Subject: Chromium translations in launchpad and errors
Date: Sat, 11 Dec 2010 00:53:30 +0100

Hi,

As you've already learned on David's blog, Chromium is now translatable
in Launchpad. Some of you discovered it weeks ago and already started to
contribute strings. I'm glad you did because it helped me find a lot of
corner cases when i created the machinery behind all this.

if you want the details, please see David's blog:
http://davidplanella.wordpress.com/2010/12/09/chromium-opens-to-community-translations-in-launchpad/

You may have noticed that some of your contributions are already visible
in the Ubuntu builds of Chromium (official and PPA).
I'm glad to add that the first batch of strings landed upstream
yesterday and that other distros are willing to use them and maybe even
contribute.

What i want to tell you about here is the error checking.

In a nutshell, Chromium has its translations in a format called Grit
(some sort of XLST, an XML language), while Launchpad only handles
GetText, as i'm sure you already know.
Those formats are very different, meaning the back and forth conversion
was not that easy to achieve, and is very error prone. A simple error in
a gettext string can lead to bogus XML and then to a build failure (as
those files are parsed during build). I've implemented several sanity
tests in my converter, and the results are always visible there:

http://people.ubuntu.com/~fta/chromium/translations/trunk/converter-output.html

The reason that page exists is that it is not possible for me to inform
Launchpad/Rosetta that i consider a given translation bogus and that i
rejected it. You may think it's translated because LP tells you so, but
it's not used, and won't be until it's fixed.

This page is updated daily, at the same time i feed the strings to
Launchpad. Launchpad also exports every day the strings you are
contributing, but both actions are not in sync, so it may take 1 or 2
days for your strings to be processed by my converter, and errors to
appear in that page. (I've heard some of those errors are already fixed,
thank you! so tomorrow, they should disappear)

I'd appreciate if you could have a look at that page from time to time.
To make your life easier, I've tried to provide details about what's
wrong with each string and also a link back to that string in Launchpad.
If it's unclear, please ask.

/Fabien







More information about the ubuntu-translators mailing list