Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.
This repository was archived by the owner on May 28, 2024. It is now read-only.

When a msgid contains %(keyword)s, keyword should not be translated #6

@alexis-via

Description

@alexis-via

Thanks for this great tool !

It works well, but I have one problem, to use your lib in real-life PO files from Odoo/OCA modules. My PO file contains:

#: code:addons/l10n_fr_das2/models/l10n_fr_das2.py:0
msgid "Company '%(company)s' is configured in country '%(country)s'."
msgstr ""

When I run:

python -m polyglot translate --from EN --to FR -s filename.po

I get the following result:

#: code:addons/l10n_fr_das2/models/l10n_fr_das2.py:0
msgid "Company '%(company)s' is configured in country '%(country)s'."
msgstr "L'entreprise \"%(entreprise)s\" est configurée dans le pays \"%(pays)s\"."

The keywords 'company' and 'country' should not be translated!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions