From 1fd6817b6be7bb4fd25003e5dbc6d31b31c8e41f Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Sun, 16 Sep 2018 23:14:45 +0300 Subject: [PATCH] Add title to 'Remove' dialog for 'association_table' widget of 'HBAC' entity To improve translation quality the title of 'Remove' dialog, which is initialized within details table of the entity, should be specified explicitly in the spec and should be an entire sentence. Fixes: https://pagure.io/freeipa/issue/7704 Reviewed-By: Serhii Tsymbaliuk --- install/ui/src/freeipa/hbac.js | 12 ++++++------ ipaserver/plugins/internal.py | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/install/ui/src/freeipa/hbac.js b/install/ui/src/freeipa/hbac.js index 193b89c39..b5827dc3b 100644 --- a/install/ui/src/freeipa/hbac.js +++ b/install/ui/src/freeipa/hbac.js @@ -327,7 +327,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_user', remove_method: 'remove_user', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_users', }, { $type: 'rule_association_table', @@ -336,7 +336,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_user', remove_method: 'remove_user', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_groups', } ] } @@ -400,7 +400,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_host', remove_method: 'remove_host', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_hosts', }, { $type: 'rule_association_table', @@ -409,7 +409,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_host', remove_method: 'remove_host', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_hostgroups', } ] } @@ -467,7 +467,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_service', remove_method: 'remove_service', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_services', }, { $type: 'rule_association_table', @@ -476,7 +476,7 @@ var add_hbacrule_details_facet_widgets = function (spec) { add_method: 'add_service', remove_method: 'remove_service', add_title: '@i18n:association.add.member', - remove_title: '@i18n:association.remove.member' + remove_title: '@i18n:objects.hbacrule.remove_servicegroups', } ] } diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py index ffbb28f16..550119874 100644 --- a/ipaserver/plugins/internal.py +++ b/ipaserver/plugins/internal.py @@ -718,6 +718,25 @@ class i18n_messages(Command): "host": _("Accessing"), "ipaenabledflag": _("Rule status"), "remove": _("Remove HBAC rules"), + "remove_groups": _( + "Remove user groups from HBAC rule '${primary_key}'" + ), + "remove_hostgroups": _( + "Remove host groups from HBAC rule '${primary_key}'" + ), + "remove_hosts": _( + "Remove hosts from HBAC rule '${primary_key}'" + ), + "remove_servicegroups": _( + "Remove HBAC service groups from HBAC rule " + "'${primary_key}'" + ), + "remove_services": _( + "Remove HBAC services from HBAC rule '${primary_key}'" + ), + "remove_users": _( + "Remove users from HBAC rule '${primary_key}'" + ), "service": _("Via Service"), "specified_hosts": _("Specified Hosts and Groups"), "specified_services": _("Specified Services and Groups"),