model/model_terms translations: A transifex link if available is displayed after the language in the translation dialog to help translators to contribute their translations. The tooltip message for mouse hovering is 'Contribute' code translations: Setting -> Translations -> Application Terms -> Transifex Code Translations In order to reuse the list view and search bar, model transifex.code.translation is created to store all code translations. This model is 1. readonly 2. reloaded on demand/by cron(7 days) to avoid increasing the Odoo restart time 3. updated for new installed modules/languages while opening the list view 4. shared to all users without duplicated translations closes odoo/odoo#111685 X-original-commit: 7b30badb52e2a948c41f4340a01f6118818c6711 Signed-off-by: Raphael Collet <rco@odoo.com> Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
48 lines
2.1 KiB
XML
48 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="transifex_code_translation_tree_view" model="ir.ui.view">
|
|
<field name="name">transifex.code.translation.tree</field>
|
|
<field name="model">transifex.code.translation</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Transifex Code Translation" js_class="transifex_code_translation_tree">
|
|
<field name="source"/>
|
|
<field name="value"/>
|
|
<field name="module"/>
|
|
<field name="lang"/>
|
|
<field name="transifex_url"
|
|
widget="url"
|
|
text="Contribute"
|
|
string="Transifex" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="transifex_code_translation_view_search" model="ir.ui.view">
|
|
<field name="name">transifex.code.translation.view.search</field>
|
|
<field name="model">transifex.code.translation</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Code Translations">
|
|
<field name="module"/>
|
|
<field name="lang"/>
|
|
<field name="source"/>
|
|
<field name="value"/>
|
|
<separator/>
|
|
<filter string="Not Translated" name="not_translated" domain="[('value', '=', '')]"/>
|
|
<group string="Group By">
|
|
<filter string="Module" name="group_by_module" context="{'group_by': 'module'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_code_translations" model="ir.actions.server">
|
|
<field name="name">Transifex Code Translations</field>
|
|
<field name="model_id" ref="transifex.model_transifex_code_translation"/>
|
|
<field name="groups_id" eval="[(4, ref('base.group_system'))]"/>
|
|
<field name="state">code</field>
|
|
<field name="code">action = model._open_code_translations()</field>
|
|
</record>
|
|
<menuitem action="action_code_translations" id="menu_transifex_code_translations" parent="base.menu_translation_app"/>
|
|
|
|
</odoo>
|