diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 16a1ef01bc5..d7258f0117c 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -575,7 +575,7 @@ class DolibarrModules // Can not be abstract, because we need to insta return $langs->trans("Module".$this->name."Name"); } - // Last change with simple product label + // Last chance with simple label return $langs->trans($this->name); } } @@ -606,6 +606,14 @@ class DolibarrModules // Can not be abstract, because we need to insta if ($val) $langs->load($val); } } + + if ($langs->trans("Module".$this->name."Desc") != ("Module".$this->name."Desc")) + { + // If module name translation exists + return $langs->trans("Module".$this->name."Desc"); + } + + // Last chance with simple label return $langs->trans($this->description); } } @@ -671,16 +679,27 @@ class DolibarrModules // Can not be abstract, because we need to insta */ function getDescLongReadmeFound() { + global $langs; + $filefound= false; // Define path to file README.md. - // First check README-la_LA.md then README.md + // First check README-la_LA.md then README-la.md then README.md $pathoffile = dol_buildpath(strtolower($this->name).'/README-'.$langs->defaultlang.'.md', 0); if (dol_is_file($pathoffile)) { $filefound = true; } if (! $filefound) + { + $tmp=explode('_', $langs->defaultlang); + $pathoffile = dol_buildpath(strtolower($this->name).'/README-'.$tmp[0].'.md', 0); + if (dol_is_file($pathoffile)) + { + $filefound = true; + } + } + if (! $filefound) { $pathoffile = dol_buildpath(strtolower($this->name).'/README.md', 0); if (dol_is_file($pathoffile)) diff --git a/htdocs/modulebuilder/template/admin/about.php b/htdocs/modulebuilder/template/admin/about.php index d492f72da79..c2adc8040d1 100644 --- a/htdocs/modulebuilder/template/admin/about.php +++ b/htdocs/modulebuilder/template/admin/about.php @@ -72,19 +72,13 @@ $page_name = "MyModuleAbout"; llxHeader('', $langs->trans($page_name)); // Subheader -$linkback = '' - . $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans($page_name), $linkback); +$linkback = '' . $langs->trans("BackToModuleList") . ''; + +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_mymodule@mymodule'); // Configuration header $head = mymoduleAdminPrepareHead(); -dol_fiche_head( - $head, - 'about', - $langs->trans("ModuleMyModuleName"), - 0, - 'mymodule@mymodule' -); +dol_fiche_head($head, 'about', '', 0, 'mymodule@mymodule'); dol_include_once('/mymodule/core/modules/modMyModule.class.php'); $tmpmodule = new modMyModule($db); diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index 46b608efa8e..c031e67a346 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -52,7 +52,7 @@ if (! $user->admin) accessforbidden(); // Parameters $action = GETPOST('action', 'alpha'); -$arrayofparameters=array('MYMODULE_MYPARAM1'=>'1', 'MYMODULE_MYPARAM2'=>'2'); +$arrayofparameters=array('MYMODULE_MYPARAM1'=>array('css'=>'minwidth200'), 'MYMODULE_MYPARAM2'=>array('css'=>'minwidth500')); /* @@ -72,17 +72,11 @@ llxHeader('', $langs->trans($page_name)); // Subheader $linkback = '' . $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans($page_name), $linkback); +print load_fiche_titre($langs->trans($page_name), $linkback, 'object_mymodule@mymodule'); // Configuration header $head = mymoduleAdminPrepareHead(); -dol_fiche_head( - $head, - 'settings', - $langs->trans("ModuleMyModuleName"), - -1, - "mymodule@mymodule" -); +dol_fiche_head($head, 'settings', '', -1, "mymodule@mymodule"); // Setup page goes here echo $langs->trans("MyModuleSetupPage"); @@ -101,7 +95,7 @@ if ($action == 'edit') { print '