diff --git a/src/js/popup-fenix.js b/src/js/popup-fenix.js index 1ca256c8a..95ee5cc55 100644 --- a/src/js/popup-fenix.js +++ b/src/js/popup-fenix.js @@ -154,16 +154,20 @@ const hashFromPopupData = function(reset) { const formatNumber = function(count) { if ( typeof count !== 'number' ) { return ''; } if ( count < 1e6 ) { return count.toLocaleString(); } + const mln = vAPI.i18n('M'); + if ( count < 1e7 && mln.length > 2 ) { // Maybe not worth abbreviating + return count.toLocaleString(); + } let unit; if ( count < 1e9 ) { count /= 1e6; - unit = 'M'; + unit = mln; } else { count /= 1e9; - unit = 'G'; + unit = vAPI.i18n('G'); } return count.toLocaleString(undefined, { maximumSignificantDigits: 4 }) + - `\u2009${vAPI.i18n(unit)}`; + `\u2009${unit}`; }; /******************************************************************************/