Odoo Translation#

This module has a collection of tools that can be used to extract translations from Odoo. It needs a working instance of Odoo to be able to import/export translations out of Odoo.

It can do some of the translation file generation on its own but in order to prefill some already translated terms, it has to be able to load them into odoo first.

class odoo_tools.modules.translate.PoFileReader(source, options=None)[source]#

Iterate over po file to return Odoo translation entries

class odoo_tools.modules.translate.PoFileWriter(target, lang, pofile=None)[source]#

Iterate over po file to return Odoo translation entries

add_entries(entries)[source]#
add_entry(modules, tnrs, source, trad, comments=None)[source]#
generate_header()[source]#
generate_metadata()[source]#
merge(pofile)[source]#
write()[source]#
write_rows(rows)[source]#
odoo_tools.modules.translate.get_comments(entry)[source]#
odoo_tools.modules.translate.get_modules(entry)[source]#