class documentation

class translatable(nodes.Node):

Known subclasses: sphinx.addnodes.toctree

View In Hierarchy

Node which supports translation.

The translation goes forward with following steps:

  1. Preserve original translatable messages
  2. Apply translated messages from message catalog
  3. Extract preserved messages (for gettext builder)

The translatable nodes MUST preserve original messages. And these messages should not be overridden at applying step. Because they are used at final step; extraction.

Method apply​_translated​_message Apply translated message.
Method extract​_original​_messages Extract translation messages.
Method preserve​_original​_messages Preserve original translatable messages.
def apply_translated_message(self, original_message, translated_message):
Apply translated message.
Parameters
original​_message:strUndocumented
translated​_message:strUndocumented
def extract_original_messages(self):
Extract translation messages.
Returns
Sequence[str]list of extracted messages or messages generator
def preserve_original_messages(self):
Preserve original translatable messages.