From 67a735a143bf8f836d0aeb14fdb44199414f6dd7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 08 Feb 2011 09:00:46 -0500
Subject: [PATCH] Moved number formatting information (number_format_* settings) from $conf array to the language files.
---
interface/lib/lang/fr.lng | 3 +
interface/lib/lang/sk.lng | 3 +
install/tpl/config.inc.php.master | 6 ---
interface/lib/lang/ja.lng | 3 +
interface/lib/lang/pt.lng | 3 +
interface/lib/lang/id.lng | 3 +
interface/lib/lang/ar.lng | 3 +
interface/lib/lang/ru.lng | 3 +
interface/lib/lang/de.lng | 3 +
interface/lib/lang/hu.lng | 3 +
interface/lib/lang/it.lng | 3 +
interface/lib/classes/listform.inc.php | 4 +-
interface/lib/lang/tr.lng | 3 +
interface/lib/lang/nl.lng | 3 +
interface/lib/lang/ro.lng | 3 +
interface/lib/classes/tform.inc.php | 4 +-
interface/lib/lang/bg.lng | 3 +
interface/lib/config.inc.php | 6 ---
interface/lib/lang/se.lng | 3 +
interface/lib/lang/pl.lng | 3 +
interface/lib/lang/en.lng | 3 +
interface/lib/lang/br.lng | 3 +
interface/lib/lang/cz.lng | 3 +
interface/lib/lang/es.lng | 3 +
interface/lib/lang/fi.lng | 3 +
25 files changed, 67 insertions(+), 16 deletions(-)
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 86eb65c..b0af846 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -143,15 +143,9 @@
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
$conf['logo'] = 'themes/default/images/ispc_logo.png';
-
//** Default Language
$conf['language'] = '{language}';
$conf['debug_language'] = false;
-
-//** Currency format
-$conf['number_format_decimals'] = 2;
-$conf['number_format_dec_point'] = ',';
-$conf['number_format_thousands_sep'] = '';
//** Misc.
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index 664f9e5..1ed9c23 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -277,7 +277,7 @@
public function decode($record)
{
- global $conf;
+ global $conf, $app;
if(is_array($record)) {
foreach($this->listDef['item'] as $field){
$key = $field['field'];
@@ -329,7 +329,7 @@
break;
case 'CURRENCY':
- $record[$key] = number_format($record[$key], $conf['number_format_decimals'], $conf['number_format_dec_point'], $conf['number_format_thousands_sep']);
+ $record[$key] = number_format($record[$key], (int)$app->lng('number_format_decimals'), $app->lng('number_format_dec_point'), $app->lng('number_format_thousands_sep'));
break;
default:
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index a164e83..487f3da 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -163,7 +163,7 @@
* @return record
*/
function decode($record,$tab) {
- global $conf;
+ global $conf, $app;
if(!is_array($this->formDef['tabs'][$tab])) $app->error("Tab does not exist or the tab is empty (TAB: $tab).");
$new_record = '';
if(is_array($record)) {
@@ -199,7 +199,7 @@
break;
case 'CURRENCY':
- $new_record[$key] = number_format((double)$record[$key], $conf['number_format_decimals'], $conf['number_format_dec_point'], $conf['number_format_thousands_sep']);
+ $new_record[$key] = number_format((double)$record[$key], (int)$app->lng('number_format_decimals'), $app->lng('number_format_dec_point'), $app->lng('number_format_thousands_sep'));
break;
default:
diff --git a/interface/lib/config.inc.php b/interface/lib/config.inc.php
index b601a87..b6a1130 100644
--- a/interface/lib/config.inc.php
+++ b/interface/lib/config.inc.php
@@ -133,12 +133,6 @@
$conf['language'] = 'en';
$conf['debug_language'] = false;
-//** Currency formatting
-$conf['number_format_decimals'] = 2;
-$conf['number_format_dec_point'] = ',';
-$conf['number_format_thousands_sep'] = '';
-
-
//** Misc.
$conf['interface_logout_url'] = ''; // example: http://www.domain.tld/
diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng
index 9c19d9c..54775bd 100644
--- a/interface/lib/lang/ar.lng
+++ b/interface/lib/lang/ar.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = '��� ����� ����� ����������.';
$wb['302'] = '������ ��� �����.';
$wb['1001'] = '�� ���� ���� �������� ������ ������ �� ����� �������!';
diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng
index dcf0294..eeda2e1 100644
--- a/interface/lib/lang/bg.lng
+++ b/interface/lib/lang/bg.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Този модул не е разрешен за текущия потреител.';
$wb['302'] = 'Невалиден модул.';
$wb['1001'] = 'Потребителското име и паролата не могат да бъдат празни!';
diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng
index a78dd75..b37f083 100644
--- a/interface/lib/lang/br.lng
+++ b/interface/lib/lang/br.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd/m/Y H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Módulo não permitido para o usuário corrente.';
$wb['302'] = 'Módulo Inválido';
$wb['1001'] = 'Nome de usuário ou senha em branco!';
diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng
index cd9b8ab..3d00f7f 100644
--- a/interface/lib/lang/cz.lng
+++ b/interface/lib/lang/cz.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-d-m H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modul není povolen pro současného uživatele.';
$wb['302'] = 'Neplatný modul.';
$wb['1001'] = 'Uživatelské jméno a heslo nemohou být prázdné !';
diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng
index d210146..df64152 100644
--- a/interface/lib/lang/de.lng
+++ b/interface/lib/lang/de.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd.m.Y H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = ',';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modul für Benutzer nicht erlaubt.';
$wb['302'] = 'Modul ungültig.';
$wb['1001'] = 'Der Benutzername und das Passwort dürfen nicht leer sein!';
diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng
index 4094c73..906191c 100644
--- a/interface/lib/lang/en.lng
+++ b/interface/lib/lang/en.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = "H:i";
$wb['conf_format_timelong'] = "H:i:s";
$wb['conf_format_datetime'] = "Y-m-d H:i";
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = "Module not permitted for the current user.";
$wb['302'] = "Module invalid.";
$wb['1001'] = "The username and password cannot be empty !";
diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng
index 656ab01..4c1cf62 100644
--- a/interface/lib/lang/es.lng
+++ b/interface/lib/lang/es.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modulo no permitido para el usuario actual.';
$wb['302'] = 'Modulo inválido.';
$wb['1001'] = '¡El usuario y contraseña no pueden estar vacíos!';
diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng
index 6c86b12..b09c412 100755
--- a/interface/lib/lang/fi.lng
+++ b/interface/lib/lang/fi.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Tämä moduuli ei ole sallittu nykyiselle käyttäjälle.';
$wb['302'] = 'Viallinen moduuli.';
$wb['1001'] = 'Käyttäjätunnus ja/tai salasana eivät voi olla tyhjiä!';
diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng
index e767066..577b6f1 100644
--- a/interface/lib/lang/fr.lng
+++ b/interface/lib/lang/fr.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd-m-Y H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Module interdit pour lutilisateur courant.';
$wb['302'] = 'Module invalide.';
$wb['1001'] = 'Le nomp dutilisateur et/ou le nom de passe ne doivent pas être vides!';
diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng
index fc26668..1e6f570 100644
--- a/interface/lib/lang/hu.lng
+++ b/interface/lib/lang/hu.lng
@@ -12,6 +12,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y.m.d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['page_txt'] = 'Oldal';
$wb['page_of_txt'] = 'Összesen';
$wb['page_next_txt'] = 'Tovább';
diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng
index 6ff8b84..a79bea4 100644
--- a/interface/lib/lang/id.lng
+++ b/interface/lib/lang/id.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd-m-Y H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modul tidak diperbolehkan diakses oleh pengguna saat ini.';
$wb['302'] = 'Modul tidak valid.';
$wb['1001'] = 'Nama pengguna dan kata sandi tidak boleh kosong !';
diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng
index 789619b..e8fedcc 100644
--- a/interface/lib/lang/it.lng
+++ b/interface/lib/lang/it.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modulo non permesso per l`utente corrente.';
$wb['302'] = 'Modulo non valido.';
$wb['1001'] = 'Nome utente e password non possono essere vuoti!';
diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng
index 60cde1a..1320d8a 100644
--- a/interface/lib/lang/ja.lng
+++ b/interface/lib/lang/ja.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y/m/d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'ログイン中のアカウントでは利用できないモジュールです。';
$wb['302'] = 'モジュールが不正です。';
$wb['1001'] = 'ユーザー名とパスワードを入力してください。';
diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng
index 3c6433c..99a054b 100644
--- a/interface/lib/lang/nl.lng
+++ b/interface/lib/lang/nl.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Module niet toegestaan voor de huidige gebruiker.';
$wb['302'] = 'Ongeldige module.';
$wb['1001'] = 'De gebruikersnaam en wachtwoord kunnen niet leeg zijn!';
diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng
index e5e51d6..c838707 100644
--- a/interface/lib/lang/pl.lng
+++ b/interface/lib/lang/pl.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = "H:i";
$wb['conf_format_timelong'] = "H:i:s";
$wb['conf_format_datetime'] = "Y-m-d H:i";
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = "Moduł nie jest dostępny dla aktualnego uzytkownika.";
$wb['302'] = "Moduł jest niepoprawny.";
$wb['1001'] = "Nazwa użytkownika i hasło nie może być puste !";
diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng
index 7d7ef68..9878719 100644
--- a/interface/lib/lang/pt.lng
+++ b/interface/lib/lang/pt.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'd/m/Y H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Módulo não permitido para o utilizador corrente.';
$wb['302'] = 'Módulo Inválido';
$wb['1001'] = 'O nome de utilizador e a senha não podem estar em branco!';
diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng
index 80ccb43..8230e8a 100644
--- a/interface/lib/lang/ro.lng
+++ b/interface/lib/lang/ro.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'userului NU i se permite acest modul ';
$wb['302'] = 'Modul invalid.';
$wb['1001'] = 'rubricile username si password nu pot fi goale !';
diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng
index 779bca9..8b09f09 100644
--- a/interface/lib/lang/ru.lng
+++ b/interface/lib/lang/ru.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Модуль недоступен для данной учетной записи.';
$wb['302'] = 'Модуль неправилен.';
$wb['1001'] = 'Имя или пароль не должны быть пустыми!';
diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng
index 0bed300..0a229ac 100644
--- a/interface/lib/lang/se.lng
+++ b/interface/lib/lang/se.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modulen �r ej till�ten f�r nuvarande anv�ndare.';
$wb['302'] = 'Modulen �r ogiltig.';
$wb['1001'] = 'Anv�ndarnamn och l�senord f�r ej vara tomma!';
diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng
index d1f8ceb..fdaadcb 100644
--- a/interface/lib/lang/sk.lng
+++ b/interface/lib/lang/sk.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modul nie je povolený pre existujúceho použivatela.';
$wb['302'] = 'Module neplatný.';
$wb['1001'] = 'Užvatelské meno a heslo nesmie byt prázdne !';
diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng
index 3d0514e..4fe8b6d 100644
--- a/interface/lib/lang/tr.lng
+++ b/interface/lib/lang/tr.lng
@@ -4,6 +4,9 @@
$wb['conf_format_timeshort'] = 'H:i';
$wb['conf_format_timelong'] = 'H:i:s';
$wb['conf_format_datetime'] = 'Y-m-d H:i';
+$wb['number_format_decimals'] = 2;
+$wb['number_format_dec_point'] = '.';
+$wb['number_format_thousands_sep'] = '';
$wb['301'] = 'Modül, bu kullanıcı için izin vermiyor.';
$wb['302'] = 'Geçersiz Modül.';
$wb['1001'] = 'Kullanıcı adı ve şifre boş geçilemez !';
--
Gitblit v1.9.1