[FIX] cli: support export of pot files
The export_translation method supports the "new language" option but it was not possible if giving a .pot file. closes odoo/odoo#85141 X-original-commit: 93e23025252784f39f37a7ffd109425ae56b1d36 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -99,6 +99,9 @@ def export_translation():
|
||||
config["translate_out"])
|
||||
|
||||
fileformat = os.path.splitext(config["translate_out"])[-1][1:].lower()
|
||||
# .pot is the same fileformat as .po
|
||||
if fileformat == "pot":
|
||||
fileformat = "po"
|
||||
|
||||
with open(config["translate_out"], "wb") as buf:
|
||||
registry = odoo.modules.registry.Registry.new(dbname)
|
||||
|
||||
Reference in New Issue
Block a user