Trad: Traduction des titres des boites

This commit is contained in:
Laurent Destailleur 2005-02-28 17:08:25 +00:00
parent 611b8150b4
commit e1fcba2876
17 changed files with 77 additions and 45 deletions

View File

@ -184,7 +184,8 @@ if ($result)
$box=new $module();
print '<form action="boxes.php" method="POST">';
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td><td>' . $obj->file . '</td>';
$logo=eregi_replace("^object_","",$box->boximg);
print '<tr '.$bc[$var].'><td>'.img_object("",$logo).' '.$box->boxlabel.'</td><td>' . $obj->file . '</td>';
// Pour chaque position possible, on affiche un lien
// d'activation si boite non deja active pour cette position
@ -247,7 +248,8 @@ if ($result)
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/".$module.".php");
$box=new $module();
print '<tr '.$bc[$var].'><td>'.img_object("",$box->boximg).' '.$box->boxlabel.'</td>';
$logo=eregi_replace("^object_","",$box->boximg);
print '<tr '.$bc[$var].'><td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
print '<td>&nbsp;</td>';
print '<td align="center">' . $pos_name[$obj->position] . '</td>';
$hasnext=true;

View File

@ -34,7 +34,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_boutique_livre extends ModeleBoxes {
var $boxcode="lastbooks";
var $boximg="book";
var $boximg="object_book";
var $boxlabel;
var $depends = array("boutique");
@ -61,7 +61,7 @@ class box_boutique_livre extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max derniers ouvrages");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastBooks",$max));
$sql = "SELECT l.ref, l.title, l.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."livre as l ";
@ -81,7 +81,7 @@ class box_boutique_livre extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_book',
'logo' => $this->boximg,
'text' => $objp->title,
'url' => DOL_URL_ROOT."/boutique/livre/fiche.php?id=".$objp->rowid);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_clients extends ModeleBoxes {
var $boxcode="lastcustomers";
var $boximg="company";
var $boximg="object_company";
var $boxlabel;
var $depends = array("societe");
@ -60,7 +60,7 @@ class box_clients extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max derniers clients enregistrés");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastCustomers",$max));
$sql = "SELECT s.nom,s.idp";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s WHERE s.client = 1";
@ -84,7 +84,7 @@ class box_clients extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_company',
'logo' => $this->boximg,
'text' => stripslashes($objp->nom),
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_commandes extends ModeleBoxes {
var $boxcode="lastcustomerorders";
var $boximg="order";
var $boximg="object_order";
var $boxlabel;
var $depends = array("commercial");
@ -63,7 +63,7 @@ class box_commandes extends ModeleBoxes {
{
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max dernières commandes clients");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastCustomerOrders",$max));
$sql = "SELECT s.nom,s.idp,p.ref,".$db->pdate("p.date_commande")." as dp,p.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as p WHERE p.fk_soc = s.idp";
@ -87,7 +87,7 @@ class box_commandes extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_order',
'logo' => $this->boximg,
'text' => $objp->ref,
'url' => DOL_URL_ROOT."/commande/fiche.php?id=".$objp->rowid);

View File

