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
| pofile

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) | source code

three-value tuple

get_libgettextpo_version() Returns the libgettextpo version | source code

Variables | [hide private]

| lsep = `" "` Seperator for #: entries
| STRING = `c_char_p`
| xerror_prototype = `CFUNCTYPE(None, c_int, POINTER(po_message),`...``
| xerror2_prototype = `CFUNCTYPE(None, c_int, POINTER(po_message)`...``
| names = `['gettextpo', 'libgettextpo']`
| gpo = `cdll.LoadLibrary('libgettextpo.so')`
| xerror_handler = `po_xerror_handler()`

Imports: multistring, pocommon, encodingToUse, quote, data, Union, c_wchar, c_double, CFUNCTYPE, byref, pointer, alignment, c_longlong, c_short, oledll, HRESULT, c_ulong, c_int, WinError, memmove, addressof, c_buffer, cdll, memset, string_at, sizeof, WINFUNCTYPE, create_string_buffer, create_unicode_buffer, c_long, c_char_p, ArgumentError, LittleEndianStructure, RTLD_LOCAL, c_ushort, py_object, wstring_at, c_wchar_p, windll, PyDLL, DEFAULT_MODE, WinDLL, gestalt, ARRAY, DllCanUnloadNow, CDLL, c_ubyte, RTLD_GLOBAL, c_char, c_float, SetPointerType, resize, cast, c_int8, c_byte, OleDLL, GetLastError, c_ulonglong, set_conversion_mode, c_voidp, pythonapi, PYFUNCTYPE, BigEndianStructure, pydll, Structure, c_uint, c_void_p, FormatError, Array, c_size_t, c_uint8, DllGetClassObject, LibraryLoader, POINTER, ctypes, StringIO, os, pypo, re, sys, tempfile

Function Details | [hide private]

### get_libgettextpo_version()

source code

Returns the libgettextpo version

Returns: three-value tuple
  libgettextpo version in the following format:

         (major version, minor version, subminor version)

Variables Details | [hide private]

### xerror_prototype

Value:

      CFUNCTYPE(None, c_int, POINTER(po_message), STRING, c_uint, c_uint, c_
      int, STRING)

### xerror2_prototype

Value:

      CFUNCTYPE(None, c_int, POINTER(po_message), STRING, c_uint, c_uint, c_
      int, STRING, POINTER(po_message), STRING, c_uint, c_uint, c_int, STRIN
      G)