From 52a7efbaf510d9f0a7371b989d1ed23d0bde187e Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 25 Feb 2021 10:14:44 +0100 Subject: [PATCH 1/9] [FIX] account: translate wizard line message X-original-commit: 2f3701d97568d965a7665bf7126032d3b7527ae4 --- addons/account/i18n/account.pot | 10 ++++++++-- addons/account/wizard/account_resequence.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index bf012d435f3..e6a2176f84b 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~14.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-18 14:28+0000\n" -"PO-Revision-Date: 2021-02-18 14:28+0000\n" +"POT-Creation-Date: 2021-02-25 09:15+0000\n" +"PO-Revision-Date: 2021-02-25 09:15+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -139,6 +139,12 @@ msgstr "" msgid ". You might want to put a higher number here." msgstr "" +#. module: account +#: code:addons/account/wizard/account_resequence.py:0 +#, python-format +msgid "... (%s other)" +msgstr "" + #. module: account #: model_terms:ir.ui.view,arch_db:account.view_move_form msgid "1 Payment" diff --git a/addons/account/wizard/account_resequence.py b/addons/account/wizard/account_resequence.py index 496ee75bb49..05649fa619a 100644 --- a/addons/account/wizard/account_resequence.py +++ b/addons/account/wizard/account_resequence.py @@ -60,7 +60,7 @@ class ReSequenceWizard(models.TransientModel): or (self.sequence_number_reset == 'year' and line['server-date'][0:4] != previous_line['server-date'][0:4])\ or (self.sequence_number_reset == 'month' and line['server-date'][0:7] != previous_line['server-date'][0:7]): if in_elipsis: - changeLines.append({'current_name': '... (%s other)' % str(in_elipsis), 'new_by_name': '...', 'new_by_date': '...', 'date': '...'}) + changeLines.append({'current_name': _('... (%s other)', in_elipsis), 'new_by_name': '...', 'new_by_date': '...', 'date': '...'}) in_elipsis = 0 changeLines.append(line) else: From 706ff8fbff097d02624ec0a4d7d294159195182b Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 25 Feb 2021 11:17:24 +0100 Subject: [PATCH 2/9] [FIX] account: translate selections X-original-commit: 4b6e933d5826830b24297355a9cea8a8615bc646 --- addons/account/i18n/account.pot | 22 +++++++++++++++++-- .../wizard/account_tour_upload_bill.py | 6 ++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index e6a2176f84b..5301627b843 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~14.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-25 09:15+0000\n" -"PO-Revision-Date: 2021-02-25 09:15+0000\n" +"POT-Creation-Date: 2021-02-25 10:15+0000\n" +"PO-Revision-Date: 2021-02-25 10:15+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -8207,6 +8207,12 @@ msgstr "" msgid "Options" msgstr "" +#. module: account +#: code:addons/account/wizard/account_tour_upload_bill.py:0 +#, python-format +msgid "Or send a bill to %s@%s" +msgstr "" + #. module: account #: model:ir.model.fields,field_description:account.field_account_resequence_wizard__ordering msgid "Ordering" @@ -12748,6 +12754,12 @@ msgstr "" msgid "Transfers" msgstr "" +#. module: account +#: code:addons/account/wizard/account_tour_upload_bill.py:0 +#, python-format +msgid "Try a sample vendor bill" +msgstr "" + #. module: account #: model:ir.model.fields,field_description:account.field_account_account__user_type_id #: model:ir.model.fields,field_description:account.field_account_account_template__user_type_id @@ -12947,6 +12959,12 @@ msgstr "" msgid "Upload" msgstr "" +#. module: account +#: code:addons/account/wizard/account_tour_upload_bill.py:0 +#, python-format +msgid "Upload your own bill" +msgstr "" + #. module: account #: model:ir.model.fields,field_description:account.field_account_chart_template__use_anglo_saxon msgid "Use Anglo-Saxon accounting" diff --git a/addons/account/wizard/account_tour_upload_bill.py b/addons/account/wizard/account_tour_upload_bill.py index ef0f9c08247..a4cdcbc99b4 100644 --- a/addons/account/wizard/account_tour_upload_bill.py +++ b/addons/account/wizard/account_tour_upload_bill.py @@ -28,9 +28,9 @@ class AccountTourUploadBill(models.TransientModel): journal_alias = self.env['account.journal'] \ .search([('type', '=', 'purchase'), ('company_id', '=', self.env.company.id)], limit=1) - return [('sample', 'Try a sample vendor bill'), - ('upload', 'Upload your own bill'), - ('email', 'Or send a bill to %s@%s' % (journal_alias.alias_name, journal_alias.alias_domain))] + return [('sample', _('Try a sample vendor bill')), + ('upload', _('Upload your own bill')), + ('email', _('Or send a bill to %s@%s', journal_alias.alias_name, journal_alias.alias_domain))] def _compute_sample_bill_image(self): """ Retrieve sample bill with facturx to speed up onboarding """ From 9bed319507a7c7278695a3df5b8e1bd5e19cf8e2 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 25 Feb 2021 11:24:39 +0100 Subject: [PATCH 3/9] [FIX] website_mass_mailing: translate default toaster When creating a new mailing, it was always in English, even if English was not activated X-original-commit: f8308e72d9f158c17bafa3bb09cb2915ff8ba37a --- .../i18n/website_mass_mailing.pot | 13 ++++++++++--- addons/website_mass_mailing/models/mailing_list.py | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/addons/website_mass_mailing/i18n/website_mass_mailing.pot b/addons/website_mass_mailing/i18n/website_mass_mailing.pot index 95a364f84fa..ca9c200f081 100644 --- a/addons/website_mass_mailing/i18n/website_mass_mailing.pot +++ b/addons/website_mass_mailing/i18n/website_mass_mailing.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server saas~14.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-11-17 06:20+0000\n" -"PO-Revision-Date: 2020-11-17 06:20+0000\n" +"POT-Creation-Date: 2021-03-01 07:49+0000\n" +"PO-Revision-Date: 2021-03-01 07:49+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,6 +20,12 @@ msgstr "" msgid ", .o_newsletter_popup" msgstr "" +#. module: website_mass_mailing +#: code:addons/website_mass_mailing/models/mailing_list.py:0 +#, python-format +msgid "

