diff --git a/inc/abstractitiltarget.class.php b/inc/abstractitiltarget.class.php
index 81eb21609..50e91c11d 100644
--- a/inc/abstractitiltarget.class.php
+++ b/inc/abstractitiltarget.class.php
@@ -949,7 +949,7 @@ protected function showOLASettings() {
protected function showCategorySettings($rand) {
echo '
';
- echo '' . __('Category', 'formcreator') . ' | ';
+ echo '' . PluginFormcreatorCategory::getTypeName(1) . ' | ';
echo '';
Dropdown::showFromArray(
'category_rule',
@@ -963,8 +963,8 @@ protected function showCategorySettings($rand) {
echo Html::scriptBlock("plugin_formcreator_changeCategory($rand);");
echo ' | ';
echo '';
- echo '' . __('Category', 'formcreator') . '';
- echo '' . __('Question', 'formcreator') . '';
+ echo '' . PluginFormcreatorCategory::getTypeName(1) . '';
+ echo '' . PluginFormcreatorQuestion::getTypeName(1) . '';
echo ' | ';
echo '';
echo ' ';
@@ -1001,7 +1001,7 @@ protected function showUrgencySettings($rand) {
echo Html::scriptBlock("plugin_formcreator_changeUrgency($rand);");
echo ' | ';
echo '';
- echo '' . __('Question', 'formcreator') . '';
+ echo '' . PluginFormcreatorQuestion::getTypeName(1) . '';
echo '' . __('Urgency ', 'formcreator') . '';
echo ' | ';
echo '';
@@ -1210,7 +1210,7 @@ protected function showLocationSettings($rand) {
echo Html::scriptBlock("plugin_formcreator_change_location($rand)");
echo ' | ';
echo '';
- echo '' . __('Question', 'formcreator') . '';
+ echo '' . PluginFormcreatorQuestion::getTypeName(1) . '';
echo '' . __('Location ', 'formcreator') . '';
echo ' | ';
echo '';
@@ -1291,7 +1291,7 @@ protected function showValidationSettings($rand) {
$display = $validation_rule == self::COMMONITIL_VALIDATION_RULE_ANSWER_USER || $validation_rule == self::COMMONITIL_VALIDATION_RULE_ANSWER_GROUP ? "" : "display: none";
echo "";
- echo __('Question', 'formcreator');
+ echo PluginFormcreatorQuestion::getTypeName(1);
echo "";
echo ' | ';
diff --git a/inc/entityconfig.class.php b/inc/entityconfig.class.php
index a34a85b30..829fdaa3e 100644
--- a/inc/entityconfig.class.php
+++ b/inc/entityconfig.class.php
@@ -472,7 +472,7 @@ public function rawSearchOptions() {
$tab[] = [
'id' => '8',
'table' => self::getTable(),
- 'name' => __('Header', 'formcreator'),
+ 'name' => _n('Header', 'Headers', 1, 'formcreator'),
'field' => 'header',
'datatype' => 'text',
'nosearch' => true,
diff --git a/inc/field/dropdownfield.class.php b/inc/field/dropdownfield.class.php
index f95100022..4728a48db 100644
--- a/inc/field/dropdownfield.class.php
+++ b/inc/field/dropdownfield.class.php
@@ -68,8 +68,8 @@ class DropdownField extends PluginFormcreatorAbstractField
public function getEnumEntityRestriction() {
return [
- self::ENTITY_RESTRICT_USER => __('User', 'formcreator'),
- self::ENTITY_RESTRICT_FORM => __('Form', 'formcreator'),
+ self::ENTITY_RESTRICT_USER => User::getTypeName(1),
+ self::ENTITY_RESTRICT_FORM => PluginFormcreatorForm::getTypeName(1),
self::ENTITY_RESTRICT_BOTH => __('User and form', 'formcreator'),
];
}
diff --git a/inc/filter/entityfilter.class.php b/inc/filter/entityfilter.class.php
index 250f5bbea..6e5d47f66 100644
--- a/inc/filter/entityfilter.class.php
+++ b/inc/filter/entityfilter.class.php
@@ -41,8 +41,8 @@ class EntityFilter
public static function getEnumEntityRestriction() {
return [
- self::ENTITY_RESTRICT_USER => __('User', 'formcreator'),
- self::ENTITY_RESTRICT_FORM => __('Form', 'formcreator'),
+ self::ENTITY_RESTRICT_USER => User::getTypeName(1),
+ self::ENTITY_RESTRICT_FORM => PluginFormcreatorForm::getTypeName(1),
self::ENTITY_RESTRICT_BOTH => __('User and form', 'formcreator'),
];
}
diff --git a/inc/form.class.php b/inc/form.class.php
index 5aa73af01..2f13de9f1 100644
--- a/inc/form.class.php
+++ b/inc/form.class.php
@@ -171,7 +171,7 @@ public function rawSearchOptions() {
'id' => '5',
'table' => 'glpi_entities',
'field' => 'completename',
- 'name' => __('Entity'),
+ 'name' => Entity::getTypeName(1),
'datatype' => 'dropdown',
'massiveaction' => false
];
@@ -227,7 +227,7 @@ public function rawSearchOptions() {
'id' => '10',
'table' => PluginFormcreatorCategory::getTable(),
'field' => 'name',
- 'name' => __('Form category', 'formcreator'),
+ 'name' => PluginFormcreatorCategory::getTypeName(1),
'datatype' => 'dropdown',
'massiveaction' => true
];
@@ -500,7 +500,7 @@ public function showTargets($ID, $options = []) {
echo '';
echo '';
echo ''._n('Target', 'Targets', 2, 'formcreator').' | ';
- echo ''.__('Type', 'formcreator').' | ';
+ echo ''._n('Type', 'Types', 1).' | ';
echo ''.__('Actions', 'formcreator').' | ';
echo '
';
diff --git a/inc/form_language.class.php b/inc/form_language.class.php
index b12daf4b7..01cf605cd 100644
--- a/inc/form_language.class.php
+++ b/inc/form_language.class.php
@@ -345,7 +345,7 @@ public function showTranslations($options = []) {
$header = '';
$header.= '' . Html::getCheckAllAsCheckbox("translation_list$rand", $rand) . ' | ';
$header.= '' . __('Original string', 'formcreator') . ' | ';
- $header.= '' . __('Translation', 'formcreator') . ' | ';
+ $header.= '' . PluginFormcreatorTranslation::getTypeName(1) . ' | ';
$header.= '
';
echo $header;
echo '';
diff --git a/inc/formanswer.class.php b/inc/formanswer.class.php
index 35bd77083..e5c0cb51e 100644
--- a/inc/formanswer.class.php
+++ b/inc/formanswer.class.php
@@ -206,7 +206,7 @@ public function rawSearchOptions() {
'id' => '3',
'table' => 'glpi_plugin_formcreator_forms',
'field' => 'name',
- 'name' => __('Form', 'formcreator'),
+ 'name' => PluginFormcreatorForm::getTypeName(1),
'searchtype' => 'contains',
'datatype' => 'string',
'massiveaction' => false
@@ -216,7 +216,7 @@ public function rawSearchOptions() {
'id' => '4',
'table' => 'glpi_users',
'field' => 'name',
- 'name' => __('Requester'),
+ 'name' => _n('Requester', 'Requesters', 1),
'datatype' => 'itemlink',
'massiveaction' => false,
'linkfield' => 'requester_id'
@@ -615,7 +615,7 @@ public function showForm($ID, $options = []) {
//add requester info
echo '';
- echo '';
+ echo '';
echo Dropdown::getDropdownName('glpi_users', $this->fields['requester_id']);
echo '
';
diff --git a/inc/issue.class.php b/inc/issue.class.php
index 83b119e7b..40bfa37d1 100644
--- a/inc/issue.class.php
+++ b/inc/issue.class.php
@@ -540,7 +540,7 @@ public function rawSearchOptions() {
'id' => '3',
'table' => self::getTable(),
'field' => 'itemtype',
- 'name' => __('Type'),
+ 'name' => _n('Type', 'Types', 1),
'searchtype' => [
'0' => 'equals',
'1' => 'notequals'
@@ -583,7 +583,7 @@ public function rawSearchOptions() {
'id' => '7',
'table' => 'glpi_entities',
'field' => 'completename',
- 'name' => __('Entity'),
+ 'name' => _n('Entity', 'Entities', 1),
'datatype' => 'dropdown',
'massiveaction' => false
];
@@ -593,7 +593,7 @@ public function rawSearchOptions() {
'table' => 'glpi_users',
'field' => 'name',
'linkfield' => 'requester_id',
- 'name' => __('Requester'),
+ 'name' => _n('Requester', 'Requesters', 1),
'datatype' => 'dropdown',
'massiveaction' => false
];
diff --git a/inc/notificationtargetformanswer.class.php b/inc/notificationtargetformanswer.class.php
index 052d9fd0b..c598f947e 100644
--- a/inc/notificationtargetformanswer.class.php
+++ b/inc/notificationtargetformanswer.class.php
@@ -76,8 +76,8 @@ public function getTags() {
$tags = [
'formcreator.form_id' => __('Form #', 'formcreator'),
'formcreator.form_name' => __('Form name', 'formcreator'),
- 'formcreator.form_requester' => __('Requester', 'formcreator'),
- 'formcreator.form_validator' => __('Validator', 'formcreator'),
+ 'formcreator.form_requester' => _n('Requester', 'Requesters', 1),
+ 'formcreator.form_validator' => _x('tag', 'Validator', 'formcreator'),
'formcreator.form_creation_date' => __('Creation date'),
'formcreator.form_full_answers' => __('Full form answers', 'formcreator'),
'formcreator.validation_comment' => __('Refused comment', 'formcreator'),
diff --git a/inc/target_actor.class.php b/inc/target_actor.class.php
index c6a1bc724..d0f66931d 100644
--- a/inc/target_actor.class.php
+++ b/inc/target_actor.class.php
@@ -80,7 +80,7 @@ static function getEnumActorType() {
static function getEnumRole() {
return [
- self::ACTOR_ROLE_REQUESTER => __('Requester'),
+ self::ACTOR_ROLE_REQUESTER => _n('Requester', 'Requesters', 1),
self::ACTOR_ROLE_OBSERVER => __('Observer'),
self::ACTOR_ROLE_ASSIGNED => __('Assigned to'),
// TODO : support ACTOR_ROLE_SUPPLIER
diff --git a/inc/targetchange.class.php b/inc/targetchange.class.php
index 51b927e01..dc8f38cba 100644
--- a/inc/targetchange.class.php
+++ b/inc/targetchange.class.php
@@ -103,7 +103,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
$tab = [
1 => __('Properties', 'formcreator'),
2 => __('Actors', 'formcreator'),
- 3 => __('Condition', 'formcreator'),
+ 3 => PluginFormcreatorCondition::getTypeName(1),
];
// if ((new Plugin)->isActivated('fields')) {
// $tab[4] = __('Fields plugin', 'formcreator');
diff --git a/inc/targetproblem.class.php b/inc/targetproblem.class.php
index 33f250440..b40baa457 100644
--- a/inc/targetproblem.class.php
+++ b/inc/targetproblem.class.php
@@ -577,7 +577,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
$tab = [
1 => __('Properties', 'formcreator'),
2 => __('Actors', 'formcreator'),
- 3 => __('Condition', 'formcreator'),
+ 3 => PluginFormcreatorCondition::getTypeName(1),
];
// if ((new Plugin)->isActivated('fields')) {
// $tab[4] = __('Fields plugin', 'formcreator');
diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php
index 6c67b44b3..f51315493 100644
--- a/inc/targetticket.class.php
+++ b/inc/targetticket.class.php
@@ -132,7 +132,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
$tab = [
1 => __('Properties', 'formcreator'),
2 => __('Actors', 'formcreator'),
- 3 => __('Condition', 'formcreator'),
+ 3 => PluginFormcreatorCondition::getTypeName(1),
];
// if ((new Plugin)->isActivated('fields')) {
// $tab[4] = __('Fields plugin', 'formcreator');
@@ -1103,7 +1103,7 @@ protected function showTargetType($rand) {
echo Html::scriptBlock("plugin_formcreator_changeRequestType($rand);");
echo '';
echo '';
- echo '' . __('Question', 'formcreator') . '';
+ echo '' . PluginFormcreatorQuestion::getTypeName(1) . '';
echo '' . __('Type ', 'formcreator') . '';
echo ' | ';
echo '';
@@ -1142,7 +1142,7 @@ protected function showAssociateSettings($rand) {
echo Html::scriptBlock("plugin_formcreator_change_associate($rand)");
echo ' | ';
echo '';
- echo '' . __('Question', 'formcreator') . '';
+ echo '' . PluginFormcreatorQuestion::getTypeName(1) . '';
echo '' . __('Item ', 'formcreator') . '';
echo ' | ';
echo '';
diff --git a/templates/pages/form.html.twig b/templates/pages/form.html.twig
index c5b149a2d..d7e3bf3eb 100644
--- a/templates/pages/form.html.twig
+++ b/templates/pages/form.html.twig
@@ -81,7 +81,7 @@
{{ fields.textField('description', item.fields['description'], __('Description')) }}
- {{ fields.textareaField('content', item.fields['content'], __('Header', 'formcreator'), { 'enable_richtext': true }) }}
+ {{ fields.textareaField('content', item.fields['content'], _n('Header', 'Headers', 1, 'formcreator'), { 'enable_richtext': true }) }}
{{ fields.dropdownYesNo('is_default', item.fields['is_default'], __('Default form in service catalog', 'formcreator')) }}
diff --git a/templates/pages/question.html.twig b/templates/pages/question.html.twig
index 2d86de2ee..5103ce420 100644
--- a/templates/pages/question.html.twig
+++ b/templates/pages/question.html.twig
@@ -50,7 +50,7 @@
'PluginFormcreatorSection',
'plugin_formcreator_sections_id',
item.fields['plugin_formcreator_sections_id'],
- __('Section', 'formcreator'),
+ _n('Section', 'Sections', 1, 'formcreator'),
{
'display_emptychoice': false,
'condition': {'plugin_formcreator_forms_id': section.fields['plugin_formcreator_forms_id']},
|