mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Comment deprecate code and update regional number formats
This commit is contained in:
parent
f5b0e4b974
commit
4e7294530d
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -31,20 +31,21 @@ $langs->load("other");
|
|||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre("Dolibarr",'','setup');
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
// Version
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
|
|
@ -57,13 +58,35 @@ print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("VersionLastUpgrade")
|
|||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
// Language
|
||||
// Session
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("SessionId").'</td><td colspan="2">'.session_id()."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentSessionTimeOut").'</td><td>'.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds");
|
||||
print '</td><td align="right">';
|
||||
print $form->textwithhelp('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||
print "</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTopMenuHandler").'</td><td colspan="2">'.$conf->top_menu."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentLeftMenuHandler").'</td><td colspan="2">'.$conf->left_menu."</td></tr>\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
// Localisation
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE")."</td><td>".$_SERVER["HTTP_ACCEPT_LANGUAGE"]."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentUserLanguage").'</td><td colspan="2">'.$langs->getDefaultLang()."</td></tr>\n";
|
||||
/*$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageBrowserParameter","LANG")."</td><td>".$_ENV["LANG"]."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_ALL")."</td><td>".setlocale(LC_ALL,0)."</td></tr>\n";
|
||||
|
|
@ -71,10 +94,7 @@ $var=!$var;
|
|||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_NUMERIC")."</td><td>".setlocale(LC_NUMERIC,0)."</td></tr>\n";
|
||||
//$var=!$var;
|
||||
//print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("LanguageParameter","PHP LC_MONETARY")."</td><td>".setlocale(LC_MONETARY,0)."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> price2num(1234.56)</td><td>'.price2num(1233.56+1,'2')."</td></tr>";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> dol_print_date(0,"dayhourtext")</td><td>'.dol_print_date(0,"dayhourtext")."</td>";
|
||||
*/
|
||||
// Thousands
|
||||
$var=!$var;
|
||||
$thousand=$langs->trans("SeparatorThousand");
|
||||
|
|
@ -84,6 +104,9 @@ print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentValueSeparato
|
|||
$var=!$var;
|
||||
$dec=$langs->trans("SeparatorDecimal");
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentValueSeparatorDecimal")."</td><td>".$dec."</td></tr>\n";
|
||||
// Show results of functions to see if everything works
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> price2num(1233.56+1)</td><td>'.price2num(1233.56+1,'2')."</td></tr>";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width=\"300\">=> price2num('."'1".$thousand."234".$dec."56')</td><td>".price2num("1".$thousand."234".$dec."56",'2')."</td>";
|
||||
if (($thousand != ',' && $thousand != '.') || ($thousand != ' '))
|
||||
|
|
@ -92,6 +115,8 @@ if (($thousand != ',' && $thousand != '.') || ($thousand != ' '))
|
|||
print "<tr ".$bc[$var].'><td width=\"300\">=> price2num('."'1 234.56')</td><td>".price2num("1 234.56",'2')."</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].'><td width="300">=> price(1234.56)</td><td>'.price(1234.56)."</td>";
|
||||
//print '<tr class="liste_titre"><td>'.$langs->trans("TimeZone").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
// Timezone
|
||||
$var=!$var;
|
||||
|
|
@ -111,27 +136,8 @@ $var=!$var;
|
|||
print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("PHPServerOffsetWithGreenwich")."</td><td>".(- dolibarr_mktime(0,0,0,1,1,1970))."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">=> ".$langs->trans("CurrentHour")."</td><td>".dolibarr_print_date(time(),'dayhour')."</td></tr>\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("SessionId").'</td><td colspan="2">'.session_id()."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentSessionTimeOut").'</td><td>'.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds");
|
||||
print '</td><td align="right">';
|
||||
print $form->textwithhelp('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||
print "</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTheme").'</td><td colspan="2">'.$conf->theme."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentTopMenuHandler").'</td><td colspan="2">'.$conf->top_menu."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentLeftMenuHandler").'</td><td colspan="2">'.$conf->left_menu."</td></tr>\n";
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var]."><td width=\"300\">".$langs->trans("CurrentUserLanguage").'</td><td colspan="2">'.$langs->getDefaultLang()."</td></tr>\n";
|
||||
print "<tr ".$bc[$var].'><td width="300">=> dol_print_date(0,"dayhourtext")</td><td>'.dol_print_date(0,"dayhourtext")."</td>";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Dolibarr language file - ca_ES - main
|
||||
CHARSET = UTF-8
|
||||
DatabaseConnection = Connexió a la base de dades
|
||||
SeparatorDecimal = ,
|
||||
SeparatorThousand = .
|
||||
DatabaseConnection = Connexió a la base de dades
|
||||
Error = Error
|
||||
ErrorFieldRequired = El camp '%s' és obligatori
|
||||
ErrorFieldFormat = El camp '%s' té un valor incorrecte
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DatabaseConnection=Database forbindelse
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
DatabaseConnection=Database forbindelse
|
||||
Error=Fejl
|
||||
ErrorFieldRequired=Felt '% s' er påkrævet
|
||||
ErrorFieldFormat=Felt '% s' har en dårlig værdi
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DatabaseConnection=Datenbank-Verbindung
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
DatabaseConnection=Datenbank-Verbindung
|
||||
Error=Fehler
|
||||
ErrorFieldRequired=Feld '% s' ist erforderlich
|
||||
ErrorFieldFormat=Feld '% s' hat einen schlechten Wert
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Dolibarr language file - en_AU - main
|
||||
# This file contains only line that must differs from en_US file
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
UnitPrice=Unit price
|
||||
UnitPriceHT=Unit price (excl GST)
|
||||
UnitPriceTTC=Unit price
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Dolibarr language file - en_US - main
|
||||
CHARSET=UTF-8
|
||||
DatabaseConnection=Database connection
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
DatabaseConnection=Database connection
|
||||
Error=Error
|
||||
ErrorFieldRequired=Field '%s' is required
|
||||
ErrorFieldFormat=Field '%s' has a bad value
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Dolibarr language file - es_ES - main
|
||||
CHARSET = UTF-8
|
||||
DatabaseConnection = Conexión a la base de datos
|
||||
SeparatorDecimal = ,
|
||||
SeparatorThousand =
|
||||
DatabaseConnection = Conexión a la base de datos
|
||||
Error = Error
|
||||
ErrorFieldRequired = El campo '%s' es obligatorio
|
||||
ErrorFieldFormat = El campo '%s' tiene un valor incorrecto
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
DatabaseConnection=Tietokannan yhteydessä
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Tietokannan yhteydessä
|
||||
Error=Virhe
|
||||
ErrorFieldRequired=Kenttä '% s' on
|
||||
ErrorFieldFormat=Kenttä "% s \" on huono arvo
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Dolibarr language file - fr_FR - main
|
||||
CHARSET=UTF-8
|
||||
DatabaseConnection=Connexion à la base
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Connexion à la base
|
||||
Error=Erreur
|
||||
ErrorFieldRequired=Le champ '%s' est obligatoire
|
||||
ErrorFieldFormat=Le champ '%s' a une valeur incorrecte
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Dolibarr language file - it_IT - main
|
||||
CHARSET =ISO-8859-1
|
||||
DatabaseConnection =Connessione al database
|
||||
SeparatorDecimal =,
|
||||
SeparatorThousand =
|
||||
DatabaseConnection =Connessione al database
|
||||
Error =Errore
|
||||
ErrorFieldRequired =Il campo '%s' è necessaria
|
||||
ErrorFieldFormat =Il campo '%s' ha un valore cattivo
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Database connectie
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
Error=Fout
|
||||
ErrorFieldRequired=Veld '% s' is vereist
|
||||
ErrorFieldFormat=Veld '% s' heeft een slechte waarde
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Database-tilkobling
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
Error=Feil
|
||||
ErrorFieldRequired=Feltet '% s' er nødvendig
|
||||
ErrorFieldFormat=Feltet '% s' har en dårlig verdi
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Połączenia z bazą danych
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
Error=Błąd
|
||||
ErrorFieldRequired=Pole '% s' jest wymagane
|
||||
ErrorFieldFormat=Pole '% s' ma złe wartości
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# Dolibarr language file - pt_PT - principal
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
Error=Erro
|
||||
ErrorFieldRequired=O campo '%s' é obrigatório
|
||||
ErrorFileDoesNotExists=O ficheiro %s não existe
|
||||
|
|
@ -192,14 +194,7 @@ Photos=Imagens
|
|||
AddPhoto=Adicionar imagem
|
||||
|
||||
|
||||
|
||||
// Date 2009-01-18 18:56:33
|
||||
// START - Lines generated via parser
|
||||
// Reference language: en_US
|
||||
CHARSET=ISO-8859-1
|
||||
DatabaseConnection=Database conexão
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
ErrorFieldFormat=Domínio '% s' tem um valor negativo
|
||||
ErrorFailedToOpenFile=Falha ao abrir o arquivo% s
|
||||
ErrorCanNotReadDir=Não é possível ler dir% s
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Baza de date de conectare
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
Error=Eroare
|
||||
ErrorFieldRequired=Câmp "% s" este necesar
|
||||
ErrorFieldFormat=Câmp "% s" are o valoare de rău
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
// START - Lines generated via autotranslator.php tool.
|
||||
// Reference language: en_US
|
||||
CHARSET=UTF-8
|
||||
SeparatorDecimal=,
|
||||
SeparatorThousand=
|
||||
DatabaseConnection=Подключение к базе данных
|
||||
SeparatorDecimal=.
|
||||
SeparatorThousand=,
|
||||
Error=Ошибка
|
||||
ErrorFieldRequired=Поле '% S' требуется
|
||||
ErrorFieldFormat=Поле '% S' имеет значения плохо
|
||||
|
|
|
|||
|
|
@ -141,11 +141,13 @@ class Translate {
|
|||
\brief Positionne environnement PHP en fonction du langage
|
||||
\remarks Le code langue long (fr_FR, en_US, ...) doit avoir etre positionne par setDefaultLang
|
||||
\return int >0 si ok, <0 so ko
|
||||
\deprecated
|
||||
*/
|
||||
function setPhpLang()
|
||||
{
|
||||
//dolibarr_syslog("Translate::setPhpLang ".$this->defaultlang,LOG_DEBUG);
|
||||
|
||||
return;
|
||||
/*
|
||||
$code_lang_tiret=ereg_replace('_','-',$this->defaultlang);
|
||||
//print 'code_lang_tiret='.$code_lang_tiret;
|
||||
setlocale(LC_ALL, $this->defaultlang); // Some OS (Windows) need local with _
|
||||
|
|
@ -159,7 +161,8 @@ class Translate {
|
|||
$res_lc_monetary=setlocale(LC_MONETARY, MAIN_FORCE_SETLOCALE_LC_MONETARY.'UTF-8', MAIN_FORCE_SETLOCALE_LC_MONETARY);
|
||||
//print 'x'.$res_lc_all;
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user