Thanks for subscribing!

" +msgstr "" + #. module: website_mass_mailing #. openerp-web #: code:addons/website_mass_mailing/static/src/js/website_mass_mailing.editor.js:0 @@ -182,6 +188,7 @@ msgstr "" #. module: website_mass_mailing #: model:ir.model.fields,field_description:website_mass_mailing.field_mailing_list__toast_content +#: model_terms:ir.ui.view,arch_db:website_mass_mailing.mailing_list_view_form msgid "Toast Content" msgstr "" diff --git a/addons/website_mass_mailing/models/mailing_list.py b/addons/website_mass_mailing/models/mailing_list.py index 0857563a814..7317b4caecf 100644 --- a/addons/website_mass_mailing/models/mailing_list.py +++ b/addons/website_mass_mailing/models/mailing_list.py @@ -2,13 +2,14 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models +from odoo.tools.translate import _ class MailingList(models.Model): _inherit = 'mailing.list' def _default_toast_content(self): - return '

Thanks for subscribing!

' + return _('

Thanks for subscribing!

') website_popup_ids = fields.One2many('website.mass_mailing.popup', 'mailing_list_id', string="Website Popups") toast_content = fields.Html(default=_default_toast_content, translate=True) From 4a1c2e36071878c15ef1f88db4a63e95d016b764 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 25 Feb 2021 12:07:58 +0100 Subject: [PATCH 4/9] [FIX] web: translate "View ..." title And remove code content X-original-commit: 65cc90107d176e349bdedfebeb6f92d7312ef202 --- addons/web/i18n/web.pot | 18 +++++++++--------- .../src/js/control_panel/control_panel.js | 2 ++ addons/web/static/src/xml/base.xml | 5 +++-- addons/web/static/src/xml/colorpicker.xml | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/addons/web/i18n/web.pot b/addons/web/i18n/web.pot index ebea17a8d38..91292e83ed6 100644 --- a/addons/web/i18n/web.pot +++ b/addons/web/i18n/web.pot @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server saas~14.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-18 14:29+0000\n" -"PO-Revision-Date: 2021-02-18 14:29+0000\n" +"POT-Creation-Date: 2021-02-25 10:30+0000\n" +"PO-Revision-Date: 2021-02-25 10:30+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -4369,6 +4369,13 @@ msgstr "" msgid "Variation" msgstr "" +#. module: web +#. openerp-web +#: code:addons/web/static/src/xml/base.xml:0 +#, python-format +msgid "View %s" +msgstr "" + #. module: web #. openerp-web #: code:addons/web/static/src/xml/debug.xml:0 @@ -4952,13 +4959,6 @@ msgstr "" msgid "or" msgstr "" -#. module: web -#. openerp-web -#: code:addons/web/static/src/xml/colorpicker.xml:0 -#, python-format -msgid "p-0 text-center text-monospace bg-transparent text-white" -msgstr "" - #. module: web #. openerp-web #: code:addons/web/static/src/js/widgets/domain_selector.js:0 diff --git a/addons/web/static/src/js/control_panel/control_panel.js b/addons/web/static/src/js/control_panel/control_panel.js index 16cb905f683..0599c319332 100644 --- a/addons/web/static/src/js/control_panel/control_panel.js +++ b/addons/web/static/src/js/control_panel/control_panel.js @@ -123,6 +123,8 @@ odoo.define('web.ControlPanel', function (require) { }; this.fields = this._formatFields(this.props.fields); + + this.sprintf = _.str.sprintf; } mounted() { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a82dc9d9100..781eed08395 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -631,12 +631,13 @@ + View %s