Skip to content

Commit

Permalink
[FIX] website_sale_checkout_skip_payment: translate payment message
Browse files Browse the repository at this point in the history
- The default option in the field isn't detected as term to translate.
- Also, in a multilingual site we should provide that message in each
  language.

TT50516
  • Loading branch information
chienandalu committed Aug 20, 2024
1 parent c6aa9e0 commit b9e08bb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions website_sale_checkout_skip_payment/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ msgstr "Contacto"
msgid "Message shown to the user when the purchase is finished"
msgstr "Mensaje mostrado al usuario cuando finaliza la compra"

#. module: website_sale_checkout_skip_payment
#. odoo-python
#: code:addons/website_sale_checkout_skip_payment/models/website.py:0
#, python-format
msgid "Our team will check your order and send you payment information soon."
msgstr "Nuestro equipo revisará su pedido y pronto le enviará información sobre el pago."

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Sale Checkout Skip Message"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ msgstr ""
msgid "Message shown to the user when the purchase is finished"
msgstr ""

#. module: website_sale_checkout_skip_payment
#. odoo-python
#: code:addons/website_sale_checkout_skip_payment/models/website.py:0
#, python-format
msgid "Our team will check your order and send you payment information soon."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Sale Checkout Skip Message"
Expand Down
7 changes: 5 additions & 2 deletions website_sale_checkout_skip_payment/models/website.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2017 Sergio Teruel <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models
from odoo import _, fields, models
from odoo.http import request


Expand All @@ -11,7 +11,10 @@ class Website(models.Model):
website_sale_checkout_skip_message = fields.Text(
string="Website Sale SKip Message",
required=True,
default="Our team will check your order and send you payment information soon.",
translate=True,
default=lambda s: _(
"Our team will check your order and send you payment information soon."
),
)
checkout_skip_payment = fields.Boolean(compute="_compute_checkout_skip_payment")

Expand Down

0 comments on commit b9e08bb

Please sign in to comment.