translate.storage.cpo

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, pypo, encodingToUse, data, c_int, c_uint, c_char_p, c_long, CFUNCTYPE, POINTER, Structure, cdll, ctypes, os, 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)