Module pypo
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 et al
(see kbabel)
|
pounit
|
|
pofile
this represents a .po file containing various units
|
|
|
|
|
|
|
|
quoteforpo(text)
quotes the given text for a PO file, returning quoted and escaped
lines |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
lsep = "\n#: "
Seperator for #: entries
|
|
po_unescape_map = {"\\r": "\r", "\\t": "\t", '\\"': '"', '\\n'...
|
|
po_escape_map = dict([(value, key) for(key, value) in po_unesc...
|
Imports:
multistring,
quote,
textwrap,
data,
pocommon,
base,
re,
copy,
cStringIO,
poparser
Escapes a line for po format. assumes no occurs in the line.
- Parameters:
|
Remove quote and unescape line from po file.
- Parameters:
line - a quoted line from a po file (msgid or msgstr)
|
Tests whether the given encoding is known in the python runtime, or
returns utf-8. This function is used to ensure that a valid encoding is
always used.
|
po_unescape_map
- Value:
{"\\r": "\r", "\\t": "\t", '\\"': '"', '\\n': '\n', '\\\\': '\\'}
|
|
po_escape_map
- Value:
dict([(value, key) for(key, value) in po_unescape_map.items()])
|
|