summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authortbe-odoo <tbe@odoo.com>2018-01-12 11:30:18 +0100
committertbe-odoo <tbe@odoo.com>2018-01-12 12:05:56 +0100
commitd5e97eab8b2465c968f5d2abaaabf8c33641dee6 (patch)
treeda018792bfdab2de1423aa216e2b9630a8b80834 /addons/web/static/src/js
parentea8cf1b7a22fd59fdc15281d0536d8e6137c77df (diff)
[FIX] web: Kanban image not showing in some languages
- In some languages the kanban images are not displayed because of a bug in human_size method in JS. This method translates the Unit Size for data and strip with the string with a comma as separator. When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result. This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit. Resulting in a bug in the method 'kanban_image'. opw #804973 #804970 #804648
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/framework/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/framework/utils.js b/addons/web/static/src/js/framework/utils.js
index c1b9758b625..3e9bd87f8de 100644
--- a/addons/web/static/src/js/framework/utils.js
+++ b/addons/web/static/src/js/framework/utils.js
@@ -288,7 +288,7 @@ function human_size (size) {
size /= 1024;
++i;
}
- return size.toFixed(2) + ' ' + units[i];
+ return size.toFixed(2) + ' ' + units[i].trim();
}
/**