[Mediawiki-i18n] Update on using Translatewiki for translations

Ævar Arnfjörð Bjarmason avarab at gmail.com
Fri Aug 28 13:10:36 UTC 2009


On Thu, Jul 9, 2009 at 12:17 PM, Ævar Arnfjörð
Bjarmason<avarab at gmail.com> wrote:

I'm splitting this from the previous thread.

> On Tue, Jun 23, 2009 at 1:21 PM, Richard Fairhurst<richard at systemed.net> wrote:
>> Potlatch uses the OSM wiki for localisation. I have no plans to change this
>> in favour of a third-party solution.
>
> Perhaps we should look into using translatewiki, OpenLayers is already using it:
>
>  http://translatewiki.net
>  http://translatewiki.net/wiki/Translating:OpenLayers/stats/trunk
>
> The software itself is just a MediaWiki extension:
>
>  http://www.mediawiki.org/wiki/Extension:Translate
>
> How it works is that you write a driver for it so that it can
> read-write your in/output, here's the driver for OpenLayers for
> example:
>
>  http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/Translate/ffs/OpenLayers.php?revision=51180&view=markup
>
> Then you run a job periodically which dumps the translations & imports
> them into your project. Bidirectional syncing is also possible but
> then you have to worry about merging.
>
> They're already working on a YAML driver.
>
> Once you're logged in you get a nice Launchpad-like interface for
> translations. *I* think it's more tedious than just editing the YAML
> in Emacs but then again it's not really targeting that demographic but
> amateur translators who'll be more familiar with a web interface

I talked to siebrand (Translatewiki guy) yesterday here at Wikimania
2009 about using Translatewiki for OSM projects. Beginning with the
rails_port.

They now have a YAML driver so they can support our translations, how
it would work is:

 * Initially the translations would be imported to Translatewiki from
the files in sites/rails_port/config/locales/
 * Translators would then go to the Translatewiki site for translations

It would be easiest if translations were exclusively done at
Translatewiki from this point (so we don't have to do merging).
Strings could be added / deleted in the primary en.yml file by
developers when hacking the rails_port and the re-import / export
process would take this into account.

Translations would then be merged back into the OSM SVN by running a
job which exports from Translatewiki. Siebrand has offered to take
care of this task if we give him a SVN account. He's already
maintaining such jobs at dozens of SVN servers, so adding one more
isn't a workload for him.

Here's an example of such a commit:
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55608

The only problem I can see is Translatewiki's incompatibility with
with rails-i18n's plural forms. I.e. when you can turn a key "foo.bar"
into "foo.bar.[one/two/three/.../other]" if it contains a "{{count}}"
variable.

We can hack around this by simply providing all the plural forms for
all languages if any language needs them. Plural forms are used for
<2% of our translation strings so I don't think this would be that
large of a PITA. Especially compared to all the translations we'd get
in return.



More information about the Mediawiki-i18n mailing list