Package translate :: Package storage :: Module poheader
[hide private]
[frames] | no frames]

Module poheader

source code

class that handles all header functions for a header in a po file

Classes [hide private]
  poheader
This class implements functionality for manipulation of po file headers.
Functions [hide private]
 
parseheaderstring(input)
Parses an input string with the definition of a PO header and returns the interpreted values as a dictionary.
source code
str
tzstring()
Returns the timezone as a string in the format [+-]0000, eg +0200.
source code
dict
update(existing, add=False, **kwargs)
Update an existing header dictionary with the values in kwargs, adding new values only if add is true.
source code
Variables [hide private]
  author_re = re.compile(r'.*<\S+@\S+>.*\d{4}')
  default_header = {'Language-Team': 'LANGUAGE <LL@li.org>', 'La...

Imports: re, time, dictutils


Function Details [hide private]

update(existing, add=False, **kwargs)

source code 

Update an existing header dictionary with the values in kwargs, adding new values only if add is true.

Returns: dict
Updated dictionary of header entries

Variables Details [hide private]

default_header

Value:
{'Language-Team': 'LANGUAGE <LL@li.org>',
 'Last-Translator': 'FULL NAME <EMAIL@ADDRESS>',
 'PO-Revision-Date': 'YEAR-MO-DA HO:MI+ZONE',
 'Plural-Forms': 'nplurals=INTEGER; plural=EXPRESSION;',
 'Project-Id-Version': 'PACKAGE VERSION'}