summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authortrue-datura <grrrr@protonmail.com>2018-03-07 17:55:23 +0200
committerAlexandre Kühn <aku@odoo.com>2018-03-08 14:29:36 +0100
commit67f67b512477d7c87e47076468f7dadb144e1da8 (patch)
tree2c52a1cf98a69bbcd4caedcf8335e3ca4c828904 /addons/web/static/src
parent6faf7784e6f3c45dd6fd30b7183336b8e5838a3f (diff)
[FIX] web: 'image_small' field not displayed for non-latin translations
Before this commit, images in kanban view of the Contact app were not displayed on non-latin languages, such as Russian. This was caused by the is_bin_size helper that wrongly assumes that a certain string is not a binary size, although it is (e.g. 64.2 Кб). This commit fixes the issue by including such strings as valid binary sizes. Bug found and fixed by @true-datura Test by @alexkuhn closes #23526 closes #22519
Diffstat (limited to 'addons/web/static/src')
-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 496754aedea..99240870c18 100644
--- a/addons/web/static/src/js/core/utils.js
+++ b/addons/web/static/src/js/core/utils.js
@@ -228,7 +228,7 @@ var utils = {
* @returns {boolean}
*/
is_bin_size: function (v) {
- return (/^\d+(\.\d*)? \w+$/).test(v);
+ return (/^\d+(\.\d*)? [^0-9]+$/).test(v);
},
/**
* @param {any} node