translate.convert.pot2po

Package translate :: Package convert :: Module pot2po |
[hide private]
[frames] | no frames]

# Module pot2po

source code

Convert template files (like .pot or template .xlf files) translation files, preserving existing translations.

See: http://translate.sourceforge.net/wiki/toolkit/pot2po for examples and usage instructions.

Functions | [hide private]
convertpot(input_file, output_file, template_file, tm=None, min_similarity=75, fuzzymatching=True, **kwargs) Main conversion function | source code
convert_stores(input_store, template_store, tm=None, min_similarity=75, fuzzymatching=True, **kwargs) Actual conversion function, works on stores not files, returns a properly initialized pretranslated output store, with structure based on input_store, metadata based on template_store, migrates old translations from template_store and pretranslating from tm | source code
_prepare_merge(input_store, output_store, template_store, **kwargs) Prepare stores & TM matchers before merging. | source code
_store_pre_merge(input_store, output_store, template_store, **kwargs) Initialize the new file with things like headers and metadata. | source code
_store_post_merge(input_store, output_store, template_store, **kwargs) Close file after merging all translations, used for adding statistics, obsolete messages and similar wrapup tasks. | source code
_unit_post_merge(input_unit, input_store, output_store, template_store, **kwargs) Handle any unit level cleanup and situations not handled by the merge() function. | source code
_prepare_merge_pofile(input_store, output_store, template_store) PO format specific template preparation logic. | source code
_unit_post_merge_pounit(input_unit, input_store, output_store, template_store) PO format specific plural string initializtion logic. | source code
_store_post_merge_pofile(input_store, output_store, template_store) PO format specific: adds newly obsoleted messages to end of store. | source code
_do_poheaders(input_store, output_store, template_store) Adds initialized PO headers to output store. | source code
main(argv=None) | source code

Imports: factory, match, multistring, pretranslate, poheader