Skip to content

Commit 1ae67b1

Browse files
committed
refactor(form): factorize type name calls
1 parent b3563d2 commit 1ae67b1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

inc/entityconfig.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
8181
$tabNames = [];
8282
if (!$withtemplate) {
8383
if ($item->getType() == 'Entity') {
84-
$tabNames[1] = _n('Form', 'Forms', 2, 'formcreator');
84+
$tabNames[1] = PluginFormcreatorForm::getTypeName(Session::getPluralNumber());
8585
}
8686
}
8787
return $tabNames;

inc/form.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
577577
];
578578
}
579579
if ($item->getType() == Central::class) {
580-
return _n('Form', 'Forms', Session::getPluralNumber(), 'formcreator');
580+
return PluginFormcreatorForm::getTypeName(Session::getPluralNumber());
581581
}
582582
return '';
583583
}
@@ -2029,7 +2029,7 @@ public function showForCentral() {
20292029

20302030
echo '<table class="tab_cadrehov" id="plugin_formcreatorHomepageForms">';
20312031
echo '<tr class="noHover">';
2032-
echo '<th><a href="' . FORMCREATOR_ROOTDOC . '/front/formlist.php">' . _n('Form', 'Forms', 2, 'formcreator') . '</a></th>';
2032+
echo '<th><a href="' . FORMCREATOR_ROOTDOC . '/front/formlist.php">' . PluginFormcreatorForm::getTypeName(Session::getPluralNumber()) . '</a></th>';
20332033
echo '</tr>';
20342034

20352035
$currentCategoryId = -1;

0 commit comments

Comments
 (0)