Trad: Encore de la gestion multi-langue

Fix: Corrections droits sur propale mal chargs
This commit is contained in:
Laurent Destailleur 2004-07-25 16:52:26 +00:00
parent 6a1e6f84ab
commit b952620ab5
9 changed files with 48 additions and 31 deletions

View File

@ -0,0 +1,3 @@
# Dolibarr language file - en_US - bills
Bill=Bill
Bills=Bills

View File

@ -1,2 +1,6 @@
# Dolibarr language file - en_US - commercial
Commercial=Commercial
Commercial=Commercial
Customer=Customer
Customers=Customers
Prospect=Prospect
Prospects=Prospects

View File

@ -24,4 +24,5 @@ About=About
WelcomeString=<font class="body">We are </font>%s<font class="body">, and you are connected with name</font> %s
Number=Number
DevelopmentTeam=Development Team
Logout=Logout
Logout=Logout
Setup=Setup

View File

@ -0,0 +1,3 @@
# Dolibarr language file - fr_FR - bills
Bill=Facture
Bills=Factures

View File

@ -1,2 +1,6 @@
# Dolibarr language file - fr_FR - commercial
Commercial=Commercial
Commercial=Commercial
Customer=Client
Customers=Clients
Prospect=Prospect
Prospects=Prospects

View File

@ -25,3 +25,4 @@ WelcomeString=<font class="body">Nous sommes le</font> %s<font class="body">, et
Number=Nombre
DevelopmentTeam=Equipe de développement
Logout=Deconnexion
Setup=Configuration

View File

@ -499,10 +499,9 @@ function top_menu($head, $title="", $target="")
print "<tr>";
// Sommet menu de gauche, lien accueil
global $PHP_SELF;
$class="";
if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "accueil") { $class="menusel"; }
elseif (ereg("^".DOL_URL_ROOT."\/[^\\\/]+$",$PHP_SELF) || ereg("^".DOL_URL_ROOT."\/user\/",$PHP_SELF) || ereg("^".DOL_URL_ROOT."\/admin\/",$PHP_SELF)) { $class="menusel"; }
elseif (ereg("^".DOL_URL_ROOT."\/[^\\\/]+$",$_SERVER["PHP_SELF"]) || ereg("^".DOL_URL_ROOT."\/user\/",$_SERVER["PHP_SELF"]) || ereg("^".DOL_URL_ROOT."\/admin\/",$_SERVER["PHP_SELF"])) { $class="menusel"; }
print '<td width="200" class="menu"><table cellpadding=0 cellspacing=0 width="100%"><tr><td class="'.$class.'" align=center><a class="'.$class.'" href="'.DOL_URL_ROOT.'/index.php"'.($target?" target=$target":"").'>'.$langs->trans("Home").'</a></td></tr></table></td>';
// Sommet géré par gestionnaire de menu du haut
@ -635,19 +634,11 @@ Function left_menu($menu, $help_url='', $form_search='', $author='')
{
print '<div class="leftmenu">';
define('MAIN_AIDE_URL','http://www.dolibarr.com/wikidev/index.php');
print '<a class="leftmenu" target="_blank" href="'.MAIN_AIDE_URL.'/'.$help_url.'">Aide</a></div>';
print '<a class="leftmenu" target="_blank" href="'.MAIN_AIDE_URL.'/'.$help_url.'">'.$langs->trans("Help").'</a></div>';
}
/*
*
*
*
if (is_object($author))
{
print '<tr><td class="auteurs">Auteur : ';
print $author->fullname .'</td></tr>';
}
*/
print "<!-- Fin left menu -->\n";
print "</td>";
print "<td valign=\"top\" colspan=\"2\">\n";

View File

@ -27,6 +27,8 @@ require ("./main.inc.php");
function llxHeader($head = "") {
global $user, $conf, $langs;
$user->getrights('societe');
$user->getrights('propale');
$user->getrights('facture');
/*
*
@ -38,21 +40,23 @@ function llxHeader($head = "") {
if ($conf->societe->enabled)
{
$menu->add(DOL_URL_ROOT."/societe.php", "Sociétés","company");
$langs->load("companies");
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
if ($user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", "Nouvelle société");
}
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php", "Contacts");
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
}
if ($conf->commercial->enabled )
{
$menu->add(DOL_URL_ROOT."/comm/index.php", "Commercial");
$langs->load("commercial");
$menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial"));
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php", "Clients");
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php", "Prospects");
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers"));
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects"));
if ($user->rights->propale->lire)
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", "Prop. commerciales");
@ -60,10 +64,13 @@ function llxHeader($head = "") {
if ($conf->compta->enabled )
{
$menu->add(DOL_URL_ROOT."/compta/index.php", "Comptabilité");
$langs->load("compta");
$menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("Accountancy"));
if ($user->rights->facture->lire)
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", "Factures");
if ($user->rights->facture->lire) {
$langs->load("bills");
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
}
}
if ($conf->fichinter->enabled )
@ -73,10 +80,11 @@ function llxHeader($head = "") {
if ($conf->produit->enabled || $conf->service->enabled)
{
$langs->load("products");
$chaine="";
if ($conf->produit->enabled) { $chaine.="Produits"; }
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.="Services"; }
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
if ($conf->boutique->enabled)
@ -95,7 +103,8 @@ function llxHeader($head = "") {
if ($conf->adherent->enabled )
{
$menu->add(DOL_URL_ROOT."/adherents/index.php", "Adherents");
$langs->load("members");
$menu->add(DOL_URL_ROOT."/adherents/index.php", $langs->trans("Members"));
}
if ($conf->commande->enabled)
@ -113,7 +122,8 @@ function llxHeader($head = "") {
if ($conf->fournisseur->enabled)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", "Fournisseurs");
$langs->load("suppliers");
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
if ($conf->voyage && $user->societe_id == 0)
@ -140,11 +150,11 @@ function llxHeader($head = "") {
$menu->add(DOL_URL_ROOT."/rapport/", "Rapports");
}
$menu->add(DOL_URL_ROOT."/user/index.php", "Utilisateurs");
$menu->add(DOL_URL_ROOT."/user/index.php", $langs->trans("Users"));
if ($user->admin)
{
$menu->add(DOL_URL_ROOT."/admin/index.php", "Configuration");
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup"));
}
/*

View File

@ -54,7 +54,7 @@ Class Translate {
while (($ligne = fgets($fp,4096)) && ($finded == 0)){
if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#") {
$tab=split('=',$ligne,2);
//print "Ligne=$ligne<br>Found a string for $tab[0] with value $tab[1]<br>";
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
$this->tab_translate[$tab[0]]=trim($tab[1]);
}
}