From e7acc2a59b165144d9cd07f0b6a17b21bec27ebc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Nov 2004 01:17:41 +0000 Subject: [PATCH] Trad: Traductions des onglets des fiches projets --- htdocs/projet/commandes.php | 70 ++++++++++++++++++++----------------- htdocs/projet/facture.php | 61 ++++++++++++++++++-------------- htdocs/projet/fiche.php | 7 ++-- htdocs/projet/index.php | 9 ++--- htdocs/projet/pre.inc.php | 9 +++-- htdocs/projet/propal.php | 63 ++++++++++++++++++--------------- 6 files changed, 120 insertions(+), 99 deletions(-) diff --git a/htdocs/projet/commandes.php b/htdocs/projet/commandes.php index 175d7de79c7..cc3d90aa5ba 100644 --- a/htdocs/projet/commandes.php +++ b/htdocs/projet/commandes.php @@ -32,47 +32,53 @@ require("../propal.class.php"); require("../facture.class.php"); require("../commande/commande.class.php"); +$langs->load("projects"); +$langs->load("companies"); + llxHeader("","../"); $projet = new Project($db); $projet->fetch($_GET["id"]); - $h=0; - $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; - $head[$h][1] = 'Fiche projet'; - $h++; - - if ($conf->propal->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; - $head[$h][1] = 'Prop. Commerciales'; - $h++; - } +$h=0; +$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; +$head[$h][1] = $langs->trans("Project"); +$h++; - if ($conf->commande->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; - $head[$h][1] = 'Commandes'; - $hselected=$h; - $h++; - } - - if ($conf->facture->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; - $head[$h][1] = 'Factures'; - $h++; - } +if ($conf->propal->enabled) { + $langs->load("propal"); + $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Proposals"); + $h++; +} + +if ($conf->commande->enabled) { + $langs->load("orders"); + $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Orders"); + $hselected=$h; + $h++; +} + +if ($conf->facture->enabled) { + $langs->load("bills"); + $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Bills"); + $h++; +} dolibarr_fiche_head($head, $hselected); + /* - * * * */ $projet->societe->fetch($projet->societe->id); -print ''; -print ''; +print '
Titre'.$projet->title.'
'; +print ''; print ''; -print ''; +print ''; print '
'.$langs->trans("Title").''.$projet->title.''.$langs->trans("Ref").''.$projet->ref.'
Société'.$projet->societe->nom.'
'.$langs->trans("Company").''.$projet->societe->nom.'

'; /* @@ -84,10 +90,10 @@ $total = 0 ; if (sizeof($commandes)>0 && is_array($commandes)) { print_titre('Listes des commandes associées au projet'); - print ''; + print '
'; - print ''; - print ''; + print ''; + print ''; for ($i = 0; $i0 && is_array($commandes)) $commande->fetch($commandes[$i]); $var=!$var; - print ""; - print "\n"; + print ""; + print "\n"; print ''; - print ''; + print ''; $total = $total + $commande->total_ht; } diff --git a/htdocs/projet/facture.php b/htdocs/projet/facture.php index 64ea358762d..4f45781a968 100644 --- a/htdocs/projet/facture.php +++ b/htdocs/projet/facture.php @@ -32,6 +32,10 @@ require("../propal.class.php"); require("../facture.class.php"); require("../commande/commande.class.php"); +$langs->load("projects"); +$langs->load("companies"); + + $user->getrights('projet'); if (!$user->rights->projet->lire) @@ -42,42 +46,45 @@ llxHeader("","../"); $projet = new Project($db); $projet->fetch($_GET["id"]); - $h=0; - $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; - $head[$h][1] = 'Fiche projet'; - $h++; - - if ($conf->propal->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; - $head[$h][1] = 'Prop. Commerciales'; - $h++; - } +$h=0; +$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; +$head[$h][1] = $langs->trans("Project"); +$h++; - if ($conf->commande->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; - $head[$h][1] = 'Commandes'; - $h++; - } - - if ($conf->facture->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; - $head[$h][1] = 'Factures'; - $hselected=$h; - $h++; - } +if ($conf->propal->enabled) { + $langs->load("propal"); + $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Proposals"); + $h++; +} + +if ($conf->commande->enabled) { + $langs->load("orders"); + $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Orders"); + $h++; +} + +if ($conf->facture->enabled) { + $langs->load("bills"); + $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Bills"); + $hselected=$h; + $h++; +} dolibarr_fiche_head($head, $hselected); + /* - * * * */ $projet->societe->fetch($projet->societe->id); -print '
'.$langs->trans("Ref").'DateMontant 
'.$langs->trans("Ref").'Date'.$langs->trans("Amount").' 
id\">$commande->ref
id\">$commande->ref'.strftime("%d %B %Y",$commande->date).''.price($commande->total_ht).' 
'.price($commande->total_ht).' 
'; -print ''; +print '
Titre'.$projet->title.'
'; +print ''; print ''; -print ''; +print ''; print '
'.$langs->trans("Title").''.$projet->title.''.$langs->trans("Ref").''.$projet->ref.'
Société'.$projet->societe->nom.'
'.$langs->trans("Company").''.$projet->societe->nom.'

'; @@ -90,7 +97,7 @@ print '
'; if (sizeof($factures)>0 && is_array($factures)) { print_titre('Listes des factures associées au projet'); - print ''; + print '
'; print ''; print ''; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 17f40258b81..4432a628486 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -122,23 +122,26 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer) $h=0; $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; - $head[$h][1] = 'Fiche projet'; + $head[$h][1] = $langs->trans("Project"); $hselected=$h; $h++; if ($conf->propal->enabled) { + $langs->load("propal"); $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; - $head[$h][1] = 'Prop. Commerciales'; + $head[$h][1] = $langs->trans("Proposals"); $h++; } if ($conf->commande->enabled) { + $langs->load("orders"); $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; $head[$h][1] = $langs->trans("Orders"); $h++; } if ($conf->facture->enabled) { + $langs->load("bills"); $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; $head[$h][1] = $langs->trans("Bills"); $h++; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 93dcfd3d489..885dc47cf33 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -40,9 +40,9 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } -llxHeader("","Liste des Projets","Projet"); +llxHeader("",$langs->trans("Projects"),"Projet"); -print_titre("Projets"); +print_titre($langs->trans("Projects")); /* * @@ -76,7 +76,7 @@ print '
'.$langs->trans("Ref").'DateMontant 
'; print ''; print_liste_field_titre($langs->trans("Title"),"index.php","p.title"); print ''; -print_liste_field_titre("Société","index.php","s.nom"); +print_liste_field_titre($langs->trans("Company"),"index.php","s.nom"); print "\n"; $sql = "SELECT s.nom, s.idp, p.rowid as projectid, p.ref, p.title, s.client,".$db->pdate("p.dateo")." as do"; @@ -120,11 +120,12 @@ if ( $db->query($sql) ) } else { - print $db->error(); + dolibarr_print_error($db); } print "
'.$langs->trans("Ref").'
"; $db->close(); + llxFooter("Dernière modification $Date$ révision $Revision$"); ?> diff --git a/htdocs/projet/pre.inc.php b/htdocs/projet/pre.inc.php index 55920063340..043af49511b 100644 --- a/htdocs/projet/pre.inc.php +++ b/htdocs/projet/pre.inc.php @@ -29,17 +29,16 @@ require ("../main.inc.php"); require("./project.class.php"); + function llxHeader($head = "", $title="", $help_url='') { - /* - * - * - */ + global $langs; + top_menu($head, $title); $menu = new Menu(); - $menu->add(DOL_URL_ROOT."/projet/", "Projets"); + $menu->add(DOL_URL_ROOT."/projet/", $langs->trans("Projects")); left_menu($menu->liste, $help_url); } diff --git a/htdocs/projet/propal.php b/htdocs/projet/propal.php index f9e56d96997..d6083d4103c 100644 --- a/htdocs/projet/propal.php +++ b/htdocs/projet/propal.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,50 +32,54 @@ require("../propal.class.php"); require("../facture.class.php"); require("../commande/commande.class.php"); +$langs->load("projects"); +$langs->load("companies"); llxHeader("","../"); $projet = new Project($db); $projet->fetch($_GET["id"]); - $h=0; - $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; - $head[$h][1] = 'Fiche projet'; - $h++; - - if ($conf->propal->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; - $head[$h][1] = 'Prop. Commerciales'; - $hselected=$h; - $h++; - } +$h=0; +$head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; +$head[$h][1] = $langs->trans("Project"); +$h++; - if ($conf->commande->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; - $head[$h][1] = 'Commandes'; - $h++; - } - - if ($conf->facture->enabled) { - $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; - $head[$h][1] = 'Factures'; - $h++; - } +if ($conf->propal->enabled) { + $langs->load("propal"); + $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Proposals"); + $hselected=$h; + $h++; +} + +if ($conf->commande->enabled) { + $langs->load("orders"); + $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Orders"); + $h++; +} + +if ($conf->facture->enabled) { + $langs->load("bills"); + $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; + $head[$h][1] = $langs->trans("Bills"); + $h++; +} dolibarr_fiche_head($head, $hselected); + /* - * - * * */ $propales = array(); $projet->societe->fetch($projet->societe->id); -print ''; -print ''; +print '
Titre'.$projet->title.'
'; +print ''; print ''; -print ''; +print ''; print '
'.$langs->trans("Title").''.$projet->title.''.$langs->trans("Ref").''.$projet->ref.'
Société'.$projet->societe->nom.'
'.$langs->trans("Company").''.$projet->societe->nom.'

'; $propales = $projet->get_propal_list(); @@ -82,10 +87,10 @@ $propales = $projet->get_propal_list(); if (sizeof($propales)>0 && is_array($propales)) { print_titre('Listes des propositions commerciales associées au projet'); - print ''; + print '
'; print ''; - print ''; + print ''; for ($i = 0; $i
'.$langs->trans("Ref").'DateMontant 
'.$langs->trans("Ref").''.$langs->trans("Date").''.$langs->trans("Amount").'