Class POEntry
source code
object --+
|
_BaseEntry --+
|
POEntry
Represents a po file entry.
**Examples**:
>>> entry = POEntry(msgid='Welcome', msgstr='Bienvenue')
>>> entry.occurrences = [('welcome.py', 12), ('anotherfile.py', 34)]
>>> print entry
#: welcome.py:12 anotherfile.py:34
msgid "Welcome"
msgstr "Bienvenue"
<BLANKLINE>
>>> entry = POEntry()
>>> entry.occurrences = [('src/spam.c', 32), ('src/eggs.c', 45)]
>>> entry.tcomment = 'A plural translation'
>>> entry.flags.append('c-format')
>>> entry.msgid = 'I have spam but no egg !'
>>> entry.msgid_plural = 'I have spam and %d eggs !'
>>> entry.msgstr_plural[0] = "J'ai du jambon mais aucun oeuf !"
>>> entry.msgstr_plural[1] = "J'ai du jambon et %d oeufs !"
>>> print entry
# A plural translation
#: src/spam.c:32 src/eggs.c:45
#, c-format
msgid "I have spam but no egg !"
msgid_plural "I have spam and %d eggs !"
msgstr[0] "J'ai du jambon mais aucun oeuf !"
msgstr[1] "J'ai du jambon et %d oeufs !"
<BLANKLINE>
|
|
|
|
|
translated(self)
Return True if the entry has been translated or False |
source code
|
|
|
|
|
|
Inherited from _BaseEntry :
__repr__
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__
|
Inherited from object :
__class__
|
__str__(self,
wrapwidth=78)
(Informal representation operator)
| source code
|
Return the string representation of the entry.
- Overrides:
_BaseEntry.__str__
|
x.__setattr__('name', value) <==> x.name = value
- Overrides:
object.__setattr__
- (inherited documentation)
|