|
|
__init__(self,
source=None,
encoding="UTF-8")
Constructs a TranslationUnit containing the given source string. |
source code
|
|
|
|
_initallcomments(self,
blankall=False)
Initialises allcomments |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
merge(self,
otherpo,
overwrite=False,
comments=True,
authoritative=False)
Merges the otherpo (with the same msgid) into this one. |
source code
|
|
|
|
|
|
|
|
|
|
hastypecomment(self,
typecomment)
Check whether the given type comment is present |
source code
|
|
|
|
|
|
|
settypecomment(self,
typecomment,
present=True)
Alters whether a given typecomment is present |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
infer_state(self)
Empty method that should be overridden in sub-classes to infer the
current state(_n) of the unit from its current state. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| _getmsgpartstr(self,
partname,
partlines,
partcomments="") |
source code
|
|
|
|
_encodeifneccessary(self,
output)
encodes unicode strings and returns other strings unchanged |
source code
|
|
|
|
|
|
|
_getoutput(self)
return this po element as a string |
source code
|
|
|
String
|
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
Inherited from pocommon.pounit:
get_state_n,
isreview,
istranslatable,
istranslated,
markreviewneeded,
set_state_n
Inherited from base.TranslationUnit:
__eq__,
get_state_id,
getunits,
multistring_to_rich,
setid,
unit_iter
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__subclasshook__
|
|
|
| _get_source_vars(self,
msgid,
msgid_plural) |
source code
|
|
|
|
|
|
|
getsource(self)
Returns the unescaped msgid |
source code
|
|
|
|
|
|
|
_get_prev_source(self)
Returns the unescaped msgid |
source code
|
|
|
|
|
|
Inherited from base.TranslationUnit:
getsourcelanguage
|
|
|
gettarget(self)
Returns the unescaped msgstr |
source code
|
|
|
|
|
|
Inherited from base.TranslationUnit:
gettargetlanguage,
gettargetlen
|
|
|
getnotes(self,
origin=None)
Return comments based on origin value (programmer, developer, source
code and translator) |
source code
|
|
|
|
addnote(self,
text,
origin=None,
position="append")
This is modeled on the XLIFF method. |
source code
|
|
|
|
|
|
List
|
|
|
|
|
|
Inherited from base.TranslationUnit:
addlocations
|
|
Inherited from pocommon.pounit:
adderror,
geterrors
|