@ -36,7 +36,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_external_rss extends ModeleBoxes {
var $boxcode="lastrssinfos";
var $boximg="rss";
var $boximg="object_rss";
var $boxlabel;
var $depends = array();
@ -64,7 +64,7 @@ class box_external_rss extends ModeleBoxes {
$langs->load("boxes");
for($site = 0; $site < 1; $site++) {
$this->info_box_head = array('text' => "Les $max dernières infos du site " . @constant("EXTERNAL_RSS_TITLE_". $site));
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastRssInfos",$max, @constant("EXTERNAL_RSS_TITLE_". $site)));
$rss = fetch_rss( @constant("EXTERNAL_RSS_URLRSS_" . $site) );
for($i = 0; $i < $max ; $i++){
@ -75,7 +75,7 @@ class box_external_rss extends ModeleBoxes {
$title=ereg_replace("^\s+","",$title); // Supprime espaces de début
$this->info_box_contents["$href"]="$title";
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_rss',
'logo' => $this->boximg,
'text' => $title,
'url' => $href);
}

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_factures extends ModeleBoxes {
var $boxcode="lastcustomerbills";
var $boximg="bill";
var $boximg="object_bill";
var $boxlabel;
var $depends = array("facture");
@ -63,7 +63,7 @@ class box_factures extends ModeleBoxes {
{
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max dernières factures clients enregistrées");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastCustomerBills",$max));
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f WHERE f.fk_soc = s.idp";
@ -87,7 +87,7 @@ class box_factures extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_bill',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);

View File

@ -34,7 +34,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_factures_fourn extends ModeleBoxes {
var $boxcode="lastsupplierbills";
var $boximg="bill";
var $boximg="object_bill";
var $boxlabel;
var $depends = array("facture","fournisseur");
@ -61,7 +61,7 @@ class box_factures_fourn extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max dernières factures fournisseurs enregistrées");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastSupplierBills",$max));
if ($user->rights->facture->lire)
{
@ -87,7 +87,7 @@ class box_factures_fourn extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_bill',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_factures_fourn_imp extends ModeleBoxes {
var $boxcode="oldestunpayedsupplierbills";
var $boximg="bill";
var $boximg="object_bill";
var $boxlabel;
var $depends = array("facture","fournisseur");
@ -48,7 +48,7 @@ class box_factures_fourn_imp extends ModeleBoxes {
global $langs;
$langs->load("boxes");
$this->boxlabel=$langs->trans("BoxOldesUnpayedSupplierBills");
$this->boxlabel=$langs->trans("BoxOldestUnpayedSupplierBills");
}
/**
@ -63,7 +63,7 @@ class box_factures_fourn_imp extends ModeleBoxes {
{
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max plus anciennes factures fournisseurs impayées");
$this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpayedSupplierBills",$max));
$sql = "SELECT s.nom,s.idp,f.facnumber,f.amount,".$db->pdate("f.datef")." as df,f.paye,f.rowid as facid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f WHERE f.fk_soc = s.idp AND f.paye=0 AND fk_statut = 1";
@ -86,7 +86,7 @@ class box_factures_fourn_imp extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_product',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'url' => DOL_URL_ROOT."/fourn/facture/fiche.php?facid=".$objp->facid);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_factures_imp extends ModeleBoxes {
var $boxcode="oldestunpayedcustomerbills";
var $boximg="bill";
var $boximg="object_bill";
var $boxlabel;
var $depends = array("facture");
@ -61,7 +61,7 @@ class box_factures_imp extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max plus anciennes factures clients impayées");
$this->info_box_head = array('text' => $langs->trans("BoxTitleOldestUnpayedCustomerBills",$max));
if ($user->rights->facture->lire)
{
@ -86,7 +86,7 @@ class box_factures_imp extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_bill',
'logo' => $this->boximg,
'text' => $objp->facnumber,
'url' => DOL_URL_ROOT."/compta/facture.php?facid=".$objp->facid);

View File

@ -32,7 +32,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_fournisseurs extends ModeleBoxes {
var $boxcode="lastsuppliers";
var $boximg="company";
var $boximg="object_company";
var $boxlabel;
var $depends = array("fournisseur");
@ -59,7 +59,7 @@ class box_fournisseurs extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max5 derniers fournisseurs enregistrés");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastSuppliers",$max));
$sql = "SELECT s.nom,s.idp";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s WHERE s.fournisseur = 1";
@ -83,7 +83,7 @@ class box_fournisseurs extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_company',
'logo' => $this->boximg,
'text' => $objp->nom,
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_osc_clients extends ModeleBoxes {
var $boxcode="nbofcustomers";
var $boximg="company";
var $boximg="object_company";
var $boxlabel;
var $depends = array("boutique");
@ -60,7 +60,7 @@ class box_osc_clients extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Nombre de client");
$this->info_box_head = array('text' => $langs->trans("BoxTitleNbOfCustomers",$max));
$sql = "SELECT count(*) as cus FROM ".DB_NAME_OSC.".customers";
@ -76,7 +76,7 @@ class box_osc_clients extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'center',
'logo' => 'object_product',
'logo' => $this->boximg,
'text' => $objp->cus,
'url' => DOL_URL_ROOT."/boutique/client/index.php");
$i++;

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_produits extends ModeleBoxes {
var $boxcode="lastproducts";
var $boximg="product";
var $boximg="object_product";
var $boxlabel;
var $depends = array("produit");
@ -61,7 +61,7 @@ class box_produits extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max derniers produits/services enregistrés");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastProducts",$max));
if ($user->rights->produit->lire)
{

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_propales extends ModeleBoxes {
var $boxcode="lastpropals";
var $boximg="propal";
var $boximg="object_propal";
var $boxlabel;
var $depends = array("propale");
@ -63,7 +63,7 @@ class box_propales extends ModeleBoxes {
{
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max dernières propositions");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastPropals",$max));
$sql = "SELECT s.nom,s.idp,p.ref,".$db->pdate("p.datep")." as dp,p.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."propal as p WHERE p.fk_soc = s.idp";
@ -87,7 +87,7 @@ class box_propales extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_propal',
'logo' => $this->boximg,
'text' => $objp->ref,
'url' => DOL_URL_ROOT."/comm/propal.php?propalid=".$objp->rowid);

View File

@ -34,7 +34,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_prospect extends ModeleBoxes {
var $boxcode="lastprospects";
var $boximg="company";
var $boximg="object_company";
var $boxlabel;
var $depends = array("commercial");
@ -61,7 +61,7 @@ class box_prospect extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max derniers prospects enregistrés");
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastProspects",$max));
$sql = "SELECT s.nom,s.idp";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s WHERE s.client = 2";
@ -85,7 +85,7 @@ class box_prospect extends ModeleBoxes {
$objp = $db->fetch_object($result);
$this->info_box_contents[$i][0] = array('align' => 'left',
'logo' => 'object_company',
'logo' => $this->boximg,
'text' => stripslashes($objp->nom),
'url' => DOL_URL_ROOT."/comm/prospect/fiche.php?id=".$objp->idp);

View File

@ -33,7 +33,7 @@ include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
class box_services_vendus extends ModeleBoxes {
var $boxcode="lastproductsincontract";
var $boximg="product";
var $boximg="object_product";
var $boxlabel;
var $depends = array("produit");
@ -60,7 +60,7 @@ class box_services_vendus extends ModeleBoxes {
global $user, $langs, $db;
$langs->load("boxes");
$this->info_box_head = array('text' => "Les $max derniers produits/services contractés");
$this->info_box_head = array('text' => $langs->trans("BoxLastProductsInContract",$max));
$sql = "SELECT s.nom, s.idp, p.label, p.fk_product_type, c.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c, ".MAIN_DB_PREFIX."product as p";

View File

@ -5,9 +5,24 @@ BoxLastProductsInContract=Last contracted products/services
BoxLastSupplierBills=Last supplier bills
BoxLastCustomerBills=Last customer bills
BoxOldestUnpayedCustomerBills=Oldest unpayed customer bills
BoxOldesUnpayedSupplierBills=Oldest unpayed supplier bills
BoxOldestUnpayedSupplierBills=Oldest unpayed supplier bills
BoxLastProposals=Last commercial proposals
BoxLastProspects=Last prospects
BoxLastCustomers=Last customers
BoxLastCustomerOrders=Last customer orders
BoxLastSuppliers=Last suppliers
BoxLastBooks=Last books
BoxTitleLastBooks=Last %s recorded books
BoxTitleNbOfCustomers=Nombre de client
BoxTitleLastRssInfos=Last %s news from %s
BoxTitleLastProducts=Last %s recorded products/services
BoxTitleLastCustomerOrders=Last %s customer orders
BoxTitleLastSuppliers=Last %s recorded suppliers
BoxTitleLastCustomers=Last %s recorded customers
BoxTitleLastPropals=Last %s recorded proposals
BoxTitleLastCustomerBills=Last %s customer bills
BoxTitleLastSupplierBills=Les %s supplier bills
BoxTitleLastProspects=Last %s recorded prospects
BoxTitleLastProductsInContract=Last %s derniers produits/services contractés
BoxTitleOldestUnpayedCustomerBills=Oldest %s unpayed customer bills
BoxTitleOldestUnpayedSupplierBills=Oldest %s unpayed supplier bills

View File

@ -5,9 +5,24 @@ BoxLastProductsInContract=Derniers produits/services contract
BoxLastSupplierBills=Dernières factures fournisseur
BoxLastCustomerBills=Dernières factures client
BoxOldestUnpayedCustomerBills=Plus anciennes factures client impayées
BoxOldesUnpayedSupplierBills=Plus anciennes factures fournisseur impayées
BoxOldestUnpayedSupplierBills=Plus anciennes factures fournisseur impayées
BoxLastProposals=Dernières propositions commerciales
BoxLastProspects=Derniers prospects
BoxLastCustomers=Derniers clients
BoxLastCustomerOrders=Dernières commandes
BoxLastSuppliers=Derniers fournisseurs
BoxLastBooks=Derniers livres
BoxTitleLastBooks=Les %s derniers ouvrages enregistrés
BoxTitleNbOfCustomers=Nombre de client
BoxTitleLastRssInfos=Les %s dernières infos de %s
BoxTitleLastProducts=Les %s derniers produits/services enregistrés
BoxTitleLastCustomerOrders=Les %s dernières commandes clients
BoxTitleLastSuppliers=Les %s derniers fournisseurs enregistrés
BoxTitleLastCustomers=Les %s derniers clients enregistrés
BoxTitleLastPropals=Les %s dernières propositions enregistrés
BoxTitleLastCustomerBills=Les %s dernières factures clients enregistrées
BoxTitleLastSupplierBills=Les %s dernières factures fournisseurs enregistrées
BoxTitleLastProspects=Les %s derniers prospects enregistrés
BoxTitleLastProductsInContract=Les %s derniers produits/services contractés
BoxTitleOldestUnpayedCustomerBills=Les %s plus anciennes factures clients impayées
BoxTitleOldestUnpayedSupplierBills=Les %s plus anciennes factures fournisseurs impayées