From 8d967fb7a3a9a8285d2180cc5169a41639e65783 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 24 Oct 2023 08:36:36 +0200 Subject: [PATCH] refactor(form): factorize type name calls --- inc/entityconfig.class.php | 2 +- inc/form.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/entityconfig.class.php b/inc/entityconfig.class.php index 7ccbb19c2..d4563308a 100644 --- a/inc/entityconfig.class.php +++ b/inc/entityconfig.class.php @@ -81,7 +81,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { $tabNames = []; if (!$withtemplate) { if ($item->getType() == 'Entity') { - $tabNames[1] = _n('Form', 'Forms', 2, 'formcreator'); + $tabNames[1] = PluginFormcreatorForm::getTypeName(Session::getPluralNumber()); } } return $tabNames; diff --git a/inc/form.class.php b/inc/form.class.php index 4b2ceebb3..6ac380221 100644 --- a/inc/form.class.php +++ b/inc/form.class.php @@ -577,7 +577,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { ]; } if ($item->getType() == Central::class) { - return _n('Form', 'Forms', Session::getPluralNumber(), 'formcreator'); + return PluginFormcreatorForm::getTypeName(Session::getPluralNumber()); } return ''; } @@ -2029,7 +2029,7 @@ public function showForCentral() { echo ''; echo ''; - echo ''; + echo ''; echo ''; $currentCategoryId = -1;
' . _n('Form', 'Forms', 2, 'formcreator') . '' . PluginFormcreatorForm::getTypeName(Session::getPluralNumber()) . '