summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2021-02-25 12:07:58 +0100
committerMartin Trigaux <mat@odoo.com>2021-02-25 15:44:43 +0100
commitd54b707efd63cb3dd4b5080d60672932bfb5fe94 (patch)
tree740dcbd0943f5d13264d3eb8c33745dd72679c5a /addons/web/static
parent4c1c1e480c2f577fc1919aec53c51cef48b6bf4d (diff)
[FIX] web: translate "View ..." title
And remove code content
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/control_panel/control_panel.js2
-rw-r--r--addons/web/static/src/xml/base.xml5
-rw-r--r--addons/web/static/src/xml/colorpicker.xml2
3 files changed, 6 insertions, 3 deletions
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 aca28bc0eb2..3841541e3fc 100644
--- a/addons/web/static/src/js/control_panel/control_panel.js
+++ b/addons/web/static/src/js/control_panel/control_panel.js
@@ -124,6 +124,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 c52c7e0ac60..949c6926ebf 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -631,12 +631,13 @@
</t>
<t t-name="web.ViewSwitcherButton" owl="1">
+ <t t-set="buttonLabel">View %s</t>
<button type="button"
t-att-accesskey="view.accessKey"
t-attf-class="btn btn-secondary fa fa-lg o_switch_view o_{{ view.type }} {{ view.icon }}"
t-att-class="{ active: env.view.type === view.type }"
- t-attf-aria-label="View {{ view.type }}"
- t-attf-title="View {{ view.type }}"
+ t-att-aria-label="sprintf(buttonLabel.toString(), view.type)"
+ t-att-title="sprintf(buttonLabel.toString(), view.type)"
data-toggle="tooltip"
tabindex="-1"
t-on-click="trigger('switch-view', { view_type: view.type })"
diff --git a/addons/web/static/src/xml/colorpicker.xml b/addons/web/static/src/xml/colorpicker.xml
index 09d39f30f58..1aaf6718249 100644
--- a/addons/web/static/src/xml/colorpicker.xml
+++ b/addons/web/static/src/xml/colorpicker.xml
@@ -16,7 +16,7 @@
</div>
<div t-if="widget.options.colorPreview" class="o_color_preview mb-1 w-100 p-2"/>
<div class="o_color_picker_inputs d-flex justify-content-between mb-2">
- <t t-set="input_classes">p-0 text-center text-monospace bg-transparent text-white</t>
+ <t t-set="input_classes" t-value="'p-0 text-center text-monospace bg-transparent text-white'" />
<div class="o_hex_div bg-black-50 px-1 d-flex align-items-baseline">
<input type="text" t-attf-class="o_hex_input {{input_classes}}" data-color-method="hex" size="1"/>