summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-07-25 13:03:48 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2019-07-25 13:03:48 +0000
commita6f66f8bcf3657d70ba850a17d8d6d436b048524 (patch)
tree1a126c935445c3ddfb332c14c54b219ec7600341 /addons/web/static
parent3d397f208a69566eca3d64856700a0ab51461311 (diff)
[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) <mat@odoo.com>
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/core/utils.js2
1 files changed, 1 insertions, 1 deletions
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;