Skip to content

Commit

Permalink
[IMP] Add translation function in column names to be able to use it i…
Browse files Browse the repository at this point in the history
…n different languages
  • Loading branch information
unaiberis committed Jul 15, 2024
1 parent f03a43a commit 15adac8
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 15 deletions.
73 changes: 70 additions & 3 deletions ir_module_compare_wizard/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-21 11:55+0000\n"
"PO-Revision-Date: 2024-03-21 11:55+0000\n"
"POT-Creation-Date: 2024-07-15 08:33+0000\n"
"PO-Revision-Date: 2024-07-15 08:33+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -102,7 +102,10 @@ msgid "Attachment Count"
msgstr "Nº de archivos adjuntos"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_author
#, python-format
msgid "Author"
msgstr "Autor"

Expand Down Expand Up @@ -286,6 +289,13 @@ msgstr "Líneas importadas"
msgid "Install"
msgstr "Instalar"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Install Module"
msgstr "Instalar Módulo"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__message_is_follower
msgid "Is Follower"
Expand All @@ -310,10 +320,20 @@ msgid "Last Updated on"
msgstr "Última actualización el"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_last_version
#, python-format
msgid "Last Version"
msgstr "Última versión"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Latest Version"
msgstr "Última versión"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__import_line_ids
msgid "Lines to Import"
Expand Down Expand Up @@ -348,21 +368,42 @@ msgstr "Migrar"
#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Migrate Module"
msgstr "Migrar Módulo"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Module %(module_name)s not installable"
msgstr "Modulo %(module_name)s no instalable"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Module Author Generic"
msgstr "Autor Genérico del Módulo"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__my_activity_date_deadline
msgid "My Activity Deadline"
msgstr "Mi fecha límite de actividad"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__name
#, python-format
msgid "Name"
msgstr "Nombre"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__activity_calendar_event_id
msgid "Next Activity Calendar Event"
msgstr "Siguiente Actividad de Evento de Calendario"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__activity_date_deadline
msgid "Next Activity Deadline"
Expand All @@ -381,13 +422,15 @@ msgstr "Siguiente tipo de actividad"
#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "No module %(module_name)s found."
msgstr "No se ha encontrado el modulo %(module_name)s."

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_notes
#, python-format
msgid "Notes"
msgstr "Notas"

Expand All @@ -411,13 +454,21 @@ msgstr "Número de mensajes que requieren una acción"
msgid "Number of messages with delivery error"
msgstr "Número de mensajes con error de envío"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_path
msgid "Path"
msgstr ""

#. module: ir_module_compare_wizard
#: model_terms:ir.ui.view,arch_db:ir_module_compare_wizard.ir_module_import_view_search
msgid "Pending"
msgstr "Pendiente"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__priority
#, python-format
msgid "Priority"
msgstr "Prioridad"

Expand Down Expand Up @@ -463,7 +514,10 @@ msgstr ""
"Planificada: futuras actividades."

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_technical_name
#, python-format
msgid "Technical Name"
msgstr "Nombre técnico"

Expand Down Expand Up @@ -491,10 +545,23 @@ msgid "Validate"
msgstr "Validar"

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_website
#, python-format
msgid "Website"
msgstr "Sitio web"

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__website_message_ids
msgid "Website Messages"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,help:ir_module_compare_wizard.field_ir_module_import__website_message_ids
msgid "Website communication history"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model,name:ir_module_compare_wizard.model_ir_module_import_line
msgid "Wizard lines to import module lines"
Expand Down
73 changes: 70 additions & 3 deletions ir_module_compare_wizard/i18n/ir_module_compare_wizard.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-21 11:55+0000\n"
"PO-Revision-Date: 2024-03-21 11:55+0000\n"
"POT-Creation-Date: 2024-07-15 08:32+0000\n"
"PO-Revision-Date: 2024-07-15 08:32+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -102,7 +102,10 @@ msgid "Attachment Count"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_author
#, python-format
msgid "Author"
msgstr ""

