From 3c7e56c4b8009c8026d98a6156d814d351cd700d Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 10 Apr 2010 17:40:58 +0000 Subject: [PATCH] MDL-22050 removing moodle/langconfig duplicates AMOS BEGIN MOV [decsep,core],[decsep,core_langconfig] MOV [listsep,core],[listsep,core_langconfig] MOV [thousandsep,core],[thousandsep,core_langconfig] AMOS END --- admin/uploaduser_form.php | 2 +- admin/user/user_bulk_download.php | 2 +- lib/mathslib.php | 8 ++++---- lib/moodlelib.php | 4 ++-- mod/data/export_form.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/uploaduser_form.php b/admin/uploaduser_form.php index 14c40abc3d9fa..eef727b96e8b9 100644 --- a/admin/uploaduser_form.php +++ b/admin/uploaduser_form.php @@ -18,7 +18,7 @@ function definition (){ $mform->addElement('select', 'delimiter_name', get_string('csvdelimiter', 'admin'), $choices); if (array_key_exists('cfg', $choices)) { $mform->setDefault('delimiter_name', 'cfg'); - } else if (get_string('listsep') == ';') { + } else if (get_string('listsep', 'langconfig') == ';') { $mform->setDefault('delimiter_name', 'semicolon'); } else { $mform->setDefault('delimiter_name', 'comma'); diff --git a/admin/user/user_bulk_download.php b/admin/user/user_bulk_download.php index 4115454195c48..a1d16a581ace3 100755 --- a/admin/user/user_bulk_download.php +++ b/admin/user/user_bulk_download.php @@ -157,7 +157,7 @@ function user_download_csv($fields) { header("Cache-Control: must-revalidate,post-check=0,pre-check=0"); header("Pragma: public"); - $delimiter = get_string('listsep'); + $delimiter = get_string('listsep', 'langconfig'); $encdelim = '&#'.ord($delimiter); $row = array(); diff --git a/lib/mathslib.php b/lib/mathslib.php index 817535b0e92e1..7f61f8d560897 100644 --- a/lib/mathslib.php +++ b/lib/mathslib.php @@ -114,8 +114,8 @@ function get_error() { */ function localize($formula) { $formula = str_replace('.', '$', $formula); // temp placeholder - $formula = str_replace(',', get_string('listsep'), $formula); - $formula = str_replace('$', get_string('decsep'), $formula); + $formula = str_replace(',', get_string('listsep', 'langconfig'), $formula); + $formula = str_replace('$', get_string('decsep', 'langconfig'), $formula); return $formula; } @@ -125,8 +125,8 @@ function localize($formula) { * @return string */ function unlocalize($formula) { - $formula = str_replace(get_string('decsep'), '$', $formula); - $formula = str_replace(get_string('listsep'), ',', $formula); + $formula = str_replace(get_string('decsep', 'langconfig'), '$', $formula); + $formula = str_replace(get_string('listsep', 'langconfig'), ',', $formula); $formula = str_replace('$', '.', $formula); // temp placeholder return $formula; } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index e90e5d035c12d..ccdbe48432297 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -8212,7 +8212,7 @@ function format_float($float, $decimalpoints=1, $localized=true) { return ''; } if ($localized) { - return number_format($float, $decimalpoints, get_string('decsep'), ''); + return number_format($float, $decimalpoints, get_string('decsep', 'langconfig'), ''); } else { return number_format($float, $decimalpoints, '.', ''); } @@ -8234,7 +8234,7 @@ function unformat_float($locale_float) { $locale_float = str_replace(' ', '', $locale_float); // no spaces - those might be used as thousand separators - return (float)str_replace(get_string('decsep'), '.', $locale_float); + return (float)str_replace(get_string('decsep', 'langconfig'), '.', $locale_float); } /** diff --git a/mod/data/export_form.php b/mod/data/export_form.php index 9c27e41891895..54fa90a42eaf9 100644 --- a/mod/data/export_form.php +++ b/mod/data/export_form.php @@ -41,7 +41,7 @@ function definition() { $mform->setDefault('exporttype', 'csv'); if (array_key_exists('cfg', $choices)) { $mform->setDefault('delimiter_name', 'cfg'); - } else if (get_string('listsep') == ';') { + } else if (get_string('listsep', 'langconfig') == ';') { $mform->setDefault('delimiter_name', 'semicolon'); } else { $mform->setDefault('delimiter_name', 'comma');