class documentation
class MessageIdStore: (source)
The MessageIdStore store MessageId and make sure that there is a 1-1 relation between msgid and symbol.
Method | __init__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | add |
Add valid legacy message id. |
Method | add |
Add valid message id. |
Method | check |
Undocumented |
Method | get |
Return msgids but the input can be a symbol. |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | register |
Undocumented |
Static Method | _raise |
Raise an error when a msgid is duplicated. |
Static Method | _raise |
Raise an error when a symbol is duplicated. |
Instance Variable | __active |
Undocumented |
Instance Variable | __msgid |
Undocumented |
Instance Variable | __old |
Undocumented |
Instance Variable | __symbol |
Undocumented |
Add valid legacy message id. There is a little duplication with add_msgid_and_symbol to avoid a function call, this is called a lot at initialization.
Add valid message id. There is a little duplication with add_legacy_msgid_and_symbol to avoid a function call, this is called a lot at initialization.
Return msgids but the input can be a symbol. self.__active_msgids is used to implement a primitive cache for this function.
def register_message_definition(self, msgid:
str
, symbol: str
, old_names: list[ tuple[ str, str]]
):
(source)
¶
Undocumented
@staticmethod
def _raise_duplicate_msgid(symbol:
def _raise_duplicate_msgid(symbol:
str
, msgid: str
, other_msgid: str
) -> NoReturn
:
(source)
¶
Raise an error when a msgid is duplicated.