Part of lp.translations.interfaces.potmsgset View In Hierarchy
Int | id | Undocumented |
Text | context | Undocumented |
Object | msgid_singular | A message ID along with the context uniquely identifies the |
Object | msgid_plural | Undocumented |
Attribute | commenttext | The manual comments this set has. |
Attribute | filereferences | The files where this set appears. |
Attribute | sourcecomment | The source code comments this set has. |
Attribute | flagscomment | The flags this set has. |
Attribute | flags | List of flags that apply to this message. |
Text | singular_text | Undocumented |
Text | plural_text | Undocumented |
Bool | uses_english_msgids | Some formats, such as Mozilla's XPI, use symbolic msgids where |
List | credits_message_ids | This class attribute is intended to be used to construct database |
Method | clone | Return a new copy of this POTMsgSet. |
Method | getCurrentTranslationMessageOrDummy | Return the current TranslationMessage , or a dummy. |
Method | getOtherTranslation | Returns the TranslationMessage that is current on the other side. |
Method | getSharedTranslation | Returns a shared TranslationMessage. |
Method | getLocalTranslationMessages | Return all local unused translation messages for the POTMsgSet. |
Method | getExternallyUsedTranslationMessages | Find externally used translations for the same message. |
Method | getExternallySuggestedTranslationMessages | Find externally suggested translations for the same message. |
Method | getExternallySuggestedOrUsedTranslationMessages | Find externally suggested/used translations for the same message. |
Method | hasTranslationChangedInLaunchpad | Whether an imported translation differs from the current one. |
Method | isTranslationNewerThan | Whether a current translation is newer than the timestamp . |
Method | validateTranslations | Validate translations against gettext. |
Method | submitSuggestion | Submit a suggested translation for this message. |
Method | dismissAllSuggestions | Dismiss all suggestions for the given pofile. |
Method | getCurrentTranslation | Get a current translation message. |
Method | setCurrentTranslation | Set the message's translation in Ubuntu, or upstream, or both. |
Method | resetCurrentTranslation | Turn the current translation back into a suggestion. |
Method | clearCurrentTranslation | Set the current message in pofile to be untranslated. |
Attribute | hide_translations_from_anonymous | Whether the translations for this message should be hidden. |
Attribute | is_translation_credit | Whether this is a message set for crediting translators. |
Choice | translation_credits_type | Undocumented |
Method | makeHTMLID | Unique name for this POTMsgSet for use in HTML element ids. |
Method | updatePluralForm | Update plural form text for this message. |
Method | getSequence | Return the sequence number for this potmsgset in potemplate. |
Method | setSequence | Set the sequence number for this potmsgset in potemplate. |
Method | setTranslationCreditsToTranslated | Set the current translation for this translation credits message. |
Method | getAllTranslationMessages | Retrieve all TranslationMessage`s for this `POTMsgSet . |
Method | getAllTranslationTemplateItems | Retrieve all TranslationTemplateItem`s for this `POTMsgSet . |
Parameters | language | The language in which to find the message. |
side | The side from which this message is seen. |
Parameters | language | The language in which to find the message. |
side | The side from which this message is seen. |
Unused are those which are not current or imported, and local are those which are directly attached to this POTMsgSet.
Parameters | language | language we want translations for. |
include_dismissed | Also return those translation messages that have a creation date older than the review date of the current message (== have been dismissed). | |
include_unreviewed | Also return those translation messages that have a creation date newer than the review date of the current message (== that are unreviewed). This is the default. |
This is used to find suggestions for translating this
POTMsgSet
that are actually used (i.e. current or imported) in
other templates.
The suggestions are read-only; they come from the slave store.
Parameters | language | language we want translations for. |
This is used to find suggestions for translating this
POTMsgSet
that were entered in another context, but for the
same English text, and are not in actual use.
The suggestions are read-only; they come from the slave store.
Parameters | language | language we want translations for. |
This returns a mapping: language -> namedtuple (suggested, used) containing the results of self.getExternallySuggestedTranslationMessages and self.getExternallyUsedTranslationMessages for each language.
Parameters | suggested_languages | languages we want suggestions for. |
used_languages | languges we want used messages for. |
There has to be an imported translation: if there isn't, this is not a 'changed' translation, just a 'new' translation in Launchpad.
Parameters | potemplate | potemplate we are asking about. |
language | language for which translations we are asking about. |
timestamp
.
Returns True if there is a current and newer translation, and False otherwise.
Parameters | pofile | translation file for which translations we are asking about. |
timestamp | a timestamp we are comparing to. |
translations
against gettext.Parameters | translations | A dict mapping plural forms to translated strings. |
Raises | GettextValidationError | if there is a problem with the translations. |
If an identical message is already present, it will be returned (and it is not changed). Otherwise, a new one is created and returned. Suggestions for translation credits messages are ignored, and None is returned in that case. Setting from_import to true will prevent karma assignment and set the origin of the created message to SCM instead of ROSETTAWEB.
If a translation conflict is detected, TranslationConflict is raised.
Parameters | pofile | a POFile to dismiss suggestions from. |
reviewer | the person that is doing the dismissal. | |
lock_timestamp | the timestamp when we checked the values we want to update. |
Parameters | potemplate | An IPOTemplate to look up a translation for.
If it's None, ignore diverged translations. |
language | translation should be to this ILanguage . | |
side | translation side to look at. (A TranslationSide value) |
Parameters | pofile | POFile you're setting translations in. Other
POFiles that share translations with this one may also be
affected. |
submitter | Person who is setting these translations. | |
translations | a dict mapping plural-form numbers to the translated string for that form. | |
origin | A RosettaTranslationOrigin . | |
share_with_other_side | When sharing this translation,
share it with the other TranslationSide as well. | |
lock_timestamp | Timestamp of the original translation state that this change is based on. |
This deactivates the message's current translation. The message becomes untranslated or, if it was diverged, reverts to its shared translation.
The previously current translation becomes visible as a new suggestion again, as do all suggestions that came after it.
Parameters | pofile | The POFile to make the change in. |
lock_timestamp | Timestamp of the original translation state that this change is based on. | |
share_with_other_side | Make the same change on the other translation side. |
pofile
to be untranslated.
If the current message is shared, this will also clear it in other translations that share the same message.
Parameters | pofile | The translation file that should have its current
translation for this POTMsgSet cleared. If the message is
shared, this may not be the only translation file that will
be affected. |
submitter | The person responsible for clearing the message. | |
origin | RosettaTranslationOrigin . | |
share_with_other_side | If the current message is also current on the other side (i.e. the Ubuntu side if working upstream, or vice versa) then should it be cleared there as well? | |
lock_timestamp | Timestamp of the original translation state that this change is based on. |
Messages that are likely to contain email addresses are shown only to logged-in users, and not to anonymous users.
Unique name for this POTMsgSet
for use in HTML element ids.
id
Parameters | suffix | an optional suffix to be appended. Must be suitable for use in HTML element ids. |
Parameters | plural_form_text | Unicode string representing the plural form we want to store or None to unset current plural form. |
Parameters | potemplate | IPOTemplate where the sequence number applies. |
Parameters | potemplate | IPOTemplate where the sequence number applies. |
sequence | The sequence number of this IPOTMsgSet in the given
IPOTemplate . |
Sets a fixed dummy string as the current translation, if this is a translation credits message, so that these get counted as 'translated', too. Credits messages that already have a translation, imported messages and normal messages are left untouched. :param pofile: the POFile to set this translation in.