Expand Down Expand Up @@ -286,6 +289,13 @@ msgstr ""
msgid "Install"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Install Module"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__message_is_follower
msgid "Is Follower"
Expand All @@ -310,10 +320,20 @@ msgid "Last Updated on"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_last_version
#, python-format
msgid "Last Version"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Latest Version"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__import_line_ids
msgid "Lines to Import"
Expand Down Expand Up @@ -348,21 +368,42 @@ msgstr ""
#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Migrate Module"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Module %(module_name)s not installable"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "Module Author Generic"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__my_activity_date_deadline
msgid "My Activity Deadline"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__name
#, python-format
msgid "Name"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__activity_calendar_event_id
msgid "Next Activity Calendar Event"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__activity_date_deadline
msgid "Next Activity Deadline"
Expand All @@ -381,13 +422,15 @@ msgstr ""
#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#, python-format
msgid "No module %(module_name)s found."
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_notes
#, python-format
msgid "Notes"
msgstr ""

Expand All @@ -411,13 +454,21 @@ msgstr ""
msgid "Number of messages with delivery error"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_path
msgid "Path"
msgstr ""

#. module: ir_module_compare_wizard
#: model_terms:ir.ui.view,arch_db:ir_module_compare_wizard.ir_module_import_view_search
msgid "Pending"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__priority
#, python-format
msgid "Priority"
msgstr ""

Expand Down Expand Up @@ -459,7 +510,10 @@ msgid ""
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_technical_name
#, python-format
msgid "Technical Name"
msgstr ""

Expand Down Expand Up @@ -487,10 +541,23 @@ msgid "Validate"
msgstr ""

#. module: ir_module_compare_wizard
#. odoo-python
#: code:addons/ir_module_compare_wizard/models/ir_module_compare.py:0
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import_line__module_website
#, python-format
msgid "Website"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,field_description:ir_module_compare_wizard.field_ir_module_import__website_message_ids
msgid "Website Messages"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model.fields,help:ir_module_compare_wizard.field_ir_module_import__website_message_ids
msgid "Website communication history"
msgstr ""

#. module: ir_module_compare_wizard
#: model:ir.model,name:ir_module_compare_wizard.model_ir_module_import_line
msgid "Wizard lines to import module lines"
Expand Down
18 changes: 9 additions & 9 deletions ir_module_compare_wizard/models/ir_module_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ def _get_line_values(self, row_values, datemode=False):
self.ensure_one()
values = super()._get_line_values(row_values, datemode=datemode)
if row_values:
module_technical_name = row_values.get("Name", "")
module_technical_name = row_values.get(_("Name"), row_values.get("Name", ""), _("Technical Name"), row_values.get("Technical Name", ""))
if not module_technical_name:
return {}
module_last_version = row_values.get("Last Version", "")
module_website = row_values.get("Website", "")
module_author = row_values.get("Author", "")
module_notes = row_values.get("Notes", "")
module_author_generic = row_values.get("Module Author Generic", "")
priority = row_values.get("Priority", 0)
migrate_module = row_values.get("Migrate Module", True)
install_module = row_values.get("Install Module", True)
module_last_version = row_values.get(_("Last Version"), row_values.get("Last Version", ""), _("Latest Version"), row_values.get("Latest Version", ""))
module_website = row_values.get(_("Website"), row_values.get("Website", ""))
module_author = row_values.get(_("Author"), row_values.get("Author", ""))
module_notes = row_values.get(_("Notes"), row_values.get("Notes", ""))
module_author_generic = row_values.get(_("Module Author Generic"), row_values.get("Module Author Generic", ""))
priority = row_values.get(_("Priority"), row_values.get("Priority", 0))
migrate_module = row_values.get(_("Migrate Module"), row_values.get("Migrate Module", True))
install_module = row_values.get(_("Install Module"), row_values.get("Install Module", True))
log_info = ""
values.update(
{
Expand Down

0 comments on commit 15adac8

Please sign in to comment.