The translatable part of a software package is available in one or
more po files. These files
may be maintained in any of a number of version control systems
(VCSs) depending on the project, such as CVS, Subversion, Mercurial,
and git. They may be hosted on either fedoraproject.org or other
systems.
This chapter explains how to translate the modules hosted on
fedoraproject.org.
Translators work on two interfaces, one for obtaining modules and
another for committing modules. Before you start, you must first
prepare the directories which hold your po files.
To find which modules are translatable, visit the Module List at https://translate.fedoraproject.org/submit/module/.
Before you download any files, prepare the structure holding those
files. The described structure below is an example, and your
structure can be formed differently. For example, if you want to
download the comps module for
translation, make the following directories:
mkdir -p ~/myproject/comps/
To work on another module later, make a directory with the module
name under the parent directory such as ~/myproject/system-config-printer/.
Now that you have prepared a directory structure, you can download a file to translate. You may need to communicate with other translators in your language team to avoid confliction. If you are not sure, please contact your language coordinator.
Visit your language page such as http://translate.fedoraproject.org/languages/ja/, and select a target release. The interface will redirect you to a page for that release, such as http://translate.fedoraproject.org/languages/ja/fedora-9.
Scroll down the page to find the table of all modules available for that release. Use the green download icon next to each module to download the po file to the directory you created in the previous section.
Since the file name to commit follows the name convention of
lang.po, change the name of the
downloaded file. The following example uses the Japanese
locale for the po file:
ls ~/myproject/comps/comps.HEAD.ja.pomv ~/myproject/comps/comps.HEAD.ja.po ja.pols ~/myproject/comps/ja.po
Now the file is ready for translation. Translate the po file for your language in a
po editor such as
KBabel or
gtranslator.
Check the integrity of your file before you commit it.
msgfmt -cvo /dev/null ja.po
![]() |
Important |
|---|---|
If any error message appears, correct it before commit. |
Once you finish translation work, commit the file using a separate interface called Transifex. You can find detailed information about this web tool at https://translate.fedoraproject.org/submit.
Visit https://translate.fedoraproject.org/submit and click the link Jump to Modules! to go to the Modules and repositories page. This page displays all modules to which you can commit changes. Find the module to commit from the list and select it to visit the Submit page for that module.
Login
At the bottom of the Submit page, select Authenticate as a translator to visit the Login page. Authenticate with your Fedora Account System username and password. Upon successful login, the Submit page appears.
Submit
In the section labeled Local file, click the browse button to locate your translated file.
In the section labeled Destination file, click the dropdown menu labeled Overwrite an existing file: to select your language.
In the section labeled Commit message, enter a comment to describe your work.
Select the button to proceed to the Preview submission page. Check the Differences section to verify your changes and select the button.
The Submit page appears and displays the message Your submission was committed successfully. If you receive an error or some other success message, please post it to the Fedora Localization Project mailing list so it can be addressed.
If there is no po file for
your language, add it.
Download the pot file
and copy it as your own language's po file.
cp ~/myproject/comps/comps.HEAD.pot ja.po
kbabel ja.po
msgfmt -cvo /dev/null ja.po
Once you finish the translation, follow the same steps for verifying and then commit your translation described in previous section.
In the section labeled Destination file, type your new filename in the field marked Type the name for a new one:, replacing the filename with your locale:
po/ja.po
To proofread your translation as part of the software, follow these steps:
Change directory to the package you want to proofread. For example,
cd ~/myproject/system-config-printer/
Convert the .po file to
a .mo file using msgfmt with -o option:
msgfmt -o system-config-printer.mo ja.po
As a root user, overwrite the existing .mo file in
/usr/share/locale/.
lang/LC_MESSAGES/
First, back up the existing file:
su -
cp /usr/share/locale/ja/LC_MESSAGES/system-config-printer.mo system-config-printer.mo-backup
Now move the file converted for proofreading.
mv system-config-printer.mo /usr/share/locale/ja/LC_MESSAGES/
Exit root user.
exit
Proofread the package with the translated strings as part of the application:
LANG=ja_JP.UTF-8 system-config-printer
The application related to the translated package runs with the translated strings.