diff options
author | Vladimirs Maksimovs <vladimirs.maksimovs@zabbix.com> | 2022-11-11 11:02:49 +0300 |
---|---|---|
committer | Vladimirs Maksimovs <vladimirs.maksimovs@zabbix.com> | 2022-11-11 11:02:49 +0300 |
commit | 8f8c59ee64649f779e535deb8f713d1cf394acd2 (patch) | |
tree | 245225aeb493dd45fcd60c05fa413f7756952df0 | |
parent | 2376ce86467a415b2aa60867c9c2178f05c59944 (diff) |
A......... [ZBXNEXT-6470,ZBXNEXT-6980] fixed error messages; changed error message for autotest
-rw-r--r-- | ui/include/classes/api/services/CItem.php | 2 | ||||
-rw-r--r-- | ui/include/classes/api/services/CItemGeneral.php | 8 | ||||
-rw-r--r-- | ui/tests/selenium/items/testInheritanceItem.php | 2 | ||||
-rw-r--r-- | ui/tests/selenium/testTemplateInheritance.php | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/ui/include/classes/api/services/CItem.php b/ui/include/classes/api/services/CItem.php index 66ea1943360..5ee7a5e8aa9 100644 --- a/ui/include/classes/api/services/CItem.php +++ b/ui/include/classes/api/services/CItem.php @@ -1528,7 +1528,7 @@ class CItem extends CItemGeneral { } else { $error = $item['host_status'] == HOST_STATUS_TEMPLATE - ? _('Cannot assign the inventory field "%1$s" to the item with key "%2$s" of template "%3$s", because it is already populated by the item with key "%4$s"') + ? _('Cannot assign the inventory field "%1$s" to the item with key "%2$s" of template "%3$s", because it is already populated by the item with key "%4$s".') : _('Cannot assign the inventory field "%1$s" to the item with key "%2$s" of host "%3$s", because it is already populated by the item with key "%4$s".'); $inventory_fields = getHostInventories(); diff --git a/ui/include/classes/api/services/CItemGeneral.php b/ui/include/classes/api/services/CItemGeneral.php index 6c5746e16ce..7b51f4b9b50 100644 --- a/ui/include/classes/api/services/CItemGeneral.php +++ b/ui/include/classes/api/services/CItemGeneral.php @@ -701,8 +701,8 @@ abstract class CItemGeneral extends CApiService { switch ($upd_db_item['flags']) { case ZBX_FLAG_DISCOVERY_NORMAL: $error = $target_is_host - ? _('Cannot inherit LLD rule with key "%1$s" of template "%2$s" to host "%3$s", because a discovered item with the same key already exists.') - : _('Cannot inherit LLD rule with key "%1$s" of template "%2$s" to template "%3$s", because a discovered item with the same key already exists.'); + ? _('Cannot inherit LLD rule with key "%1$s" of template "%2$s" to host "%3$s", because an item with the same key already exists.') + : _('Cannot inherit LLD rule with key "%1$s" of template "%2$s" to template "%3$s", because an item with the same key already exists.'); break 2; case ZBX_FLAG_DISCOVERY_PROTOTYPE: @@ -722,8 +722,8 @@ abstract class CItemGeneral extends CApiService { switch ($upd_db_item['flags']) { case ZBX_FLAG_DISCOVERY_NORMAL: $error = $target_is_host - ? _('Cannot inherit item prototype with key "%1$s" of template "%2$s" to host "%3$s", because a discovered item with the same key already exists.') - : _('Cannot inherit item prototype with key "%1$s" of template "%2$s" to template "%3$s", because a discovered item with the same key already exists.'); + ? _('Cannot inherit item prototype with key "%1$s" of template "%2$s" to host "%3$s", because an item with the same key already exists.') + : _('Cannot inherit item prototype with key "%1$s" of template "%2$s" to template "%3$s", because an item with the same key already exists.'); break 2; case ZBX_FLAG_DISCOVERY_RULE: diff --git a/ui/tests/selenium/items/testInheritanceItem.php b/ui/tests/selenium/items/testInheritanceItem.php index 7eb539763e2..f60f16154cb 100644 --- a/ui/tests/selenium/items/testInheritanceItem.php +++ b/ui/tests/selenium/items/testInheritanceItem.php @@ -76,7 +76,7 @@ class testInheritanceItem extends CLegacyWebTest { 'key' => 'key-item-inheritance', 'errors' => [ 'Cannot inherit LLD rule with key "key-item-inheritance" of template "Inheritance test template" '. - 'to host "Template inheritance test host", because a discovered item with the same key already exists.' + 'to host "Template inheritance test host", because an item with the same key already exists.' ] ] ] diff --git a/ui/tests/selenium/testTemplateInheritance.php b/ui/tests/selenium/testTemplateInheritance.php index ed9cb787136..b121029a1a8 100644 --- a/ui/tests/selenium/testTemplateInheritance.php +++ b/ui/tests/selenium/testTemplateInheritance.php @@ -84,7 +84,7 @@ class testTemplateInheritance extends CLegacyWebTest { 'key-item-inheritance', [ 'Cannot inherit LLD rule with key "key-item-inheritance" of template "Inheritance test template" '. - 'to host "Template inheritance test host", because a discovered item with the same key already exists.' + 'to host "Template inheritance test host", because an item with the same key already exists.' ] ], // Item added to Template inheritance test host |