From 96e798526691c333a49e71dfe20ef12c63e0f0a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Feb 2014 02:27:13 +0100 Subject: [PATCH] Fix: Translation of menu entries must not be into admin lang file (We don't want to load this file for common pages). --- htdocs/core/modules/modBarcode.class.php | 2 +- htdocs/core/modules/modProduct.class.php | 2 +- htdocs/core/modules/modService.class.php | 2 +- htdocs/langs/en_US/admin.lang | 4 ---- htdocs/langs/en_US/products.lang | 4 ++++ 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/modules/modBarcode.class.php b/htdocs/core/modules/modBarcode.class.php index 92b237236cb..bbc16750dd6 100644 --- a/htdocs/core/modules/modBarcode.class.php +++ b/htdocs/core/modules/modBarcode.class.php @@ -114,7 +114,7 @@ class modBarcode extends DolibarrModules 'type'=>'left', // This is a Left menu entry 'titre'=>'MassBarcodeInit', 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=modulesadmintools', - 'langs'=>'barcode', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>300, 'enabled'=>'$conf->barcode->enabled && $leftmenu=="modulesadmintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index fed630a40a2..b9185624209 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -135,7 +135,7 @@ class modProduct extends DolibarrModules 'type'=>'left', // This is a Left menu entry 'titre'=>'ProductVatMassChange', 'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools', - 'langs'=>'admin', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>300, 'enabled'=>'$conf->product->enabled && $leftmenu=="modulesadmintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 780a32ad45c..695ff596e6e 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -120,7 +120,7 @@ class modService extends DolibarrModules 'type'=>'left', // This is a Left menu entry 'titre'=>'ProductVatMassChange', 'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools', - 'langs'=>'admin', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>300, 'enabled'=>'$conf->product->enabled && $leftmenu=="modulesadmintools"', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6d00a3d89bc..a7bf4b21b18 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -345,10 +345,6 @@ SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL ButtonHideUnauthorized=Hide buttons for unauthorized actions instead of showing disabled buttons -ProductVatMassChange=Mass VAT change -ProductVatMassChangeDesc=This page can be used to modify a VAT rate defined on products or services from a value to another. Warning, this change is done on all database. -MassBarcodeInit=Mass barcode init -MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. OldVATRates=Old VAT rate NewVATRates=New VAT rate PriceBaseTypeToChange=Modify on prices with base reference value defined on diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index abe1ee6ec3d..fa3144d0475 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -13,6 +13,10 @@ NewProduct=New product NewService=New service ProductCode=Product code ServiceCode=Service code +ProductVatMassChange=Mass VAT change +ProductVatMassChangeDesc=This page can be used to modify a VAT rate defined on products or services from a value to another. Warning, this change is done on all database. +MassBarcodeInit=Mass barcode init +MassBarcodeInitDesc=This page can be used to initialize a barcode on objects that does not have barcode defined. Check before that setup of module barcode is complete. ProductAccountancyBuyCode=Accountancy code (buy) ProductAccountancySellCode=Accountancy code (sell) ProductOrService=Product or Service