start => pootle

# updatetm

updatetm is a tool in the Pootle package to generate suggestions from a translation memory to aid translators. This is done by writing .tm files for Pootle to use. Pootle has the ability to show related translations in the translate page. Although related terminology can be suggested in real time from the terminology project, currently suggested translations from a translation memory have to be generated before translation to ensure that performance is not affected too severely.

Whereas terminology matching look for certain keywords in the translation like “file”, “network”, etc. updatetm rather looks for complete translations that are similar in the translation memory. So for a translation like

    "Please enter the name:"

it might give suggestions like

- “Please enter the names”
- “Please enter name:”

etc, if these entries are available in your translation memory.

## Usage

    updatetm [--version] [-h|--help] [--manpage] [--progress PROGRESS] [--errorlevel ERRORLEVEL]
    [-i|--input] INPUT [-t|--tm] MEMORY [-x|--exclude EXCLUDE] [-o|--output] OUTPUT [--psyco MODE]

Options:

--version | show program’s version number and exit
-h, --help | show this help message and exit
--manpage | output a manpage based on the help
--progress=PROGRESS | show progress as: dots, none, bar, names, verbose
--errorlevel=ERRORLEVEL | show errorlevel as: none, message, exception, traceback
-iINPUT, --input=INPUT | read from INPUT in po, pot formats. This can be a file or a directory of files
-xEXCLUDE, --exclude=EXCLUDE | exclude names matching EXCLUDE from input paths
-oOUTPUT, --output=OUTPUT | write to OUTPUT in po.tm format. This can also be a directory if a directory of input files were given
--psyco=MODE | use psyco to speed up the operation, modes: none, full, profile
-tTM, --tm=TM | The file to use as translation memory
-cMAX_CANDIDATES, --candidates=MAX_CANDIDATES | The maximum number of TM candidates to store per message
-sMIN_SIMILARITY, --similarity=MIN_SIMILARITY | The minimum similarity for inclusion
--length=MAX_LENGTH | The maximum string length to consider

## Examples

If you have translations from a related piece of software (say KMail) and you want similar messages to appear while translating Evolution, you could generate the suggestions in the following way:

    updatetm -i evolution.po --tm kmail.po -o evolution.po.tm

Let’s say you have a big translation memory of previous translations in big_memory.tmx and want to generate relevant suggestions for a whole project directory of PO files:

    updatetm -i firefox/fr -t big_memory.tmx -o firefox/fr

This will generate .tm files corresponding to the PO files in firefox/fr. The generated suggestions will be displayed while translating the files in this project.

If you are getting too many unrelated suggestions, you might want to limit the suggestions to those that are more similar to the string to translate:

    updatetm --similarity=90 -i firefox/fr -t big_memory.tmx -o firefox/fr

The similarity is a percentage. To demand limit results to more similar suggestions, make the percentage higher.

If you want to limit the suggestions to only two per translation, the MAX_CANDIDATES flag can be specified

    updatetm --candidates=2 -i firefox/fr -t big_memory.tmx -o firefox/fr

## Bugs

updatetm does not yet support XLIFF files