Translations

From StatusNet

(Redirected from Translation)
Jump to: navigation, search

Contents

[edit] Existing Translations

We're now coordinating open-source localisation via translatewiki.net (StatusNet page at translatewiki).

[edit] How to Translate StatusNet

As with many other Open Source projects, StatusNet uses gettext for translations. All through the code the strings are inside the gettext translation function eg. `_('Register')`. This allows StatusNet to be translated into any language without the code needing to be modified.

Doing the translations via web is considered the most easy way of doing it. We have implemented a system completely web-based on which you can do all your work, and collaborate with other translators working on the same language as you.

You can create an account and log in to the system at translatewiki.net.

[edit] Contacts

Any questions feel free to send a message to the statusnet-i18n list or developers list.

[edit] Internationalisation notes for developers

See i18n guidelines for some common pitfalls, and some ways you can make things easier on your translators!

[edit] Translating/Overriding Help documentation

Copy the /doc-src/ directory to /statusnet/local/ those docs will allways be shown first. Add different language files with a language code suffix, so about.zh for Chinese, about.fr for French and about for default (English)

[edit] Open issues

[edit] Alternate editing interfaces

Recommendations to investigate so far:

  • Gnome-emblem-default.svg.png  http://translatewiki.net
    • Interface & performance work desirable, but infrastructure is there and they're happy to work with us.

* http://www.transifex.net/

    • Good git integration, but on-web editor isn't ready yet. Dev version technically works for large files like ours, but isn't really usable the way it pages all strings into an unsearchable list.
  • http://launchpad.net/
  • Pootle
    • Just released version 2.0, VCS integration, online web editor, alternative source languages, RSS feeds, ... Live demo at http://pootle.locamotion.org/

[edit] Gettext problems

  • Gnome-emblem-default.svg.png  gettext module not always available - fixed in 0.8.2
    resolved by using php-gettext as fallback
  • Gnome-emblem-default.svg.png  setlocale+gettext fail if the system doesn't have the locale installed - fixed in 0.9.x
    Resolved this by setting locale to existing en_US before user locale.
  • Gnome-emblem-default.svg.png  inconsistencies with locale naming (es vs fr_FR) - fixed in 0.9.x
    aggravates the above
  • setlocale+gettext may have unpredictable results on multithreaded servers
    locale settings are process-wide so may affect multiple threads... this is most likely on Windows, since Unix web servers usually fork multi-process
  • setlocale doesn't support UTF-8 locales on Windows? (untested)

Using php-gettext should work for any locale regardless of whether it's available on the system, but if PHP's gettext module is present we have no way to override calls like '_("blah")'. We'd have to change all calls to _gettext() or __() or something. Annoying for code maintenance, but possible.

So far that's not a high priority, since the most common problems seem to have been resolved. --brion 22:37, 21 October 2009 (UTC)

Personal tools