Tips for translators
From Mandriva Community Wiki
Contents |
Translation Tools
Do you use a tool, which is not mentioned? Add it to the list!
- gTranslator - [1]
- KBabel - KBabel is part of the package kdesdk3-translate, replaced by Lokalize
- OmegaT+ - OmegaT+ Computer Assisted Translation (CAT) tools (supports PO, TMX, ODF, HTML, etc.). Cross-platform (tested/works with Sun Java, OpenJDK, JRockit, ExcelsiorJet).
- poEdit - poEdit (for Windows, MacOS and GNU/Linux)
- poTranslator - Download poTranslator
Finding text in your translation files
pogrep
Although you can use normal grep (explained below), it is not aware of the PO format, and might match more than you want, or might miss strings in the case where lines are wrapped in your PO file.
In the Translate Toolkit (package "python-translate") is pogrep - a tool that understands the PO format, and allows to to search in powerful ways through translation files. You can
- Ignore accelerator characters (like in "Hi_story")
- Limit searches to the msgid, msgstr or comments
- Ignore case differences
- Search using Python regular expressions
- Merge back fixed strings with pomerge - great way to quickly fix terminology over many files
- Search in a file or recursively in a directory
More details and examples for pogrep
grep
+ To search for a specific string, in all the ".po" files of your language, within your local svn repository, ...
point your terminal to the svn directory...
cd /path/to/svn-mandriva/
search...
grep -li 'string text' */xx.po
| where... | |||
| grep | the search utility | ||
| -l | list the files containing the given text | ||
| i | ignore uper/lower case | ||
| 'string text' | the text in question | ||
| */ | any subdirectory (1 level depth) | ||
| xx | the 2+ letters of your language |
+ To search for a specific string, in any type of file, within a folder, and it's subfolders, ...
grep -lir 'string text' *
| where (aditionaly)... | |||
| r | search subfolders | ||
| * | any type of file |
More subversion commands for translators
- To update most of the folders, of your local svn copy, to the latest version of Mandriva's svn:
. . . (this will NOT update all the folders)
. . . (and it will take some time)
cd /to/the/local/svn-mandriva/
svn update */
kdiff3
KDE users can easily compare two ".po" files, within Konqueror, with the use of Kdiff3.
step_01:
right click with the mouse and choose the 1st file...
step_02:
right click with the mouse to choose the 2nd file, and compare...
step_03:
the result will be something like this...
diff applications
What follows, is a list of programs
that show the diffences between two (or more) text files
(like .po and .pot files)
- kdiff3 http://kdiff3.sourceforge.net/ ...demonstrated above
- ColorDiff http://colordiff.sourceforge.net/ ...command line tool
manually correcting rewrapped .po files
- The problem:
Poedit rewrappes the last part of the .po file
(where the unused strings are kept)
in a way different than the Mandriva svn does.
As a result, these differences show up,
adding unnecessary workload to the svn and to the developers.
see it action
The proper way of fixing this can be found here:
More_subversion_commands_for_translators
An alternative way of fixing this,
would be
(before committing the .po file),
to manually copy the last part of the "original svn" .po,
and paste it and replace the last part of the .po file, that is to be committed.
see also
Links
- Languages Codes
- GNU gettext utilities
- Open-Tran.eu - View translations of many projects. Virtaal integrates suggestions from Open-Tran.eu.

