]> git.joonet.de Git - adminer.git/commitdiff
Translate thousands separator in JS
authorJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 13:46:50 +0000 (14:46 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 13:47:43 +0000 (14:47 +0100)
adminer/include/design.inc.php
adminer/static/functions.js

index 28b159c6b11c392f2e1e3d9b76171c2cad78deaa..ac09ba782ef118461ec8288660f21cab54d61236 100644 (file)
@@ -58,6 +58,7 @@ mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
        ?>});
 document.body.className = document.body.className.replace(/ nojs/, ' js');
 var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
+var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
 </script>
 
 <div id="help" class="jush-<?php echo $jush; ?> jsonly hidden"></div>
index 4549ec6ad4fde37d2846bc9c5028796179319f6b..3dde40e406f4e62d867838e21f5cf41656e4f0d2 100644 (file)
@@ -172,9 +172,10 @@ function trCheck(el) {
 /** Fill number of selected items
 * @param string
 * @param string
+* @uses thousandsSeparator
 */
 function selectCount(id, count) {
-       setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')'));
+       setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, thousandsSeparator) + ')'));
        var el = qs('#' + id);
        if (el) {
                var inputs = qsa('input', el.parentNode.parentNode);
@@ -580,6 +581,7 @@ function fieldChange() {
 * @param [string]
 * @param [string]
 * @return XMLHttpRequest or false in case of an error
+* @uses offlineMessage
 */
 function ajax(url, callback, data, message) {
        var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));