From a6f66f8bcf3657d70ba850a17d8d6d436b048524 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Thu, 25 Jul 2019 13:03:48 +0000 Subject: [FIX] web: translatable size of binary fields Before this commit, the string containing all size units for binary fields was comma separated. The problem with this is that comma got also translated into the language's specific comma-like, whereas in this case it is obviously a technical separator which shouldn't be translated After this commit, we separate unit size with pipes (|), hoping that this character - is easy to find on any keyboard - has no language specific equivalent OPW 2041975 closes odoo/odoo#35183 Signed-off-by: Martin Trigaux (mat) --- addons/web/static/src/js/core/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/core/utils.js') diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js index e3911752aaa..bf312dfd905 100644 --- a/addons/web/static/src/js/core/utils.js +++ b/addons/web/static/src/js/core/utils.js @@ -351,7 +351,7 @@ var utils = { * @param {Number} size number of bytes */ human_size: function (size) { - var units = _t("Bytes,Kb,Mb,Gb,Tb,Pb,Eb,Zb,Yb").split(','); + var units = _t("Bytes|Kb|Mb|Gb|Tb|Pb|Eb|Zb|Yb").split('|'); var i = 0; while (size >= 1024) { size /= 1024; -- cgit v1.2.3