Translate software: Difference between revisions

imported>Paulproteus
(Created page with "== 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...")
 
imported>Paulproteus
 
(3 intermediate revisions by the same user not shown)
Line 16:
 
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:
 
<pre>
print "Is now an OK time to enable the robots?"
</pre>
 
they would write something more like:
 
<pre>
print _("Is now an OK time to enable the robots?")
</pre>
 
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 [http://en.wikipedia.org/wiki/Gettext 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 ==
 
Find a suitable project:
FIXME
 
* Think of a program that you use, or you want to use.
 
* Find its website, and look for a ''how to get involved'' section. Look for a special discussion of translation.
** See if it provides special instructions; such as recommending a web-based translation tool.
** If the website does not give special instructions, but suggests the authors have done the technical work to make translation possible, download its source code, and look for PO or POT files inside.
 
<!-- Projects that have especially good translation opportunities are: FIXME-->
 
Now, get started translating strings!
 
* If you are using a PO-based workflow:
** If you have a PO file: Open up the PO file in your favorite PO editor (POEdit is a reasonable suggestion if you don't have a favorite), and find text that needs translation.
** If you have a POT file but no PO file for your language, you may have to use the ''msginit'' command on the command line to create a PO file.
 
* If you are using a TranslateWiki-based workflow:
** Create an account on translatewiki.net.
** Visit http://translatewiki.net/w/i.php?title=Special:MessageGroupStats and click the ''Message group'' drop-down and select the project you are trying to help.
** See if your chosen language needs help!
** If not, then try selecting other projects to see if you can help them!
 
* If you are using a Launchpad.net-based workflow:
** Read [https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/InternationalizationPrimer/LaunchpadTranslations this guide]!
 
Make sure to find the community:
 
* Join the program's mailing list or IRC channel, and say hello and that you want to contribute in this way. The authors may have tips on doing the translation, such as special places to look for PO files.
* Try to see if they have a special ''localization'' or ''internationalization'' community. Say hi to them, too!
 
<!--
 
== Appendix: Inspirational quote, and recommended reading ==
 
FIXME-->
 
[[Category:Contributing to open source]]
Anonymous user