[FIX] web: fix incorrect translation of template literals

closes odoo/odoo#68159

X-original-commit: 34549b6e0f99e09551533af5756a991d8e47812c
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
Samuel Degueldre
2021-03-19 16:52:50 +00:00
parent fb4cf35368
commit ec2174f683
2 changed files with 15 additions and 10 deletions
+2 -5
View File
@@ -90,8 +90,7 @@ msgstr ""
#: code:addons/web/static/src/js/views/basic/basic_model.js:0
#, python-format
msgid ""
"'${referenceFieldName}' is unsynchronized\n"
" with '${modelFieldName}'."
"'%s' is unsynchronized with '%s'."
msgstr ""
#. module: web
@@ -2076,9 +2075,7 @@ msgstr ""
#: code:addons/web/static/src/js/views/basic/basic_model.js:0
#, python-format
msgid ""
"If you change ${modelFieldName} or\n"
" ${referenceFieldName}, the synchronization\n"
" will be reapplied and the data will be modified."
"If you change %s or %s, the synchronization will be reapplied and the data will be modified."
msgstr ""
#. module: web
@@ -2434,11 +2434,19 @@ var BasicModel = AbstractModel.extend({
const modelFieldName = record.fields[modelField].string;
const referenceFieldName = record.fields[fieldName].string;
this.do_warn(_t(`'${referenceFieldName}' is unsynchronized
with '${modelFieldName}'.`),
_t(`If you change ${modelFieldName} or
${referenceFieldName}, the synchronization
will be reapplied and the data will be modified.`), true);
this.do_warn(
_.str.sprintf(
_t(`'%s' is unsynchronized with ''.`),
referenceFieldName,
modelFieldName,
),
_.str.sprintf(
_t(`If you change %s or %s, the synchronization will be reapplied and the data will be modified.`),
modelFieldName,
referenceFieldName,
),
true,
);
return false;
}
return {