From 812b1826800ed09a5a5e9757c8badded2e1e1aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 26 May 2018 16:35:29 +0200 Subject: [PATCH] loadlangs --- htdocs/adherents/card.php | 2 +- htdocs/compta/index.php | 2 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/index.php | 2 +- htdocs/ecm/index_auto.php | 2 +- htdocs/ecm/search.php | 2 +- htdocs/ftp/index.php | 6 ++--- htdocs/stripe/admin/stripe.php | 7 ++--- htdocs/stripe/charge.php | 7 ++--- htdocs/stripe/payment.php | 7 ++--- htdocs/stripe/transaction.php | 7 ++--- .../admin/supplier_proposal_extrafields.php | 5 ++-- .../supplier_proposaldet_extrafields.php | 5 ++-- htdocs/supplier_proposal/card.php | 11 ++------ htdocs/supplier_proposal/contact.php | 1 + htdocs/supplier_proposal/document.php | 5 ++-- htdocs/supplier_proposal/index.php | 4 +-- htdocs/supplier_proposal/info.php | 4 +-- htdocs/supplier_proposal/list.php | 9 ++----- htdocs/supplier_proposal/note.php | 6 ++--- htdocs/ticketsup/card.php | 2 +- htdocs/ticketsup/contact.php | 5 ++-- htdocs/ticketsup/document.php | 1 + htdocs/ticketsup/history.php | 6 ++--- htdocs/ticketsup/index.php | 6 ++--- htdocs/ticketsup/list.php | 2 +- htdocs/ticketsup/new.php | 6 ++--- htdocs/user/clicktodial.php | 26 +++++++++---------- 28 files changed, 57 insertions(+), 93 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 06eb0b2b40a..990c8349e33 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("companies","bills","members","users","other")); $action=GETPOST('action','alpha'); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 73b3ede941f..0416fa875e0 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -45,7 +45,7 @@ if (! empty($conf->tax->enabled)) //if (!$user->rights->compta->general->lire) // accessforbidden(); -// Load translation files required by page +// Load translation files required by the page $langs->loadLangs(array('compta', 'bills')); if (! empty($conf->commande->enabled)) $langs->load("orders"); diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index 4389543faa8..5dab56b29a0 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/htmlecm.form.class.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; -// Load traductions files +// Load translation files required by the page $langs->loadLangs(array("ecm","companies","other","users","orders","propal","bills","contracts","categories")); // Get parameters diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 5895cc9b793..ae11ebbd479 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; -// Load traductions files +// Load translation files required by the page $langs->loadLangs(array("ecm","companies","other","users","orders","propal","bills","contracts")); // Security check diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 19c607b1612..382312e4434 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; -// Load traductions files +// Load translation files required by the page $langs->loadLangs(array("ecm","companies","other","users","orders","propal","bills","contracts")); // Security check diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 8736de8a544..bbf4fbbec1c 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; -// Load traductions files +// Load translation files required by the page $langs->loadLangs(array("ecm","companies","other","users","orders","propal","bills","contracts")); // Security check diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index c9172bfd0c8..9881b89c6f1 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -27,10 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; -// Load traductions files -$langs->load("ftp"); -$langs->load("companies"); -$langs->load("other"); +// Load translation files required by the page +$langs->loadLangs(array('ftp', 'companies', 'other')); // Security check if ($user->societe_id) $socid=$user->societe_id; diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 62ca1000822..24224a4f18c 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -32,11 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $servicename='Stripe'; -$langs->load("admin"); -$langs->load("other"); -$langs->load("paypal"); -$langs->load("paybox"); -$langs->load("stripe"); +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'paypal', 'paybox', 'stripe')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index 90779d24962..1464c9c2e6b 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -27,11 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("compta"); -$langs->load("salaries"); -$langs->load("bills"); -$langs->load("hrm"); -$langs->load("stripe"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid","int"); diff --git a/htdocs/stripe/payment.php b/htdocs/stripe/payment.php index 68a695e2f33..b0d8da92ba5 100644 --- a/htdocs/stripe/payment.php +++ b/htdocs/stripe/payment.php @@ -39,11 +39,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; -$langs->load('companies'); -$langs->load('bills'); -$langs->load('banks'); -$langs->load('multicurrency'); -$langs->load('stripe@stripe'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills', 'banks', 'multicurrency', 'stripe')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm'); diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 28848106361..fc7ffa828e0 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -27,11 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -$langs->load("compta"); -$langs->load("salaries"); -$langs->load("bills"); -$langs->load("hrm"); -$langs->load("stripe"); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); // Security check $socid = GETPOST("socid","int"); diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index cea668cfae2..545d953e753 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -22,9 +22,8 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$langs->load("companies"); -$langs->load("admin"); -$langs->load('supplier_proposal'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'supplier_proposal')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index 41101ec7759..1acf85b45a3 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -29,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (!$user->admin) accessforbidden(); -$langs->load("admin"); -$langs->load("other"); -$langs->load("supplier_proposal"); + // Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'supplier_proposal')); $extrafields = new ExtraFields($db); $form = new Form($db); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 3ff366173fc..0eed393b157 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -46,15 +46,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; } -$langs->load('companies'); -$langs->load('supplier_proposal'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load('propal'); -$langs->load('orders'); -$langs->load('products'); -$langs->load("deliveries"); -$langs->load('sendings'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'supplier_proposal', 'compta', 'bills', 'propal', 'orders', 'products', 'deliveries', 'sendings')); if (! empty($conf->margin->enabled)) $langs->load('margins'); diff --git a/htdocs/supplier_proposal/contact.php b/htdocs/supplier_proposal/contact.php index 3773aab6f0c..fdf51406e8e 100644 --- a/htdocs/supplier_proposal/contact.php +++ b/htdocs/supplier_proposal/contact.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +// Load translation files required by the page $langs->loadLangs(array("propal","facture","orders","sendings","companies")); $id = GETPOST('id', 'int'); diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index 2be5dae222b..12de448829e 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } - -$langs->load('compta'); -$langs->load('other'); +// Load translation files required by the page +$langs->loadLangs(array('compta', 'other')); $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 17565e7f140..26880a7b350 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -27,8 +27,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT .'/supplier_proposal/class/supplier_proposal.class.php'; -$langs->load("supplier_proposal"); -$langs->load("companies"); +// Load translation files required by the page +$langs->loadLangs(array('supplier_proposal', 'companies')); // Security check $socid=GETPOST('socid','int'); diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index 9724e86b1d5..3f83b4dca88 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -32,8 +32,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } -$langs->load('supplier_proposal'); -$langs->load('compta'); +// Load translation files required by the page +$langs->loadLangs(array('supplier_proposal', 'compta')); $id=GETPOST('id','int'); $socid=GETPOST('socid','int'); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index aa5c7e70ab3..13359e7b446 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -42,13 +42,8 @@ require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->load('companies'); -$langs->load('propal'); -$langs->load('supplier_proposal'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load('orders'); -$langs->load('products'); +// Load translation files required by the page +$langs->loadLangs(array('companies', 'propal', 'supplier_proposal', 'compta', 'bills', 'orders', 'products')); $socid=GETPOST('socid','int'); diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 57c6fbed502..ba54859a207 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -32,10 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; } - -$langs->load('supplier_proposal'); -$langs->load('compta'); -$langs->load('bills'); +// Load translation files required by the page +$langs->loadLangs(array('supplier_proposal', 'compta', 'bills')); $id = GETPOST('id','int'); $ref=GETPOST('ref','alpha'); diff --git a/htdocs/ticketsup/card.php b/htdocs/ticketsup/card.php index 4b186867302..b89887f84e1 100644 --- a/htdocs/ticketsup/card.php +++ b/htdocs/ticketsup/card.php @@ -41,7 +41,7 @@ if (!empty($conf->contrat->enabled)) { include_once DOL_DOCUMENT_ROOT . '/core/class/html.formcontract.class.php'; } -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("companies","other","ticketsup")); // Get parameters diff --git a/htdocs/ticketsup/contact.php b/htdocs/ticketsup/contact.php index 7202cba8dd2..f6938b1a7fc 100644 --- a/htdocs/ticketsup/contact.php +++ b/htdocs/ticketsup/contact.php @@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT . "/core/lib/company.lib.php"; require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; -// Load traductions files requiredby by page -$langs->load("companies"); -$langs->load("ticketsup"); +// Load translation files required by page +$langs->loadLangs(array('companies', 'ticketsup')); // Get parameters $socid = GETPOST("socid", 'int'); diff --git a/htdocs/ticketsup/document.php b/htdocs/ticketsup/document.php index 3ec98fe1635..c6bc116dee4 100644 --- a/htdocs/ticketsup/document.php +++ b/htdocs/ticketsup/document.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT . "/core/lib/company.lib.php"; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; +// Load translation files required by page $langs->loadLangs(array("companies","other","ticketsup","mails")); $id = GETPOST('id', 'int'); diff --git a/htdocs/ticketsup/history.php b/htdocs/ticketsup/history.php index c6de1d7c3c6..da08574aa3f 100644 --- a/htdocs/ticketsup/history.php +++ b/htdocs/ticketsup/history.php @@ -33,10 +33,8 @@ if (!class_exists('Contact')) { include DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; } -// Load traductions files requiredby by page -$langs->load("companies"); -$langs->load("other"); -$langs->load("ticketsup"); +// Load translation files required by page +$langs->loadLangs(array('companies', 'other', 'ticketsup')); // Get parameters $id = GETPOST('id', 'int'); diff --git a/htdocs/ticketsup/index.php b/htdocs/ticketsup/index.php index 16c4fc15bf7..dfd2455e74a 100644 --- a/htdocs/ticketsup/index.php +++ b/htdocs/ticketsup/index.php @@ -25,10 +25,8 @@ require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/actions_ticketsup.class.php'; require_once DOL_DOCUMENT_ROOT . '/ticketsup/class/ticketsupstats.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php'; -// Load traductions files requiredby by page -$langs->load("companies"); -$langs->load("other"); -$langs->load("ticketsup"); +// Load translation files required by page +$langs->loadLangs(array('companies', 'other', 'ticketsup')); $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); diff --git a/htdocs/ticketsup/list.php b/htdocs/ticketsup/list.php index d2127fd875f..4a91b9cc4ac 100644 --- a/htdocs/ticketsup/list.php +++ b/htdocs/ticketsup/list.php @@ -32,7 +32,7 @@ include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; -// Load traductions files requiredby by page +// Load translation files required by the page $langs->loadLangs(array("ticketsup","companies","other","projects")); diff --git a/htdocs/ticketsup/new.php b/htdocs/ticketsup/new.php index 9fe7411186a..6ab7d5ee560 100644 --- a/htdocs/ticketsup/new.php +++ b/htdocs/ticketsup/new.php @@ -27,10 +27,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticketsup.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/ticketsup.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -// Load traductions files requiredby by page -$langs->load("companies"); -$langs->load("other"); -$langs->load("ticketsup"); +// Load translation files required by page +$langs->loadLangs(array('companies', 'other', 'ticketsup')); // Get parameters $id = GETPOST('id', 'int'); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 16c5b4e0e73..a4c4e90f99d 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -63,7 +63,7 @@ if (empty($reshook)) { $edituser->clicktodial_poste = GETPOST("poste"); $result = $edituser->update_clicktodial(); - if ($result < 0) + if ($result < 0) { setEventMessages($edituser->error, $edituser->errors, 'errors'); } @@ -92,11 +92,11 @@ if ($id > 0) $title = $langs->trans("User"); - + print '
'; print ''; print ''; - + dol_fiche_head($head, 'clicktodial', $title, -1, 'user'); $linkback = ''; @@ -104,17 +104,17 @@ if ($id > 0) if ($user->rights->user->user->lire || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } - + dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); - + print '
'; print '
'; - + // Edit mode if ($action == 'edit') { print ''; - + if ($user->admin) { print ''; @@ -177,15 +177,15 @@ if ($id > 0) print ''; print ''; print ""; - + print ''; print ''; print ''; - + print ''; print ''; print "\n"; - + print "
ClickToDial URL
ClickToDial '.$langs->trans("IdPhoneCaller").''.(! empty($object->clicktodial_poste)?$object->clicktodial_poste:'').'
ClickToDial '.$langs->trans("Login").''.(! empty($object->clicktodial_login)?$object->clicktodial_login:'').'
ClickToDial '.$langs->trans("Password").''.preg_replace('/./','*',(! empty($object->clicktodial_password)?$object->clicktodial_password:'')).'
\n"; } @@ -197,11 +197,11 @@ if ($id > 0) print '     '; print ''; print '
'; - } - + } + print ''; print '
'; - + /* * Barre d'actions */