From 36d487012c4f4eb3d31beb4cb38d3923c820f46b Mon Sep 17 00:00:00 2001 From: mcramer Date: Tue, 18 Sep 2012 15:27:57 +0000 Subject: [PATCH] Added: second decimal count to separate internal view from client view --- interface/lib/classes/functions.inc.php | 6 ++++-- interface/lib/lang/ar.lng | 3 ++- interface/lib/lang/bg.lng | 3 ++- interface/lib/lang/br.lng | 3 ++- interface/lib/lang/cz.lng | 3 ++- interface/lib/lang/de.lng | 3 ++- interface/lib/lang/el.lng | 3 ++- interface/lib/lang/en.lng | 3 ++- interface/lib/lang/es.lng | 3 ++- interface/lib/lang/fi.lng | 3 ++- interface/lib/lang/fr.lng | 3 ++- interface/lib/lang/hr.lng | 3 ++- interface/lib/lang/hu.lng | 3 ++- interface/lib/lang/id.lng | 3 ++- interface/lib/lang/it.lng | 3 ++- interface/lib/lang/ja.lng | 3 ++- interface/lib/lang/nl.lng | 3 ++- interface/lib/lang/pl.lng | 3 ++- interface/lib/lang/pt.lng | 3 ++- interface/lib/lang/ro.lng | 3 ++- interface/lib/lang/ru.lng | 3 ++- interface/lib/lang/se.lng | 3 ++- interface/lib/lang/sk.lng | 3 ++- interface/lib/lang/tr.lng | 3 ++- 24 files changed, 50 insertions(+), 25 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index 2e2fdfaec..b0e1f3b02 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -117,9 +117,11 @@ class functions { return $out; } - public function currency_format($number) { + public function currency_format($number, $view = '') { global $app; - $number_format_decimals = (int)$app->lng('number_format_decimals'); + if($view != '') $number_format_decimals = (int)$app->lng('number_format_decimals_'.$view); + if(!$number_format_decimals) $number_format_decimals = (int)$app->lng('number_format_decimals'); + $number_format_dec_point = $app->lng('number_format_dec_point'); $number_format_thousands_sep = $app->lng('number_format_thousands_sep'); if($number_format_thousands_sep == 'number_format_thousands_sep') $number_format_thousands_sep = ''; diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index 4d7a5c813..15a9e1d92 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'ÛíÑ ãÓãæÍ ááÚÖæ ÈÇáÅÓÊÎÏÇã.'; diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index 29b251424..46d9d0a7b 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Този модул не е разрешен за текущия потреител.'; diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index db9e64e7a..d0b2e1256 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS de F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Módulo não permitido para o usuário corrente.'; diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index c84e9e627..ecbb7b979 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modul není povolen pro současného uživatele.'; diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 050fbb25f..fcc87a9be 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -5,7 +5,8 @@ $wb['conf_format_datelong'] = 'l, d. F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modul für Benutzer nicht erlaubt.'; diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index 45b0de82e..58cfc7414 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -35,7 +35,8 @@ $wb['top_menu_domain'] = 'Domains'; $wb['top_menu_dashboard'] = 'Αρχική'; $wb['toolsarea_head_txt'] = 'Εργαλεία'; $wb['latest_news_txt'] = 'Τελευταία Νέα'; -$wb['number_format_decimals'] = '2'; +$wb['number_format_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['top_menu_vm'] = 'VServer'; diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index aad4f5cc0..09b692b23 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -5,7 +5,8 @@ $wb['conf_format_datelong'] = "l dS of F Y"; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = "Module not permitted for the current user."; diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 9dc37bb59..1157891e1 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modulo no permitido para el usuario actual.'; diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index 463d7c5f3..d53fcf203 100755 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Tämä moduuli ei ole sallittu nykyiselle käyttäjälle.'; diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index d2fc6cc18..64abfa23d 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Vous navez pas accès à ce module'; diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index af5d900bc..30441b6ac 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l d. F Y.'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = '.'; $wb['delete_confirmation'] = 'Da li želite obrisati ovaj DNS zapis?'; diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index e7010488d..ef082d597 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -36,7 +36,8 @@ $wb['top_menu_domain'] = 'Domainek'; $wb['top_menu_dashboard'] = 'Főoldal'; $wb['latest_news_txt'] = 'Legfrissebb hírek'; $wb['top_menu_vm'] = 'VM'; -$wb['number_format_decimals'] = '2'; +$wb['number_format_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['daynamesmin_su'] = 'Su'; diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index df7f1a54f..d24845bd0 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modul tidak diperbolehkan diakses oleh pengguna saat ini.'; diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index d86484cd9..4c293f13f 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = '.'; $wb['delete_confirmation'] = 'Sei sicuro di voler cancellare questo record?'; diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 3da401989..25a80be9b 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'ログイン中のアカウントでは利用できないモジュールです。'; diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index 91b02b00d..0e5c8411e 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l, d. F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Module niet toegestaan voor de huidige gebruiker.'; diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index 8316ec16d..6a8619225 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Moduł nie jest dostępny dla aktualnego uzytkownika.'; diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index 3274dc137..cc48b4221 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS de F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Módulo não permitido para o utilizador corrente.'; diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index 4bed07bc0..39fc3b099 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'userului NU i se permite acest modul '; diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 2b2a3129a..a8012c621 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = ','; $wb['number_format_thousands_sep'] = ''; $wb['delete_confirmation'] = 'Вы действительно хотите удалить эту запись?'; diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index 63842b12c..07a52e44a 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modulen är ej tillåten för nuvarande användare.'; diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index bad4a2b3a..ab7670f9d 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modul nie je povolený pre existujúceho použivatela.'; diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index d749b54ba..8fc68442c 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -4,7 +4,8 @@ $wb['conf_format_datelong'] = 'l dS of F Y'; $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_decimals'] = '4'; +$wb['number_format_decimals_client'] = '2'; $wb['number_format_dec_point'] = '.'; $wb['number_format_thousands_sep'] = ''; $wb['error_301'] = 'Modül, bu kullanıcı için izin vermiyor.'; -- GitLab