Browse Source

[I18N][IMP] Mass editing - translate actions

pull/1273/head
Quentin Dupont 7 years ago
committed by Sylvain LE GAL
parent
commit
cfbabd1309
  1. 26
      mass_editing/i18n/fr.po
  2. 26
      mass_editing/wizard/mass_editing_wizard.py

26
mass_editing/i18n/fr.po

@ -26,7 +26,9 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: mass_editing
#: code:addons/mass_editing/wizard/mass_editing_wizard.py:36
#: view:mass.object:mass_editing.view_mass_object_form
#, python-format
msgid "Add"
msgstr "Ajouter"
@ -35,6 +37,18 @@ msgstr "Ajouter"
msgid "Advanced"
msgstr "Avancées"
#. module: mass_editing
#: code:addons/mass_editing/wizard/mass_editing_wizard.py:179
#, python-format
msgid "Apply"
msgstr "Appliquer"
#. module: mass_editing
#: code:addons/mass_editing/wizard/mass_editing_wizard.py:184
#, python-format
msgid "Close"
msgstr "Fermer"
#. module: mass_editing
#: field:mass.editing.wizard,create_uid:0 field:mass.object,create_uid:0
msgid "Created by"
@ -131,7 +145,9 @@ msgid "Object"
msgstr "Objet"
#. module: mass_editing
#: code:addons/mass_editing/wizard/mass_editing_wizard.py:37
#: view:mass.object:mass_editing.view_mass_object_form
#, python-format
msgid "Remove"
msgstr "Supprimer"
@ -140,16 +156,22 @@ msgstr "Supprimer"
msgid "Remove the contextual action to use this template on related documents"
msgstr "Supprimer l'action contextuelle pour utiliser ce modèle sur les documents liés"
#. module: mass_editing
#: code:addons/mass_editing/wizard/mass_editing_wizard.py:35
#, python-format
msgid "Set"
msgstr "Choisir"
#. module: mass_editing
#: field:mass.object,ref_ir_act_window:0
msgid "Sidebar Action"
msgstr ""
msgstr "Action sur la barre latérale"
#. module: mass_editing
#: view:mass.object:mass_editing.view_mass_object_form
#: field:mass.object,ref_ir_value:0
msgid "Sidebar Button"
msgstr ""
msgstr "Bouton sur la barre latérale"
#. module: mass_editing
#: help:mass.object,ref_ir_act_window:0

26
mass_editing/wizard/mass_editing_wizard.py

@ -22,6 +22,7 @@
from openerp.osv import orm
import openerp.tools as tools
from openerp.tools.translate import _
from lxml import etree
@ -31,6 +32,9 @@ class MassEditingWizard(orm.TransientModel):
def fields_view_get(
self, cr, uid, view_id=None, view_type='form', context=None,
toolbar=False, submenu=False):
s_set = _("Set")
s_add = _("Add")
s_remove = _("Remove")
result = super(MassEditingWizard, self).fields_view_get(
cr, uid, view_id, view_type, context, toolbar, submenu)
if context.get('mass_editing_object'):
@ -54,8 +58,8 @@ class MassEditingWizard(orm.TransientModel):
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [
('set', 'Set'), ('remove_m2m', 'Remove'),
('add', 'Add')]}
('add', s_add), ('set', s_set),
('remove_m2m', s_remove)]}
xml_group = etree.SubElement(xml_group, 'group', {
'colspan': '4'})
etree.SubElement(xml_group, 'separator', {
@ -73,7 +77,7 @@ class MassEditingWizard(orm.TransientModel):
all_fields["selection__" + field.name] = {
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [('set', 'Set'), ('remove', 'Remove')]}
'selection': [('set', s_set), ('remove', s_remove)]}
all_fields[field.name] = {
'type': field.ttype, 'string': field.field_description,
'relation': field.relation}
@ -88,7 +92,7 @@ class MassEditingWizard(orm.TransientModel):
all_fields["selection__" + field.name] = {
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [('set', 'Set'), ('remove', 'Remove')]}
'selection': [('set', s_set), ('remove', s_remove)]}
all_fields[field.name] = {
'type': field.ttype, 'string': field.field_description,
'relation': field.relation}
@ -103,7 +107,7 @@ class MassEditingWizard(orm.TransientModel):
all_fields["selection__" + field.name] = {
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [('set', 'Set'), ('remove', 'Remove')]}
'selection': [('set', s_set), ('remove', s_remove)]}
all_fields[field.name] = {
'type': field.ttype, 'string': field.field_description,
'size': field.size or 256}
@ -121,7 +125,7 @@ class MassEditingWizard(orm.TransientModel):
all_fields["selection__" + field.name] = {
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [('set', 'Set'), ('remove', 'Remove')]}
'selection': [('set', s_set), ('remove', s_remove)]}
etree.SubElement(xml_group, 'field', {
'name': "selection__" + field.name, 'colspan': '2'})
etree.SubElement(xml_group, 'field', {
@ -139,7 +143,7 @@ class MassEditingWizard(orm.TransientModel):
all_fields["selection__" + field.name] = {
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [('set', 'Set'), ('remove', 'Remove')]}
'selection': [('set', s_set), ('remove', s_remove)]}
if field.ttype == 'text':
xml_group = etree.SubElement(xml_group, 'group', {
'colspan': '6'})
@ -159,7 +163,7 @@ class MassEditingWizard(orm.TransientModel):
'type': 'selection',
'string': field_info[field.name]['string'],
'selection': [(
'set', 'Set'), ('remove', 'Remove')]}
'set', s_set), ('remove', s_remove)]}
etree.SubElement(xml_group, 'field', {
'name': "selection__" + field.name,
'colspan': '2', })
@ -172,12 +176,14 @@ class MassEditingWizard(orm.TransientModel):
etree.SubElement(
xml_form, 'separator', {'string': '', 'colspan': '4'})
xml_group3 = etree.SubElement(xml_form, 'footer', {})
s_apply = _("Apply")
etree.SubElement(xml_group3, 'button', {
'string': 'Apply', 'icon': "gtk-execute",
'string': s_apply, 'icon': "gtk-execute",
'type': 'object', 'name': "action_apply",
'class': "oe_highlight"})
s_close = _("Close")
etree.SubElement(xml_group3, 'button', {
'string': 'Close', 'icon': "gtk-close", 'special': 'cancel'})
'string': s_close, 'icon': "gtk-close", 'special': 'cancel'})
root = xml_form.getroottree()
result['arch'] = etree.tostring(root)
result['fields'] = all_fields

Loading…
Cancel
Save