From 4feed15c57cd62b60f6eea4915d6751d2a0c7751 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 6 Oct 2011 11:04:56 +0200 Subject: [PATCH 1/6] Trad: Add translation for dictionaries admin page --- htdocs/admin/dict.php | 66 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 14926154b2851..88cce17f22395 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2011 Philippe Grand * * This program is free software; you can redistribute it and/or modify @@ -41,8 +41,8 @@ $acts[1] = "disable"; //$actl[0] = $langs->trans("Activate"); //$actl[1] = $langs->trans("Disable"); -$actl[0] = img_picto($langs->trans("Disabled"),'off'); -$actl[1] = img_picto($langs->trans("Activated"),'on'); +$actl[0] = img_picto($langs->trans("Disabled"),'switch_off'); +$actl[1] = img_picto($langs->trans("Activated"),'switch_on'); $listoffset=GETPOST('listoffset'); $listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000; @@ -122,7 +122,7 @@ $tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent"; //$tabsql[9] = "SELECT code, code_iso, label as libelle, symbole, active FROM ".MAIN_DB_PREFIX."c_currencies"; $tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies"; -$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active, t.accountancy_code FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; +$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active, t.accountancy_code FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; $tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; $tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c"; @@ -780,12 +780,68 @@ $valuetoshow=price($valuetoshow); } else if ($fieldlist[$field]=='libelle_facture') { + $langs->load("bills"); + $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; $valuetoshow=nl2br($valuetoshow); } - else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]=='llx_c_pays') { + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_pays') { $key=$langs->trans("Country".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; } + else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_availability') { + $langs->load("propal"); + $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_actioncomm') { + $key=$langs->trans("Action".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_currencies') { + $key=$langs->trans("Currency".strtoupper($obj->code_iso)); + $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_typent') { + $key=$langs->trans(strtoupper($obj->code)); + $valuetoshow=($key != strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_prospectlevel') { + $key=$langs->trans(strtoupper($obj->code)); + $valuetoshow=($key != strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_civilite') { + $key=$langs->trans("Civility".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_type_contact') { + $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_payment_term') { + $langs->load("bills"); + $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_paiement') { + $langs->load("bills"); + $key=$langs->trans("PaymentType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_input_reason') { + $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_input_method') { + $langs->load("orders"); + $key=$langs->trans($obj->code); + $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_shipment_mode') { + $langs->load("sendings"); + $key=$langs->trans("SendingMethod".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code))?$key:$obj->$fieldlist[$field]; + } else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $showfield=0; } From af09be16741a1b0a510ad2bc696dcf9e2168de3d Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 6 Oct 2011 11:54:36 +0200 Subject: [PATCH 2/6] Fix: Missing translation --- htdocs/product/fournisseurs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index a3b9ccfc9d88f..2f7c4749d5732 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -292,6 +292,7 @@ // Availability if(!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) { + $langs->load("propal"); print ''.$langs->trans("Availability").''; $html->select_availability($product->fk_availability,"oselDispo",1); print ''."\n"; From a74bdae666b88e872f350ec527383d06e8c14976 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2011 00:53:27 +0800 Subject: [PATCH 3/6] Fix: add parameters for external modules --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 4d842d78c6d95..ed47ad963f6b4 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -439,7 +439,7 @@ function showdocuments($modulepart,$filename,$filedir,$urlsource,$genallowed,$de $out.= ''; // Execute hooks - $parameters=array('socid'=>$GLOBALS['socid'],'id'=>$GLOBALS['id']); + $parameters=array('socid'=>$GLOBALS['socid'],'id'=>$GLOBALS['id'],'modulepart'=>$modulepart); if (is_object($hookmanager)) $out.= $hookmanager->executeHooks('formBuilddocOptions',$parameters); } From b0b3d5553d49cda4c17ac158c560d003585c8615 Mon Sep 17 00:00:00 2001 From: eldy Date: Fri, 7 Oct 2011 01:35:46 +0200 Subject: [PATCH 4/6] Fix: Update italy vat rate --- htdocs/install/mysql/data/llx_c_tva.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index ec829fdd81d70..e56d152446009 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -96,7 +96,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (11 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1163, 116, '0','0','VAT rate 0',1); -- ITALY (id country=3) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '20','0','VAT standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 31, 3, '21','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 32, 3, '10','0','VAT reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 33, 3, '4','0','VAT super-reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '0','0','VAT Rate 0',1); From 74bf80a74aecbc264675d188197b882d7ab92286 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2011 23:35:44 +0800 Subject: [PATCH 5/6] Fix: check is cheque in England --- htdocs/langs/en_GB/banks.lang | 11 +++++++++++ htdocs/langs/en_GB/bills.lang | 3 +++ htdocs/langs/en_GB/compta.lang | 5 +++++ 3 files changed, 19 insertions(+) create mode 100644 htdocs/langs/en_GB/banks.lang create mode 100644 htdocs/langs/en_GB/bills.lang create mode 100644 htdocs/langs/en_GB/compta.lang diff --git a/htdocs/langs/en_GB/banks.lang b/htdocs/langs/en_GB/banks.lang new file mode 100644 index 0000000000000..974e1335a09df --- /dev/null +++ b/htdocs/langs/en_GB/banks.lang @@ -0,0 +1,11 @@ +# Dolibarr language file - en_GB - main +CHARSET=UTF-8 +ValidateCheckReceipt=Validate this cheque receipt ? +ConfirmValidateCheckReceipt=Are you sure you want to validate this cheque receipt, no change will be possible once this is done ? +DeleteCheckReceipt=Delete this cheque receipt ? +ConfirmDeleteCheckReceipt=Are you sure you want to delete this cheque receipt ? +BankChecks=Bank cheques +BankChecksToReceipt=Cheques waiting for deposit +ShowCheckReceipt=Show cheque deposit receipt +NumberOfCheques=Nb of cheque +SelectChequeTransactionAndGenerate=Select/filter cheques to include into the cheque deposit receipt and click on "Create". \ No newline at end of file diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang new file mode 100644 index 0000000000000..4bccc5d3a55a6 --- /dev/null +++ b/htdocs/langs/en_GB/bills.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - en_GB - main +CHARSET=UTF-8 +PrettyLittleSentence=Accept the amount of payments due by cheques issued in my name as a Member of an accounting association approved by the Fiscal Administration. \ No newline at end of file diff --git a/htdocs/langs/en_GB/compta.lang b/htdocs/langs/en_GB/compta.lang new file mode 100644 index 0000000000000..bee486b9cb4b2 --- /dev/null +++ b/htdocs/langs/en_GB/compta.lang @@ -0,0 +1,5 @@ +# Dolibarr language file - en_GB - main +CHARSET=UTF-8 +NewCheckDeposit=New cheque deposit +NoWaitingChecks=No cheques waiting for deposit. +NbOfCheques=Nb of cheques \ No newline at end of file From 4dde3ced96050c3b040cf375e1b165a481a34b1b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 7 Oct 2011 19:33:31 +0200 Subject: [PATCH 6/6] Fix: merge problem --- htdocs/langs/en_GB/bills.lang | 17 ++++++++++++++++- htdocs/langs/en_GB/compta.lang | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang index 4bccc5d3a55a6..e35defcb4b885 100644 --- a/htdocs/langs/en_GB/bills.lang +++ b/htdocs/langs/en_GB/bills.lang @@ -1,3 +1,18 @@ # Dolibarr language file - en_GB - main CHARSET=UTF-8 -PrettyLittleSentence=Accept the amount of payments due by cheques issued in my name as a Member of an accounting association approved by the Fiscal Administration. \ No newline at end of file +PrettyLittleSentence=Accept the amount of payments due by cheques issued in my name as a Member of an accounting association approved by the Fiscal Administration. +PaymentTypeCHQ=Cheque +PaymentTypeShortCHQ=Cheque +ChequeNumber=Cheque N° +ChequeOrTransferNumber=Cheque/Transfer N° +ChequeMaker=Cheque transmitter +ChequeBank=Bank of Cheque +PaymentByChequeOrderedTo=Cheque payment (including tax) are payable to %s send to +PaymentByChequeOrderedToShort=Cheque payment (including tax) are payable to +MenuChequeDeposits=Cheques deposits +MenuCheques=Cheques +MenuChequesReceipts=Cheques receipts +ChequesReceipts=Cheques receipts +ChequesArea=Cheques deposits area +ChequeDeposits=Cheques deposits +Cheques=Cheques \ No newline at end of file diff --git a/htdocs/langs/en_GB/compta.lang b/htdocs/langs/en_GB/compta.lang index bee486b9cb4b2..bb96d93537c67 100644 --- a/htdocs/langs/en_GB/compta.lang +++ b/htdocs/langs/en_GB/compta.lang @@ -1,5 +1,8 @@ # Dolibarr language file - en_GB - main CHARSET=UTF-8 +CheckReceipt=Cheque deposit +CheckReceiptShort=Cheque deposit NewCheckDeposit=New cheque deposit NoWaitingChecks=No cheques waiting for deposit. +DateChequeReceived=Cheque reception date NbOfCheques=Nb of cheques \ No newline at end of file