l.t.t.helpers : module documentation

Part of lp.translations.tests

No module docstring
Function make_translationmessage_for_context A low-level way of constructing TMs appropriate to pofile context.
Function make_translationmessage Creates a TranslationMessage directly and sets relevant parameters.
Function get_all_translations_diverged_anywhere Get diverged TranslationMessage`s for this `POTMsgSet and language.
Function summarize_current_translations Return all existing current translations for POTMsgSet.
def make_translationmessage_for_context(factory, pofile, potmsgset=None, current=True, other=False, diverged=False, translations=None):
A low-level way of constructing TMs appropriate to pofile context.
def make_translationmessage(factory, pofile=None, potmsgset=None, ubuntu=True, upstream=True, diverged=False, translations=None):
Creates a TranslationMessage directly and sets relevant parameters.

This is very low level function used to test core Rosetta functionality such as setCurrentTranslation() method. If not used correctly, it will trigger unique constraints.

def get_all_translations_diverged_anywhere(pofile, potmsgset):
Get diverged TranslationMessage`s for this `POTMsgSet and language.

Leave out translations diverged to pofile.potemplate.

def summarize_current_translations(pofile, potmsgset):

Return all existing current translations for POTMsgSet.

Returns a tuple containing 4 elements:
  • current, shared translation for potmsgset.
  • diverged translation for potmsgset in pofile, or None.
  • shared translation for potmsgset in "other" context.
  • list of all other diverged translations (not including the one diverged in pofile) or an empty list if there are none.
API Documentation for Launchpad, generated by pydoctor at 2018-02-25 00:00:04.