Package translate :: Package storage :: Module cpo

[hide private]
[frames] | no frames]

# Module cpo

source code

Classes that hold units of .po files (pounit) or entire files (pofile).

Gettext-style .po (or .pot) files are used in translations for KDE, GNOME and many other projects.

This uses libgettextpo from the gettext package. Any version before 0.17 will at least cause some subtle bugs or may not work at all. Developers might want to have a look at gettext-tools/libgettextpo/gettext-po.h from the gettext package for the public API of the library.

Classes | [hide private]

| po_message
| po_xerror_handler
| po_error_handler
| pounit Base class for translation units.
| pofile this represents a .po file containing various units

Functions | [hide private]

xerror_cb(severity, message, filename, lineno, column, multilint_p, message_text) | source code

xerror2_cb(severity, message1, filename1, lineno1, column1, multiline_p1, message_text1, message2, filename2, lineno2, column2, multiline_p2, message_text2) | source code

escapeforpo(text) | source code

quoteforpo(text) | source code

unquotefrompo(postr, joinwithlinebreak=False) | source code

encodingToUse(encoding) | source code

get_libgettextpo_version() Returns the libgettextpo version | source code

Variables | [hide private]

| lsep = ``'``` `'`` Seperator for #: entries
| names = ``[``'``gettextpo``'``,` `'``libgettextpo``'``]``
| gpo = `<CDLL 'libgettextpo.so.0', handle 949d7b0 at 945bfec>`
| xerror_handler = `po_xerror_handler()`
| lib_location = ``'``libgettextpo.so.0``'``
| name = ``'``gettextpo``'``

Function Details | [hide private]

### get_libgettextpo_version()

source code

    Returns the libgettextpo version

    @return: a three-value tuple containing the libgettextpo version in the
    following format:
        (major version, minor version, subminor version)