Translate software

Revision as of 22:29, 5 April 2013 by imported>Paulproteus

Overview

Do you know a non-English language? Or do you know a great piece of software only available in a non-English language that you can translate?

One very helpful and common way to contribute to an open source project is by taking the user-facing text, also known as strings, and converting them into a different language.

How it helps

When you translate software, you enable people to use software in their native language. This is something English speakers take for granted, and it's also one of the reasons many people recommend open source software. (For one example, see Bharat Operating System Solutions.)

Translating software is a great way to get to know the software better yourself. The translation workflow is based on using a program, finding text that is not yet translated, and identifying the best text to use in the target language. To choose the best text, you have to know more than just the target language of translation; you have to understand what that button really means.

It is also a great way to get more involved in a community. You become part of the release cycle and community working on the project.

Not all programs are enabled for translation; there is some technical work required to allow the program to choose non-English text in its interface. If you are willing to make those changes, many projects will be happy to accept those as patches or pull requests to the code.

Beyond all that, you make it easier for people to choose to use all open source software. Many people care about the freedoms behind free and open source software, and so being able to properly use an open source program to get their tasks accomplished is a true gift!

Technical background

The process of localizing a program has two steps. The first step is when the program's developers provide a mechanism and method for the eventual translation of the program and its interface to suit local preferences and languages for users worldwide.

Generally speaking, this requires two changes. First, wherever a programmer would write some text that would be presented to the user, for example:

   print "Is now an OK time to enable the robots?"

they would write something more like:

   print _("Is now an OK time to enable the robots?")

This enables the second stage, called message extraction. This finds all the strings that are annotated with the translation function (typically the _ character) and saves them into a list of all the original strings. (This is often a .POT file; read more at Wikipedia's article on gettext.)

You should be able to find these POT files in the project's source code repository, alongside the source code to the program.

For the process of translating to your chosen language, you find or create a language-specific file called a PO file based on the template.

The typical workflow for translating software is to submit patches/pull requests to the source code repository with your changed PO file. To make those edits, we strongly recommend you use a special PO file editor rather than a generic text editor.

A different workflow is that many projects now let you edit translations on the web. This lets you skip the steps of using a PO editor and of using version control to share your changes; you still will need to be able to use the program you are translating, to get a sense of where the strings appear.

How to get started

FIXME

Appendix: Inspirational quote, and recommended reading

FIXME