Tag Archives: l10n

Using machine translation to help translate MyTrails

There’s nothing wrong in using the Machine Translation system built into Weblate as a base to help the process of translating each string.

You need to be aware of some issues introduced by the automatic translation system, in particular Google Translate:

  • it may interfere with punctuation, introducing extra spaces before commas or periods, which you’ll need to remove
  • it may interfere with markup:
    • markup such as <i>italic</i> may be tuned into &lt; and other messes; it’s not dangerous but will look very odd to end-users
    • placeholders such as %1$s, %s or %d are replaced with strings generated by the application, and if they are messed up during translation, the application will not only look odd, it may crash (but only in your language, making identification more difficult), please take extra care to make sure no spaces are introduced in these placeholders and that they are not otherwise modified
  • when the source string contains line-breaks (indicated by greyed-out ↵ icons), the automatic translation may introduce non-greyed-out such icons in the translated string, which should be replaced with actual line breaks
  • another source of minor issues is the introduction of double spaces or spaces before or after the string, which I then need to clean up

I have also added support for Microsoft Translate, which may introduce fewer issues.

Switching translation in MyTrails

I realized I hadn’t written an post about this, so if you didn’t read the release notes, you might have missed this feature, introduced in MyTrails 1.3.17: the ability to switch MyTrails to a different language.

You’ll find this at the bottom of the Appearance preferences, and you can use it to force MyTrails to English if the default translation for your language is lacking, or to force a different language than the system language.

2013-08-28 08.48.06

The translator for the currently-used language is credited there as well.

New translation tool

Notice: the translation server is currently unavailable…

For many months I have been using a wobbly system for translation: a combination of the impressive android2po, which transforms Android string files (in xml format) to the ubiquitous .po format, and a translation server based on Drupal Localization server, which is barely maintained, and missing many features.

I had looked at several hosted services such as MyGengo String (promising, but flawed and now defunct), Crowdin (started out ugly and free, now less-ugly, full-featured but expensive), Get Localization (very nice and free, but never fixed the fatal flaws in their Android support) and took a quick look at other very expensive commercial solutions…

Finally, I settled on using Weblate. It’s pretty, it’s fast, it’s full-featured, its developer is friendly and responsive, it has good documentation, it’s very easy to integrate (if you’re using git for source control and you have your own server) and it fully supports Android. Because it directly uses git, I can keep an eye on all translation changes easily and fix anything that is amiss.

Instructions for translators

Whether you’ve already been contributing to MyTrails translations on the old server or whether you’re a new contributor, please connect to the new server and register (sorry, I haven’t been able to migrate accounts across). You will receive an activation email (if you don’t please contact me).

http://weblate.frogsparks.com

Once your account is activated, please let me know so I can accept you as part of the Translators group. If your language is not yet present in the interface, please specify it, so I can activate it.

If you don’t have a Save button on the translation page (just a Suggest button), you haven’t yet been accepted as a translator; you can start translating, but you’ll have to later approve each translation.

You can edit your profile to specify the language(s) you’re interested in translating (this adds shortcuts in the Weblate menus). You should also subscribe to Notifications on new strings to translate and Notification on new suggestion so you can stay on top of your translations.

Once you’re ready to start translating, navigate to your language and the relevant MyTrails subproject (at the moment, latest is the current active project) and click the Translate button to start translating untranslated strings.

1.3 @ Weblate 2013-08-27 17-50-21

In the translation interface, you will see the English version of the string (and of any other Secondary language you selected in your profile). Edit the translation and click Save (the next untranslated string will be loaded automatically).

You can use Google Translate in the Machine translation tab as a starting point by clicking the Copy button next to it.

1.3 - Italian @ Weblate 2013-08-27 17-56-02

In some cases, it may be useful to check the Nearby messages tab to get a bit of context. In some cases the Comments or Source tabs will have some guidance.

For more information, please see the full Weblate manual.

Suggesting translations

If you are not an official translator you can still easily suggest a translation, even without creating an account, if you find a typo or awkward translation. Simply navigate to the language you’re interested in, and in the Search tab, type the word as it is misspelled in the application, which will lead you to the offending entry.

1.3 - French @ Weblate 2013-08-28 09-06-08

There, you can simply fix the translation and click the Suggest button. The official translator will integrate your suggestion if they agree with it.

1.3 - Français @ Weblate 2013-08-28 09-08-27

 

Thank you all for your contributions!

Translation status