[IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations, removing the need for sprintf. closes odoo/odoo#123932 Related: odoo/enterprise#45370 Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { escape, sprintf } from "@web/core/utils/strings";
|
||||
import { escape } from "@web/core/utils/strings";
|
||||
import core from "@web/legacy/js/services/core";
|
||||
import Dialog from "@web/legacy/js/core/dialog";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
@@ -77,7 +77,7 @@
|
||||
const $checkedRadios = this.$('input[name="o_payment_radio"]:checked');
|
||||
if ($checkedRadios.length !== 1) { // Cannot find selected payment option, show dialog
|
||||
return new Dialog(null, {
|
||||
title: sprintf(_t("Error: %s"), title),
|
||||
title: _t("Error: %s", title),
|
||||
size: 'medium',
|
||||
$content: `<p>${escape(description) || ''}</p>`,
|
||||
buttons: [{text: _t("Ok"), close: true}]
|
||||
|
||||
Reference in New Issue
Block a user