Trad: Encore de la gestion multi-langue
Optim: Suppression d'une fonction en doubles
This commit is contained in:
parent
b952620ab5
commit
978edc1572
@ -169,7 +169,7 @@ if ($result)
|
||||
|
||||
print "</td>";
|
||||
print "<td><a href=\"fiche.php?rowid=$objp->rowid&action=edit\">".img_edit()."</a> ";
|
||||
print "<a href=\"fiche.php?rowid=$objp->rowid&action=resign\">".img_disable("Résilier")."</a> <a href=\"fiche.php?rowid=$objp->rowid&action=delete\">".img_delete()."</a></td>\n";
|
||||
print "<a href=\"fiche.php?rowid=$objp->rowid&action=resign\">".img_disable($langs->trans("Resiliate"))."</a> <a href=\"fiche.php?rowid=$objp->rowid&action=delete\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -27,7 +27,8 @@ if (!$user->admin)
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_titre("Configuration autre (Dolibarr version ".DOL_VERSION.")");
|
||||
|
||||
print_titre($langs->trans("OtherSetup"));
|
||||
|
||||
//print_r(get_defined_constants());
|
||||
print "<br>\n";
|
||||
@ -55,11 +56,11 @@ if ($_GET["action"] == 'delete')
|
||||
|
||||
print '<table class="noborder" cellpadding="2" cellspacing="0" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>Nom</td>';
|
||||
print '<td>Valeur</td>';
|
||||
print '<td>Type</td>';
|
||||
print '<td>Note</td>';
|
||||
print "<td>Action</td>";
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>'.$langs->trans("Note").'</td>';
|
||||
print '<td>'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -90,6 +91,7 @@ if ($result)
|
||||
|
||||
print "<tr $bc[$var] class=value><td>$obj->name</td>\n";
|
||||
|
||||
// Type
|
||||
print '<td>';
|
||||
if ($obj->type == 'yesno')
|
||||
{
|
||||
@ -113,9 +115,10 @@ if ($result)
|
||||
}
|
||||
print '</td><td>';
|
||||
|
||||
print '<input type="text" size="15" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
|
||||
// Note
|
||||
print '<input type="text" size="30" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
|
||||
print '</td><td>';
|
||||
print '<input type="Submit" value="Update" name="Button"> ';
|
||||
print '<input type="Submit" value="'.$langs->trans("Modify").'" name="Button"> ';
|
||||
print '<a href="const.php?rowid='.$obj->rowid.'&action=delete">'.img_delete().'</a>';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -142,7 +145,7 @@ print '</td><td>';
|
||||
print '<input type="text" size="15" name="constnote" value="">';
|
||||
print '</td><td>';
|
||||
|
||||
print '<input type="Submit" value="Add" name="Button"><BR>';
|
||||
print '<input type="Submit" value="'.$langs->trans("Add").'" name="Button"><BR>';
|
||||
print "</td>\n";
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
require("../main.inc.php");
|
||||
|
||||
function llxHeader($head = "", $urlp = "") {
|
||||
global $user, $conf;
|
||||
global $user, $conf, $langs;
|
||||
|
||||
/*
|
||||
*
|
||||
@ -31,25 +31,21 @@ function llxHeader($head = "", $urlp = "") {
|
||||
top_menu($head);
|
||||
|
||||
$menu = new Menu();
|
||||
$langs->load("admin");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("GlobalSetup"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/index.php", "Configuration générale");
|
||||
$menu->add(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/ihm.php", "Configuration IHM");
|
||||
$menu->add(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/dict.php", "Configuration dictionnaires");
|
||||
$menu->add(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/const.php", "Configuration autre");
|
||||
$menu->add(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/modules.php", "Modules");
|
||||
$menu->add(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/admin/boxes.php", "Boites");
|
||||
|
||||
if(defined("MAIN_MODULE_EXTERNAL_RSS") && MAIN_MODULE_EXTERNAL_RSS)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/admin/external_rss.php", "Syndication");
|
||||
}
|
||||
|
||||
$menu->add("system/", "Système");
|
||||
$menu->add("system/", $langs->trans("System"));
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
@ -20,14 +20,13 @@
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
/*
|
||||
* Sécurité accés
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
block_access();
|
||||
exit;
|
||||
}
|
||||
if (!$user->admin && $user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
llxHeader();
|
||||
|
||||
@ -39,7 +38,6 @@ print_titre("Paiements");
|
||||
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
|
||||
@ -20,14 +20,15 @@
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php");
|
||||
|
||||
|
||||
/*
|
||||
* Sécurité accés
|
||||
*/
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
block_access();
|
||||
exit;
|
||||
}
|
||||
if (!$user->admin && $user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
|
||||
require("../../includes/modules/rapport/pdf_paiement.class.php");
|
||||
|
||||
|
||||
@ -536,7 +536,7 @@ class Form
|
||||
print "<option value=\"$row[0]\" ";
|
||||
if ($id == $row[0])
|
||||
{
|
||||
print "SELECTED";
|
||||
print "selected";
|
||||
}
|
||||
print ">$row[1]</option>\n";
|
||||
$i++;
|
||||
@ -583,7 +583,7 @@ class Form
|
||||
print "<option value=\"$key\" ";
|
||||
if ($id == $key)
|
||||
{
|
||||
print "SELECTED";
|
||||
print "selected";
|
||||
}
|
||||
if ($key_libelle)
|
||||
{
|
||||
@ -631,17 +631,19 @@ class Form
|
||||
*/
|
||||
Function selectyesno($name,$value='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
print '<select name="'.$name.'">';
|
||||
|
||||
if ($value == 'yes')
|
||||
{
|
||||
print '<option value="yes" SELECTED>oui</option>';
|
||||
print '<option value="no">non</option>';
|
||||
print '<option value="yes" selected>'.$langs->trans("yes").'</option>';
|
||||
print '<option value="no">'.$langs->trans("no").'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<option value="yes">oui</option>';
|
||||
print '<option value="no" SELECTED>non</option>';
|
||||
print '<option value="yes">'.$langs->trans("yes").'</option>';
|
||||
print '<option value="no" selected>'.$langs->trans("no").'</option>';
|
||||
}
|
||||
print '</select>';
|
||||
}
|
||||
@ -652,17 +654,19 @@ class Form
|
||||
*/
|
||||
Function selectyesnonum($name,$value='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
print '<select name="'.$name.'">';
|
||||
|
||||
if ($value == 1)
|
||||
{
|
||||
print '<option value="1" SELECTED>oui</option>';
|
||||
print '<option value="0">non</option>';
|
||||
print '<option value="1" selected>'.$langs->trans("yes").'</option>';
|
||||
print '<option value="0">'.$langs->trans("no").'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<option value="1">oui</option>';
|
||||
print '<option value="0" SELECTED>non</option>';
|
||||
print '<option value="1">'.$langs->trans("yes").'</option>';
|
||||
print '<option value="0" selected>'.$langs->trans("no").'</option>';
|
||||
}
|
||||
print '</select>';
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Dolibarr language file - en_US - admin
|
||||
GlobalSetup=Global setup
|
||||
GUISetup=GUI Setup
|
||||
GUISetup=GUI setup
|
||||
DictionnarySetup=Dictionnary setup
|
||||
OtherSetup=Other setup
|
||||
Modules=Modules
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
# Dolibarr language file - en_US - main
|
||||
charset="iso-8859-1"
|
||||
yes=yes
|
||||
no=no
|
||||
Home=Home
|
||||
Help=Help
|
||||
Activate=Activate
|
||||
Activated=Activated
|
||||
Add=Add
|
||||
Delete=Delete
|
||||
Resiliate=Resiliate
|
||||
Cancel=Cancel
|
||||
Modify=Modify
|
||||
Edit=Edit
|
||||
Show=Show
|
||||
Search=Search
|
||||
ChooseLangage=Please choose your language
|
||||
User=User
|
||||
@ -25,4 +29,8 @@ WelcomeString=<font class="body">We are </font>%s<font class="body">, and you ar
|
||||
Number=Number
|
||||
DevelopmentTeam=Development Team
|
||||
Logout=Logout
|
||||
Setup=Setup
|
||||
Setup=Setup
|
||||
Alert=Alert
|
||||
Previous=Précédent
|
||||
Next=Suivant
|
||||
ErrorForbidden=Access is forbidden
|
||||
@ -1,14 +1,18 @@
|
||||
# Dolibarr language file - fr_FR - main
|
||||
charset="iso-8859-1"
|
||||
yes=oui
|
||||
no=non
|
||||
Home=Accueil
|
||||
Help=Aide
|
||||
Activate=Activer
|
||||
Activated=Activé
|
||||
Add=Ajouter
|
||||
Delete=Supprimer
|
||||
Resiliate=Résilier
|
||||
Cancel=Annuler
|
||||
Modify=Modifier
|
||||
Edit=Editer
|
||||
Show=Voir
|
||||
Search=Rechercher
|
||||
ChooseLangage=Choisissez votre langue
|
||||
User=Utilisateur
|
||||
@ -26,3 +30,7 @@ Number=Nombre
|
||||
DevelopmentTeam=Equipe de développement
|
||||
Logout=Deconnexion
|
||||
Setup=Configuration
|
||||
Alert=Alerte
|
||||
Previous=Précédent
|
||||
Next=Suivant
|
||||
ErrorForbidden=Accès non autorisé
|
||||
@ -244,41 +244,69 @@ function dolibarr_print_phone($phone)
|
||||
}
|
||||
}
|
||||
|
||||
function img_file($alt = "Voir")
|
||||
function img_file($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Show");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/file.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_file_new($alt = "Voir")
|
||||
function img_file_new($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Show");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/filenew.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
|
||||
function img_pdf($alt = "Voir")
|
||||
function img_pdf($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Show");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/pdf.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
|
||||
function img_edit($alt = "Modifier")
|
||||
function img_edit($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Modify");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/edit.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_delete($alt = "Supprimer")
|
||||
function img_delete($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Delete");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/delete.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_disable($alt = "Désactiver")
|
||||
function img_disable($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Disable");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/disable.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
|
||||
function img_warning($alt = "Voir")
|
||||
function img_warning($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Show");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/warning.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
@ -287,31 +315,50 @@ function img_info($alt = "Informations")
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/info.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_alerte($alt = "Alerte")
|
||||
function img_alerte($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Alert");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/alerte.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
|
||||
function img_phone_in($alt = "Modifier")
|
||||
function img_phone_in($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Modify");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/call.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_phone_out($alt = "Modifier")
|
||||
function img_phone_out($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Modify");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/call_out.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function img_next($alt = "Suivant")
|
||||
function img_next($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Next");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/next.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
function img_previous($alt = "Précédent")
|
||||
function img_previous($alt = "default")
|
||||
{
|
||||
if ($alt="default") {
|
||||
global $langs;
|
||||
$alt=$langs->trans("Previous");
|
||||
}
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.MAIN_THEME.'/img/previous.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
@ -405,8 +452,10 @@ function loginfunction()
|
||||
|
||||
function accessforbidden()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
llxHeader();
|
||||
print "Accés interdit";
|
||||
print $langs->trans("ErrorForbidden");
|
||||
llxFooter();
|
||||
exit(0);
|
||||
}
|
||||
@ -713,6 +762,7 @@ function transcoS2L($zonein,$devise)
|
||||
return($r); // retourne le résultat
|
||||
} // fin fonction transcoS2L
|
||||
|
||||
|
||||
/*!
|
||||
\brief affichage du titre d'une liste
|
||||
\param name
|
||||
@ -806,16 +856,6 @@ function dol_delete_file($file)
|
||||
return unlink($file);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief accès refusé
|
||||
*/
|
||||
|
||||
function block_access()
|
||||
{
|
||||
llxHeader();
|
||||
print "Accés refusé";
|
||||
llxFooter();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
@ -1059,7 +1099,7 @@ function print_duree_select($prefix)
|
||||
{
|
||||
print '<select name="'.$prefix.'hour">';
|
||||
print "<option value=\"0\">0";
|
||||
print "<option value=\"1\" SELECTED>1";
|
||||
print "<option value=\"1\" selected>1";
|
||||
|
||||
for ($hour = 2 ; $hour < 13 ; $hour++)
|
||||
{
|
||||
|
||||
@ -19,8 +19,9 @@
|
||||
* ************************************************************************* */
|
||||
|
||||
Class Translate {
|
||||
var $tab_loaded;
|
||||
var $tab_translate;
|
||||
|
||||
var $tab_loaded=array();
|
||||
var $tab_translate=array();
|
||||
|
||||
var $defaultlang;
|
||||
var $dir;
|
||||
@ -66,6 +67,11 @@ Class Translate {
|
||||
|
||||
}
|
||||
|
||||
function list_domainloaded() {
|
||||
return join(",",array_keys($this->tab_loaded));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return translated version of parameter string
|
||||
* [fr] Retourne la version traduite du texte passé en paramètre
|
||||
|
||||
Loading…
Reference in New Issue
Block a user