diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index b0f51e442c6..45e69448f43 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -296,9 +296,6 @@ if ($result) print ''; print ''; print ''; - print ''; - print ''; - print ''; print ''; print $langs->trans('Month').': '; print ' '.$langs->trans('Year').': '; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index ffa06230d20..a4830ebe0a9 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -784,6 +784,16 @@ class Translate return -1; } } + + function get_translations_for_substitutions() { + $substitutionarray = array(); + + foreach($this->tab_translate as $code => $label) { + $substitutionarray['lang_'.$code] = $label; + } + + return $substitutionarray; + } } ?> diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index b4c115bbac2..e195e55e214 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_order_odt extends ModelePDFCommandes $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_escompte = 0; // Affiche si il y a eu escompte $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text @@ -534,6 +534,18 @@ class doc_generic_order_odt extends ModelePDFCommandes dol_syslog($this->error, LOG_WARNING); return -1; } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index a5b975430d3..73571a65646 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_escompte = 0; // Affiche si il y a eu escompte $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text @@ -534,6 +534,18 @@ class doc_generic_shipment_odt extends ModelePdfExpedition dol_syslog($this->error, LOG_WARNING); return -1; } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 1f0120c2074..084dee16402 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_escompte = 0; // Affiche si il y a eu escompte $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text @@ -514,6 +514,18 @@ class doc_generic_invoice_odt extends ModelePDFFactures dol_syslog($this->error, LOG_WARNING); return -1; } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index bb1252d7dc9..3e0b9c93fb4 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -90,7 +90,7 @@ class doc_generic_project_odt extends ModelePDFProjects $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_escompte = 0; // Affiche si il y a eu escompte $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text @@ -976,6 +976,18 @@ class doc_generic_project_odt extends ModelePDFProjects dol_syslog($this->error, LOG_WARNING); return -1; } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 45c4d6e9755..7843cf8e057 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -74,7 +74,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $this->option_modereg = 0; // Affiche mode reglement $this->option_condreg = 0; // Affiche conditions reglement $this->option_codeproduitservice = 0; // Affiche code produit-service - $this->option_multilang = 0; // Dispo en plusieurs langues + $this->option_multilang = 1; // Dispo en plusieurs langues $this->option_escompte = 0; // Affiche si il y a eu escompte $this->option_credit_note = 0; // Support credit notes $this->option_freetext = 1; // Support add of a personalised text @@ -487,6 +487,18 @@ class doc_generic_proposal_odt extends ModelePDFPropales dol_syslog($this->error, LOG_WARNING); return -1; } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index d1f06c6f9ec..1259177432f 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -318,6 +318,18 @@ class doc_generic_odt extends ModeleThirdPartyDoc // setVars failed, probably because key not found } } + + // Replace labels translated + $tmparray=$outputlangs->get_translations_for_substitutions(); + foreach($tmparray as $key=>$value) + { + try { + $odfHandler->setVars($key, $value, true, 'UTF-8'); + } + catch(OdfException $e) + { + } + } // Call the beforeODTSave hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index 661ac882adf..e877f8e4b41 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -79,10 +79,10 @@ ProductsCategoryShort=Catégorie produits MembersCategoryShort=Catégorie adhérent SuppliersCategoriesShort=Catégories fournisseurs CustomersCategoriesShort=Catégories clients -CustomersProspectsCategoriesShort=Catégories clients/prospects +CustomersProspectsCategoriesShort=Catégories clients/prosp. ProductsCategoriesShort=Catégories produits MembersCategoriesShort=Catégories adhérents -ContactCategoriesShort=Catégorie Contacts +ContactCategoriesShort=Catégories contacts ThisCategoryHasNoProduct=Cette catégorie ne contient aucun produit. ThisCategoryHasNoSupplier=Cette catégorie ne contient aucun fournisseur. ThisCategoryHasNoCustomer=Cette catégorie ne contient aucun client. diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml index a5cb4d96a99..e880ef1f5ad 100755 --- a/test/soapui/Dolibarr-soapui-project.xml +++ b/test/soapui/Dolibarr-soapui-project.xml @@ -1,4 +1,4 @@ - + http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl @@ -757,211 +757,211 @@ all -]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WS to get product or service - - - - - WS to create a product or service - - - - - WS to update a product or service - - - - - WS to get list of all products or services id and ref - - - - - WS to get list of all products or services for a category - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WS to get product or service + + + + + WS to create a product or service + + + + + WS to update a product or service + + + + + WS to get list of all products or services id and ref + + + + + WS to get list of all products or services for a category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarr/htdocs/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.php<xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php @@ -1127,57 +1127,57 @@ 5 -]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php - - - - - - dolibarrkey - aaa - admin - admin - - - - - 1 - - 111 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php + + + + + + dolibarrkey + aaa + admin + admin + + + + + 1 + + 111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]>http://localhostdolibarr/webservices/server_user.php?wsdl