l.t.b.translationmessage : module documentation

Part of lp.translations.browser

View classes for ITranslationMessage interface.
Function revert_unselected_translations Revert translations that the user entered but did not select.
Function contains_translations Does translations contain any nonempty translations?
Class POTMsgSetBatchNavigator No class docstring; 2/2 methods documented
Class CustomDropdownWidget No class docstring; 1/1 methods documented
Class CurrentTranslationMessageMenu Undocumented
Class CurrentTranslationMessageIndexView A view to forward to the translation form.
Class BaseTranslationView Base class that implements a framework for modifying translations.
Class CurrentTranslationMessagePageView A view for the page that renders a single translation.
Class CurrentTranslationMessageView Holds all data needed to show an ITranslationMessage.
Class CurrentTranslationMessageZoomedView A view that displays a TranslationMessage, but zoomed in.
Class TranslationMessageSuggestions See ITranslationMessageSuggestions.
Class Submission A submission generated from a TranslationMessage
Function convert_translationmessage_to_submission Turn a TranslationMessage to an object used for rendering a submission.
Function _getSuggestionFromFormId Return the suggestion associated with the given form element ID.
def revert_unselected_translations(translations, current_message, plural_indices_to_store):
Revert translations that the user entered but did not select.
Parameterstranslationsa dict mapping plural forms to their respective translation strings.
current_messagethe current TranslationMessage. Its translations are substituted for corresponding ones that the user entered without selecting their radio buttons.
plural_indices_to_storea sequence of plural form numbers that the user did select new translations for.
Returnsa dict similar to translations, but with any translations that are not in plural_indices_to_store reset to what they were in current_message (if any).
def contains_translations(translations):
Does translations contain any nonempty translations?
Parameterstranslationsa dict mapping plural forms to their respective translation strings.
def _getSuggestionFromFormId(form_id):
Return the suggestion associated with the given form element ID.

The ID is in the format generated by POSubmission.makeHTMLID.

def convert_translationmessage_to_submission(message, current_message, plural_form, pofile, legal_warning_needed, is_empty=False, other_side=False, local_to_pofile=False):
Turn a TranslationMessage to an object used for rendering a submission.
ParametersmessageA TranslationMessage.
plural_formA plural form to prepare a submission for.
pofileA containing PO file where suggestion is being rendered.
legal_warning_neededWhether a warning check is needed.
is_emptyIs the submission empty or not.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.