Part of lp.translations.utilities
Function | get_potmsgset_key | Get the tuple of identifying properties of a POTMsgSet. |
Function | merge_pofiletranslators | Merge POFileTranslator entries from one template into another. |
Function | merge_translationtemplateitems | Merge subordinate POTMsgSet into its representative POTMsgSet. |
Function | filter_clashes | Filter clashes for harmless clashes with an identical message. |
Function | sacrifice_flags | Drop current/imported flags if held by any of incumbents . |
Function | bequeathe_flags | Destroy source_message , leaving flags to target_message . |
Class | MessageSharingMerge | No class docstring; 1/3 methods documented |
Class | TransactionManager | Manage transactions for script runs. |
Class | TranslationMerger | Merge translations across a set of potemplates. |
Class | MergeExistingPackagings | Script to perform translation on existing packagings. |
A POTMsgSet is identified by its msgid, optional plural msgid, and optional context identifier.
This adds all of the subordinate's TranslationTemplateItems to the representative's set of TranslationTemplateItems.
Any duplicates are deleted, so after this, the subordinate will no longer have any TranslationTemplateItems.
Filter clashes for harmless clashes with an identical message. Takes the three forms of clashes a message can have in a context it's being merged into: * Another message that also has the is_current_ubuntu flag. * Another message that also has the is_current_upstream flag. * Another message with the same translations. If either of the first two clashes matches the third, that is not a real clash since it can be resolved by merging the message into the twin. This function returns the same tuple but with these "harmless" clashes eliminated.
incumbents
.Parameters | message | a TranslationMessage to drop flags on. |
incumbents | a sequence of reference messages. If any of these has either is_current_ubuntu or is_current_upstream set, that same flag will be dropped on message (if set). |
source_message
, leaving flags to target_message
.
If source_message
holds the is_current_ubuntu flag, and there are no
incumbents
that hold the same flag, then target_message
inherits
it. Similar for the is_current_upstream flag.