start
Table of Contents

podebug

Marks PO messages so that it is easy to reference and locate strings when your translated application is running.

Use it to:

Usage

podebug [options] [-f format] <in> <out>

Where:

-f is an optional format strings. The default format is “[%s]”
<in> is an input directory or PO file
<out> is an output directory or PO files, if missing output will be to standard out.

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
-xEXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths
-oOUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats
--psyco=MODE use psyco to speed up the operation, modes: none, full, profile
-P, --pot output PO Templates (.pot) rather than PO files (.po)
-fFORMAT, --format=FORMAT specify format string
--rewrite=STYLE the translation rewrite style: xxx, en (v1.1)
--hash=LENGTH add an md5 hash to translations (v1.1)

Formats

A format string can have these various options:

f full filename including directory
F as %f but with .po file extension
b base of filename
B base of filename with .po file extension
d directory name
s preset OpenOffice.org modifier
c use only consonants
N a set number of characters

A format string may look like this:

Complex format strings may make it too difficult to actually read the translation, so you are probably best served using as short a string as possible.

Rewriting

The rewriting options are designed to change the target text.

en Takes the source text and copies it to the target
xxx Takes the source text and adds xxx to the start and end of the string before placing it in the target

This is mostly valuable for debugging English text. The ‘xxx’ rewriter is useful in that it allows you to identify text that has not localisable as that text will lake the xxx characters.

The ‘en’ rewriter can be used to prepare English hashed (see below) files for quickly finding strings that have spelling or other errors. It can also be used to create a translate English file which can then be used for other purposes such as British English translation.

Hashing

Sometimes you find an error in a string. But it is difficult to search for the occurance of the error. In order to make it easy to find a string in your files we can produce a hash on the strings location and other data. This produces unique alphanumeric sequences which are prepended to the target text. Thus now in your application you have your translated text and a alphanumeric value. Its is then easy to search for that value and find your problem string.

Bugs

Marking exceptions are hard coded for OpenOffice.org. They should be configurable for any application.