projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98e9a6a
)
Fix WCF.String.addThousandsSeparator()
author
Tim Düsterhus
<duesterhus@woltlab.com>
Thu, 4 May 2023 08:46:28 +0000
(10:46 +0200)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Thu, 4 May 2023 08:46:28 +0000
(10:46 +0200)
The previously used phrase is no longer available to the JavaScript. It would
also be inconsistent. Use `.toLocaleString()`.
Fxies #5471
wcfsetup/install/files/js/WCF.js
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/js/WCF.js
b/wcfsetup/install/files/js/WCF.js
index 3e69beab3b19f699c6fc65ef310596891baf0803..76539306aecfdacd530ac6ae996521f55f26cf28 100755
(executable)
--- a/
wcfsetup/install/files/js/WCF.js
+++ b/
wcfsetup/install/files/js/WCF.js
@@
-1936,7
+1936,7
@@
WCF.String = {
* @return string
*/
addThousandsSeparator: function(number) {
- return
String(number).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g, '$1' + WCF.Language.get('wcf.global.thousandsSeparator')
);
+ return
Number(number).toLocaleString(document.documentElement.lang
);
},
/**