Skip to content
Snippets Groups Projects
Commit 24d5c789 authored by nounoubensebia's avatar nounoubensebia
Browse files

[IMP] mail_plugin, crm_mail_plugin: add translation support for email plugins

In mail_plugin module, add a method which returns translatable modules,
this method will be overridden in the other modules to add their module names.

Translations are prepared via the _prepare_translations method which uses
the get_translations_for_webclient method, this way we can easily fetch
translations without having to write python code.

We also add xml files in "static/", these files contain terms to be translated,
for each plugin we create a separate xml file so that we can easily update each
plugin separately.

This implementation will allow having translations handled by Odoo, which has
several advantages:
- existing system, nothing to develop
- it will use transifex and the terms will be translated by the community
- forces that mail_client implementations to have the same logic (consistency)
- compared to other solutions which rely on python code to return translations,
  this solution is more robust as it avoids having to type the string to
  translate twice

Task-2480075

closes odoo/odoo#69118

Ent-pr: https://github.com/odoo/enterprise/pull/17626
Plugin-pr: https://github.com/odoo/mail-client-extensions/pull/6


Related: odoo/enterprise#17626
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent ffe768f2
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment