URL: https://github.com/freeipa/freeipa/pull/2372
Author: stanislavlevin
 Title: #2372: Fix translation of 'Remove' dialog for 'association_table' widget
Action: opened

PR body:
"""
As for now the default title of remove dialogs, which are initialized from 
'association_table' widget, is set to something like
```
Remove ${other_entity} from ${entity} ${primary_key}
```
where 'other_entity' and 'entity' are also translatable texts.
This construction is used via the method 'show_remove_dialog' of 
'association_table' widget for the all 'Delete' actions within the details of 
entities. Such concatenation leads to a bad quality translation and should be 
changed to an entire sentence.

From now a mentioned title is taken from a spec and should be specified 
explicitly.

Fixes: https://pagure.io/freeipa/issue/7704

This PR contains #2371 as a dependency and thus should be merged after that if 
it accepted.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2372/head:pr2372
git checkout pr2372
From c815e762a5d173443a008caaa10a396cea63589f Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 22:52:46 +0300
Subject: [PATCH 01/24] Drop concatenated title of remove dialog

As for now the default title of remove dialogs, which are
initialized from 'association' facet, is set to something like
'Remove ${other_entity} from ${entity} ${primary_key}', where
'other_entity' and 'entity' are also translatable texts.
This construction is used via method 'show_remove_dialog'
of 'association' facet for the all 'Delete' actions within details
of entities.

Such concatenation leads to a bad quality translation and
should be changed to an entire sentence.

From now a mentioned title is taken from a spec and should be
specified explicitly.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/association.js | 11 ++++-------
 ipaserver/plugins/internal.py         | 10 +---------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index b2f8f7e971..5860545036 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -454,7 +454,7 @@ IPA.association_table_widget = function (spec) {
 
     that.read_only = spec.read_only === undefined ? false : spec.read_only;
     that.add_title = text.get(spec.add_title || '@i18n:association.add.member');
-    that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member');
+    that.remove_title = text.get(spec.remove_title);
 
     that.adder_columns = $.ordered_map();
 
@@ -931,7 +931,8 @@ exp.association_facet_pre_op = function(spec, context) {
     }
 
     spec.add_title = '@i18n:association.add.'+spec.attribute_member;
-    spec.remove_title = '@i18n:association.remove.'+spec.attribute_member;
+    spec.remove_title = spec.remove_title ||
+                            '@i18n:association.remove_title_default';
 
     spec.facet_group = spec.facet_group || spec.attribute_member;
 
@@ -1049,7 +1050,7 @@ exp.association_facet = IPA.association_facet = function (spec, no_init) {
     that.remove_method = spec.remove_method || 'remove_member';
 
     that.add_title = text.get(spec.add_title || '@i18n:association.add.member');
-    that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member');
+    that.remove_title = text.get(spec.remove_title);
 
     that.adder_columns = $.ordered_map();
 
@@ -1272,14 +1273,10 @@ exp.association_facet = IPA.association_facet = function (spec, no_init) {
             return;
         }
 
-        var entity_label = that.entity.metadata.label_singular;
         var pkey = that.get_pkey();
-        var other_entity_label = that.other_entity.metadata.label;
 
         var title = that.remove_title;
-        title = title.replace('${entity}', entity_label);
         title = title.replace('${primary_key}', pkey);
-        title = title.replace('${other_entity}', other_entity_label);
 
         var dialog = IPA.association_deleter_dialog({
             title: title,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 142560d933..9b92552b79 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -184,15 +184,7 @@ class i18n_messages(Command):
             "indirect_membership": _("Indirect Membership"),
             "no_entries": _("No entries."),
             "paging": _("Showing ${start} to ${end} of ${total} entries."),
-            "remove": {
-                "ipasudorunas": _("Remove RunAs ${other_entity} from ${entity} ${primary_key}"),
-                "ipasudorunasgroup": _("Remove RunAs Groups from ${entity} ${primary_key}"),
-                "managedby": _("Remove ${other_entity} Managing ${entity} ${primary_key}"),
-                "member": _("Remove ${other_entity} from ${entity} ${primary_key}"),
-                "memberallowcmd": _("Remove Allow ${other_entity} from ${entity} ${primary_key}"),
-                "memberdenycmd": _("Remove Deny ${other_entity} from ${entity} ${primary_key}"),
-                "memberof": _("Remove ${entity} ${primary_key} from ${other_entity}"),
-            },
+            "remove_title_default": _("Remove"),
             "removed": _("${count} item(s) removed"),
             "show_results": _("Show Results"),
         },

From 3ff280cc994cf1336ef432f384de29120371ff17 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 02/24] Add a title to 'remove' dialog for details of 'Users'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/user.js | 15 ++++++++++-----
 ipaserver/plugins/internal.py  | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index 37740e8305..3e434b4e6b 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -463,19 +463,22 @@ return {
             $type: 'association',
             $pre_ops: [ IPA.user.association_facet_ss_pre_op ],
             name: 'memberof_group',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.user.remove_from_groups',
         },
         {
             $type: 'association',
             $pre_ops: [ IPA.user.association_facet_ss_pre_op ],
             name: 'memberof_netgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.user.remove_from_netgroups',
         },
         {
             $type: 'association',
             $pre_ops: [ IPA.user.association_facet_ss_pre_op ],
             name: 'memberof_role',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.user.remove_from_roles',
         },
         {
             $type: 'association',
@@ -483,7 +486,8 @@ return {
             name: 'memberof_hbacrule',
             associator: IPA.serial_associator,
             add_method: 'add_user',
-            remove_method: 'remove_user'
+            remove_method: 'remove_user',
+            remove_title: '@i18n:objects.user.remove_from_hbac',
         },
         {
             $type: 'association',
@@ -491,7 +495,8 @@ return {
             name: 'memberof_sudorule',
             associator: IPA.serial_associator,
             add_method: 'add_user',
-            remove_method: 'remove_user'
+            remove_method: 'remove_user',
+            remove_title: '@i18n:objects.user.remove_from_sudo',
         }
     ],
     standard_association_facets: {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 9b92552b79..268f12a438 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -960,6 +960,21 @@ class i18n_messages(Command):
                 "mode_preserve": _("preserve"),
                 "noprivate": _("No private group"),
                 "remove": _("Remove users"),
+                "remove_from_groups": _(
+                    "Remove user '${primary_key}' from user groups"
+                ),
+                "remove_from_netgroups": _(
+                    "Remove user '${primary_key}' from netgroups"
+                ),
+                "remove_from_roles": _(
+                    "Remove user '${primary_key}' from roles"
+                ),
+                "remove_from_hbac": _(
+                    "Remove user '${primary_key}' from HBAC rules"
+                ),
+                "remove_from_sudo": _(
+                    "Remove user '${primary_key}' from sudo rules"
+                ),
                 "status_confirmation": _("Are you sure you want to ${action} the user?<br/>The change will take effect immediately."),
                 "status_link": _("Click to ${action}"),
                 "unlock": _("Unlock"),

From 7f960833ba7bcc499f87d8fab103372bac8db230 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 03/24] Add a title to 'remove' dialog for details of 'Hosts'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/host.js | 18 ++++++++++++------
 ipaserver/plugins/internal.py  | 18 ++++++++++++++++++
 2 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index 2d35700066..f63cad4ea4 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -404,36 +404,42 @@ return {
             $type: 'association',
             name: 'managedby_host',
             add_method: 'add_managedby',
-            remove_method: 'remove_managedby'
+            remove_method: 'remove_managedby',
+            remove_title: '@i18n:objects.host.remove_hosts_managing',
         },
         {
             $type: 'association',
             name: 'memberof_hostgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.host.remove_from_groups',
         },
         {
             $type: 'association',
             name: 'memberof_netgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.host.remove_from_netgroups',
         },
         {
             $type: 'association',
             name: 'memberof_role',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.host.remove_from_roles',
         },
         {
             $type: 'association',
             name: 'memberof_hbacrule',
             associator: IPA.serial_associator,
             add_method: 'add_host',
-            remove_method: 'remove_host'
+            remove_method: 'remove_host',
+            remove_title: '@i18n:objects.host.remove_from_hbac',
         },
         {
             $type: 'association',
             name: 'memberof_sudorule',
             associator: IPA.serial_associator,
             add_method: 'add_host',
-            remove_method: 'remove_host'
+            remove_method: 'remove_host',
+            remove_title: '@i18n:objects.host.remove_from_sudo',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 268f12a438..13d47e143c 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -687,6 +687,24 @@ class i18n_messages(Command):
                 "password_set_success": _("OTP set"),
                 "password_set_title": _("Set One-Time-Password"),
                 "remove": _("Remove hosts"),
+                "remove_hosts_managing": _(
+                    "Remove hosts managing host '${primary_key}'"
+                ),
+                "remove_from_groups": _(
+                    "Remove host '${primary_key}' from host groups"
+                ),
+                "remove_from_netgroups": _(
+                    "Remove host '${primary_key}' from netgroups"
+                ),
+                "remove_from_roles": _(
+                    "Remove host '${primary_key}' from roles"
+                ),
+                "remove_from_hbac": _(
+                    "Remove host '${primary_key}' from HBAC rules"
+                ),
+                "remove_from_sudo": _(
+                    "Remove host '${primary_key}' from sudo rules"
+                ),
                 "status": _("Status"),
                 "unprovision": _("Unprovision"),
                 "unprovision_confirmation": _("Are you sure you want to unprovision this host?"),

From caf7ec097c988807d16056cf458bd0e4617a5e88 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 04/24] Add a title to 'remove' dialog for details of
 'Services' entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/service.js | 8 +++++++-
 ipaserver/plugins/internal.py     | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js
index 9db799ae5d..3875210968 100644
--- a/install/ui/src/freeipa/service.js
+++ b/install/ui/src/freeipa/service.js
@@ -366,11 +366,17 @@ return {
                 IPA.service.certificate_policy
             ]
         },
+        {
+            $type: 'association',
+            name: 'memberof_role',
+            remove_title: '@i18n:objects.service.remove_from_roles',
+        },
         {
             $type: 'association',
             name: 'managedby_host',
             add_method: 'add_host',
-            remove_method: 'remove_host'
+            remove_method: 'remove_host',
+            remove_title: '@i18n:objects.service.remove_hosts_managing',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 13d47e143c..03a478d668 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -864,6 +864,12 @@ class i18n_messages(Command):
                 "missing": _("Kerberos Key Not Present"),
                 "provisioning": _("Provisioning"),
                 "remove": _("Remove services"),
+                "remove_from_roles": _(
+                    "Remove service '${primary_key}' from roles"
+                ),
+                "remove_hosts_managing": _(
+                    "Remove hosts managing service '${primary_key}'"
+                ),
                 "service": _("Service"),
                 "status": _("Status"),
                 "unprovision": _("Unprovision"),

From 550f64b4cc6ca44da8dd48b7f2bb6b122f79484a Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 05/24] Add a title to 'remove' dialog for details of 'Groups'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/group.js     | 24 ++++++++++-----
 install/ui/src/freeipa/hostgroup.js | 22 ++++++++++---
 install/ui/src/freeipa/netgroup.js  |  8 ++++-
 ipaserver/plugins/internal.py       | 48 +++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 13 deletions(-)

diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js
index b530e13397..1acb426d5c 100644
--- a/install/ui/src/freeipa/group.js
+++ b/install/ui/src/freeipa/group.js
@@ -122,15 +122,18 @@ return {
                     name: 'uid',
                     primary_key: true
                 }
-            ]
+            ],
+            remove_title: '@i18n:objects.group.remove_users',
         },
         {
             $type: 'association',
-            name: 'member_group'
+            name: 'member_group',
+            remove_title: '@i18n:objects.group.remove_groups',
         },
         {
             $type: 'association',
-            name: 'member_service'
+            name: 'member_service',
+            remove_title: '@i18n:objects.group.remove_services',
         },
         {
             $type: 'attribute',
@@ -148,31 +151,36 @@ return {
         {
             $type: 'association',
             name: 'memberof_group',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.group.remove_from_groups',
         },
         {
             $type: 'association',
             name: 'memberof_netgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.group.remove_from_netgroups',
         },
         {
             $type: 'association',
             name: 'memberof_role',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.group.remove_from_roles',
         },
         {
             $type: 'association',
             name: 'memberof_hbacrule',
             associator: IPA.serial_associator,
             add_method: 'add_user',
-            remove_method: 'remove_user'
+            remove_method: 'remove_user',
+            remove_title: '@i18n:objects.group.remove_from_hbac',
         },
         {
             $type: 'association',
             name: 'memberof_sudorule',
             associator: IPA.serial_associator,
             add_method: 'add_user',
-            remove_method: 'remove_user'
+            remove_method: 'remove_user',
+            remove_title: '@i18n:objects.group.remove_from_sudo',
         }
     ],
     standard_association_facets: true,
diff --git a/install/ui/src/freeipa/hostgroup.js b/install/ui/src/freeipa/hostgroup.js
index a7646a4c05..22cd242968 100644
--- a/install/ui/src/freeipa/hostgroup.js
+++ b/install/ui/src/freeipa/hostgroup.js
@@ -63,29 +63,43 @@ return {
                 }
             ]
         },
+        {
+            $type: 'association',
+            name: 'member_host',
+            remove_title: '@i18n:objects.hostgroup.remove_hosts',
+        },
+        {
+            $type: 'association',
+            name: 'member_hostgroup',
+            remove_title: '@i18n:objects.hostgroup.remove_hostgroups',
+        },
         {
             $type: 'association',
             name: 'memberof_hostgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.hostgroup.remove_from_hostgroups',
         },
         {
             $type: 'association',
             name: 'memberof_netgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.hostgroup.remove_from_netgroups',
         },
         {
             $type: 'association',
             name: 'memberof_hbacrule',
             associator: IPA.serial_associator,
             add_method: 'add_host',
-            remove_method: 'remove_host'
+            remove_method: 'remove_host',
+            remove_title: '@i18n:objects.hostgroup.remove_from_hbac',
         },
         {
             $type: 'association',
             name: 'memberof_sudorule',
             associator: IPA.serial_associator,
             add_method: 'add_host',
-            remove_method: 'remove_host'
+            remove_method: 'remove_host',
+            remove_title: '@i18n:objects.hostgroup.remove_from_sudo',
         }
     ],
     standard_association_facets: true,
diff --git a/install/ui/src/freeipa/netgroup.js b/install/ui/src/freeipa/netgroup.js
index edb66e550c..24acb64916 100644
--- a/install/ui/src/freeipa/netgroup.js
+++ b/install/ui/src/freeipa/netgroup.js
@@ -57,10 +57,16 @@ var spec = {
             $factory: IPA.netgroup.details_facet,
             command_mode: 'info'
         },
+        {
+            $type: 'association',
+            name: 'member_netgroup',
+            remove_title: '@i18n:objects.netgroup.remove_netgroups',
+        },
         {
             $type: 'association',
             name: 'memberof_netgroup',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.netgroup.remove_from_netgroups',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 03a478d668..d82ec25a58 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -628,6 +628,30 @@ class i18n_messages(Command):
                 "nonposix": _("Non-POSIX"),
                 "posix": _("POSIX"),
                 "remove": _("Remove user groups"),
+                "remove_from_groups": _(
+                    "Remove user group '${primary_key}' from user groups"
+                ),
+                "remove_from_netgroups": _(
+                    "Remove user group '${primary_key}' from netgroups"
+                ),
+                "remove_from_roles": _(
+                    "Remove user group '${primary_key}' from roles"
+                ),
+                "remove_from_hbac": _(
+                    "Remove user group '${primary_key}' from HBAC rules"
+                ),
+                "remove_from_sudo": _(
+                    "Remove user group '${primary_key}' from sudo rules"
+                ),
+                "remove_groups": _(
+                    "Remove user groups from user group '${primary_key}'"
+                ),
+                "remove_services": _(
+                    "Remove services from user group '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from user group '${primary_key}'"
+                ),
                 "type": _("Group Type"),
                 "user_groups": _("User Groups"),
             },
@@ -715,6 +739,24 @@ class i18n_messages(Command):
                 "host_group": _("Host Groups"),
                 "identity": _("Host Group Settings"),
                 "remove": _("Remove host groups"),
+                "remove_from_hostgroups": _(
+                    "Remove host group '${primary_key}' from host groups"
+                ),
+                "remove_from_netgroups": _(
+                    "Remove host group '${primary_key}' from netgroups"
+                ),
+                "remove_from_hbac": _(
+                    "Remove host group '${primary_key}' from HBAC rules"
+                ),
+                "remove_from_sudo": _(
+                    "Remove host group '${primary_key}' from sudo rules"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from host group '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from host group '${primary_key}'"
+                ),
             },
             "idoverrideuser": {
                 "anchor_label": _("User to override"),
@@ -762,6 +804,12 @@ class i18n_messages(Command):
                 "identity": _("Netgroup Settings"),
                 "netgroups": _("Netgroups"),
                 "remove": _("Remove netgroups"),
+                "remove_netgroups": _(
+                    "Remove netgroups from netgroup '${primary_key}'"
+                ),
+                "remove_from_netgroups": _(
+                    "Remove netgroup '${primary_key}' from netgroups"
+                ),
                 "specified_hosts": _("Specified Hosts and Groups"),
                 "specified_users": _("Specified Users and Groups"),
                 "user": _("User"),

From e8d347b965bea70301a61965e77a49b3ad2d42fb Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 06/24] Add a title to 'remove' dialog for details of 'HBAC'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/hbac.js | 6 ++++--
 ipaserver/plugins/internal.py  | 8 ++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/install/ui/src/freeipa/hbac.js b/install/ui/src/freeipa/hbac.js
index 674de79d40..193b89c39e 100644
--- a/install/ui/src/freeipa/hbac.js
+++ b/install/ui/src/freeipa/hbac.js
@@ -153,7 +153,8 @@ return {
                     name: 'description',
                     width: '100px'
                 }
-            ]
+            ],
+            remove_title: '@i18n:objects.hbacsvc.remove_from_hbacsvcgroups',
         }
     ],
     standard_association_facets: true,
@@ -215,7 +216,8 @@ return {
                     name: 'description',
                     width: '100px'
                 }
-            ]
+            ],
+            remove_title: '@i18n:objects.hbacsvcgroup.remove_hbacsvcs',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index d82ec25a58..a23b3268a8 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -670,9 +670,17 @@ class i18n_messages(Command):
             },
             "hbacsvc": {
                 "remove": _("Remove HBAC services"),
+                "remove_from_hbacsvcgroups": _(
+                    "Remove HBAC service '${primary_key}' from HBAC service "
+                    "groups"
+                ),
             },
             "hbacsvcgroup": {
                 "remove": _("Remove HBAC service groups"),
+                "remove_hbacsvcs": _(
+                    "Remove HBAC services from HBAC service group "
+                    "'${primary_key}'"
+                ),
                 "services": _("Services"),
             },
             "hbactest": {

From 355c163c9749d090f3d1c540d02d60a8b002842e Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 07/24] Add a title to 'remove' dialog for details of 'Sudo'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/sudo.js | 6 ++++--
 ipaserver/plugins/internal.py  | 8 ++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js
index 497964a08e..e12681137e 100644
--- a/install/ui/src/freeipa/sudo.js
+++ b/install/ui/src/freeipa/sudo.js
@@ -154,7 +154,8 @@ return {
                     name: 'description',
                     width: '100px'
                 }
-            ]
+            ],
+            remove_title: '@i18n:objects.sudocmd.remove_from_sudocmdgroups',
         }
     ],
     standard_association_facets: true,
@@ -217,7 +218,8 @@ return {
                     name: 'description',
                     width: '100px'
                 }
-            ]
+            ],
+            remove_title: '@i18n:objects.sudocmdgroup.remove_sudocmds',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index a23b3268a8..6b2d592367 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -963,10 +963,18 @@ class i18n_messages(Command):
             "sudocmd": {
                 "groups": _("Groups"),
                 "remove": _("Remove sudo commands"),
+                "remove_from_sudocmdgroups": _(
+                    "Remove sudo command '${primary_key}' from sudo command "
+                    "groups"
+                ),
             },
             "sudocmdgroup": {
                 "commands": _("Commands"),
                 "remove": _("Remove sudo command groups"),
+                "remove_sudocmds": _(
+                    "Remove sudo commands from sudo command group "
+                    "'${primary_key}'"
+                ),
             },
             "sudorule": {
                 "allow": _("Allow"),

From d4a4b34191626380749b704b6359a96ffa46e761 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 08/24] Add a title to 'remove' dialog for details of 'OTP
 Tokens' entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/otptoken.js | 3 ++-
 ipaserver/plugins/internal.py      | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js
index ebd161dc05..95bb8808e1 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -226,7 +226,8 @@ return {
             $type: 'association',
             name: 'managedby_user',
             add_method: 'add_managedby',
-            remove_method: 'remove_managedby'
+            remove_method: 'remove_managedby',
+            remove_title: '@i18n:objects.otptoken.remove_users_managing',
         }
     ],
 
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 6b2d592367..f7fbac7268 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -833,6 +833,9 @@ class i18n_messages(Command):
                 "disable": _("Disable token"),
                 "enable": _("Enable token"),
                 "remove": _("Remove OTP tokens"),
+                "remove_users_managing": _(
+                    "Remove users managing OTP token '${primary_key}'"
+                ),
                 "show_qr": _("Show QR code"),
                 "show_uri": _("Show configuration uri"),
                 "type_hotp": _("Counter-based (HOTP)"),

From 27533c007fba6cb7fe0c89ee5f3230be2fcd47b4 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 09/24] Add a title to 'remove' dialog for details of 'RBAC'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/aci.js | 39 ++++++++++++++++++++++++++++++-----
 ipaserver/plugins/internal.py | 31 +++++++++++++++++++++++++---
 2 files changed, 62 insertions(+), 8 deletions(-)

diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js
index 1b7e6d2cfd..cd2d81fbc9 100644
--- a/install/ui/src/freeipa/aci.js
+++ b/install/ui/src/freeipa/aci.js
@@ -205,7 +205,8 @@ return {
         {
             $type: 'association',
             name: 'member_privilege',
-            facet_group: 'privilege'
+            facet_group: 'privilege',
+            remove_title: '@i18n:objects.acipermission.remove_privileges',
         }
     ],
     adder_dialog: {
@@ -353,14 +354,16 @@ return {
             facet_group: 'role',
             add_method: 'add_privilege',
             remove_method: 'remove_privilege',
-            associator: IPA.serial_associator
+            associator: IPA.serial_associator,
+            remove_title: '@i18n:objects.aciprivilege.remove_roles',
         },
         {
             $type: 'association',
             name: 'memberof_permission',
             facet_group: 'permission',
             add_method: 'add_permission',
-            remove_method: 'remove_permission'
+            remove_method: 'remove_permission',
+            remove_title: '@i18n:objects.aciprivilege.remove_from_permissions',
         }
     ],
     standard_association_facets: true,
@@ -395,7 +398,7 @@ return {
             sections: [
                 {
                     name: 'identity',
-                    label: '@i18n:objects.role.identity',
+                    label: '@i18n:objects.acirole.identity',
                     fields: [
                         'cn',
                         {
@@ -406,12 +409,38 @@ return {
                 }
             ]
         },
+        {
+            $type: 'association',
+            name: 'member_user',
+            remove_title: '@i18n:objects.acirole.remove_users',
+        },
+        {
+            $type: 'association',
+            name: 'member_group',
+            remove_title: '@i18n:objects.acirole.remove_groups',
+        },
+        {
+            $type: 'association',
+            name: 'member_host',
+            remove_title: '@i18n:objects.acirole.remove_hosts',
+        },
+        {
+            $type: 'association',
+            name: 'member_hostgroup',
+            remove_title: '@i18n:objects.acirole.remove_hostgroups',
+        },
+        {
+            $type: 'association',
+            name: 'member_service',
+            remove_title: '@i18n:objects.acirole.remove_services',
+        },
         {
             $type: 'association',
             name: 'memberof_privilege',
             facet_group: 'privilege',
             add_method: 'add_privilege',
-            remove_method: 'remove_privilege'
+            remove_method: 'remove_privilege',
+            remove_title: '@i18n:objects.acirole.remove_from_privileges',
         }
     ],
     standard_association_facets: true,
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index f7fbac7268..9718a9385f 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -404,12 +404,40 @@ class i18n_messages(Command):
             },
             "acipermission": {
                 "remove": _("Remove permissions"),
+                "remove_privileges": _(
+                    "Remove privileges from permission '${primary_key}'"
+                ),
             },
             "aciprivilege": {
                 "remove": _("Remove privileges"),
+                "remove_from_permissions": _(
+                    "Remove privilege '${primary_key}' from permissions"
+                ),
+                "remove_roles": _(
+                    "Remove roles from privilege '${primary_key}'"
+                ),
             },
             "acirole": {
+                "identity": _("Role Settings"),
                 "remove": _("Remove roles"),
+                "remove_from_privileges": _(
+                    "Remove role '${primary_key}' from privileges"
+                ),
+                "remove_groups": _(
+                    "Remove user groups from role '${primary_key}'"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from role '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from role '${primary_key}'"
+                ),
+                "remove_services": _(
+                    "Remove services from role '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from role '${primary_key}'"
+                ),
             },
             "aciselfservice": {
                 "remove": _("Remove self service permissions"),
@@ -891,9 +919,6 @@ class i18n_messages(Command):
                 "check_dns_confirmation": _("Do you also want to perform DNS check?"),
                 "force_update": _("Force Update"),
             },
-            "role": {
-                "identity": _("Role Settings"),
-            },
             "selfservice": {
             },
             "selinuxusermap": {

From 23eb13c0eff17748f4ab3fc42179f175d3146a54 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 10/24] Add a title to 'remove' dialog for details of 'Trusts'
 entity

To improve translation quality the title of 'Remove' dialog,
which is initialized within details of the entity, should be
specified explicitly in the spec and should be an entire sentence.

Fixes: https://pagure.io/freeipa/issue/7702
---
 install/ui/src/freeipa/trust.js | 4 ++++
 ipaserver/plugins/internal.py   | 1 +
 2 files changed, 5 insertions(+)

diff --git a/install/ui/src/freeipa/trust.js b/install/ui/src/freeipa/trust.js
index 77a2031ee8..98afa3cf8d 100644
--- a/install/ui/src/freeipa/trust.js
+++ b/install/ui/src/freeipa/trust.js
@@ -68,6 +68,10 @@ return {
             label: '@mo:trustdomain.label',
             tab_label: '@mo:trustdomain.label',
             search_all_entries: true,
+            deleter_dialog: {
+                title: '@i18n:objects.trust.remove_domains',
+                $factory: IPA.search_deleter_dialog,
+            },
             actions: [
                 {
                     $type: 'batch_disable'
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 9718a9385f..ab88d51bfe 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -1053,6 +1053,7 @@ class i18n_messages(Command):
                 "ipanttrusteddomainsid": _("Domain Security Identifier"),
                 "preshared_password": _("Pre-shared password"),
                 "remove": _("Remove trusts"),
+                "remove_domains": _("Remove domains"),
                 "trustdirection": _("Trust direction"),
                 "truststatus": _("Trust status"),
                 "trusttype": _("Trust type"),

From 001f39da742c72c7fe27e3d365d6692ea7c216e0 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 22:52:46 +0300
Subject: [PATCH 11/24] Drop concatenated title of remove dialog

As for now the default title of remove dialogs, which are
initialized from 'association_table' facet, is set to something
like 'Remove ${other_entity} from ${entity} ${primary_key}',
where 'other_entity' and 'entity' are also translatable texts.
This construction is used via method 'show_remove_dialog'
of 'association_table' widget for the all 'Delete' actions within
details of entities.

Such concatenation leads to a bad quality translation and
should be changed to an entire sentence.

From now a mentioned title is taken from a spec and should be
specified explicitly.

Fixes: https://pagure.io/freeipa/issue/7704
---
 install/ui/src/freeipa/association.js | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index 5860545036..0a3db5df52 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -735,14 +735,10 @@ IPA.association_table_widget = function (spec) {
             return;
         }
 
-        var entity_label = that.entity.metadata.label_singular;
         var pkey = that.facet.get_pkey();
-        var other_entity_label = that.other_entity.metadata.label;
 
         var title = that.remove_title;
-        title = title.replace('${entity}', entity_label);
         title = title.replace('${primary_key}', pkey);
-        title = title.replace('${other_entity}', other_entity_label);
 
         var dialog = IPA.association_deleter_dialog({
             title: title,

From 93b62422337cb2fd7a290df99eb6a18d8df17f15 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 12/24] Add title to 'remove' dialog for 'association_table'
 widget of 'Hosts' 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
---
 install/ui/src/freeipa/host.js | 16 ++++++++--------
 ipaserver/plugins/internal.py  | 26 ++++++++++++++++++++++++--
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index f63cad4ea4..1b597ac9aa 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -202,7 +202,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_users_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_user',
@@ -219,7 +219,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_groups_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_group',
@@ -236,7 +236,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_hosts_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_host',
@@ -253,7 +253,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_hostgroups_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_hostgroup',
@@ -277,7 +277,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_users_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_user',
@@ -294,7 +294,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_groups_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_group',
@@ -311,7 +311,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_hosts_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_host',
@@ -328,7 +328,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_hostgroups_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_hostgroup',
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index ab88d51bfe..bf5b3c11f7 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -318,8 +318,30 @@ class i18n_messages(Command):
             "add_retrive": _("Allow ${other_entity} to retrieve keytab of ${primary_key}"),
             "allowed_to_create": _("Allowed to create keytab"),
             "allowed_to_retrieve": _("Allowed to retrieve keytab"),
-            "remove_create": _("Disallow ${other_entity} to create keytab of ${primary_key}"),
-            "remove_retrieve": _("Disallow ${other_entity} to retrieve keytab of ${primary_key}"),
+            "remove_groups_create": _(
+                "Disallow user groups to create keytab of '${primary_key}'"
+            ),
+            "remove_groups_retrieve": _(
+                "Disallow user groups to retrieve keytab of '${primary_key}'"
+            ),
+            "remove_hostgroups_create": _(
+                "Disallow host groups to create keytab of '${primary_key}'"
+            ),
+            "remove_hostgroups_retrieve": _(
+                "Disallow host groups to retrieve keytab of '${primary_key}'"
+            ),
+            "remove_hosts_create": _(
+                "Disallow hosts to create keytab of '${primary_key}'"
+            ),
+            "remove_hosts_retrieve": _(
+                "Disallow hosts to retrieve keytab of '${primary_key}'"
+            ),
+            "remove_users_create": _(
+                "Disallow users to create keytab of '${primary_key}'"
+            ),
+            "remove_users_retrieve": _(
+                "Disallow users to retrieve keytab of '${primary_key}'"
+            ),
         },
         "krbaliases": {
             "adder_title": _("Add Kerberos Principal Alias"),

From d6b988fe1a3fd800657823cb9e605dadee5a7ace Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 13/24] Add title to 'remove' dialog for 'association_table'
 widget of 'Services' 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
---
 install/ui/src/freeipa/service.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js
index 3875210968..1bbb93fa23 100644
--- a/install/ui/src/freeipa/service.js
+++ b/install/ui/src/freeipa/service.js
@@ -205,7 +205,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_users_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_user',
@@ -222,7 +222,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_groups_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_group',
@@ -239,7 +239,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_hosts_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_host',
@@ -256,7 +256,7 @@ return {
                             add_method: 'allow_retrieve_keytab',
                             remove_method: 'disallow_retrieve_keytab',
                             add_title: '@i18n:keytab.add_retrive',
-                            remove_title: '@i18n:keytab.remove_retrieve',
+                            remove_title: '@i18n:keytab.remove_hostgroups_retrieve',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_read_keys_hostgroup',
@@ -280,7 +280,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_users_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_user',
@@ -297,7 +297,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_groups_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_group',
@@ -314,7 +314,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_hosts_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_host',
@@ -331,7 +331,7 @@ return {
                             add_method: 'allow_create_keytab',
                             remove_method: 'disallow_create_keytab',
                             add_title: '@i18n:keytab.add_create',
-                            remove_title: '@i18n:keytab.remove_create',
+                            remove_title: '@i18n:keytab.remove_hostgroups_create',
                             columns: [
                                 {
                                     name: 'ipaallowedtoperform_write_keys_hostgroup',

From f207faba724533cb6222c198c0067ae3ab68dea1 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 14/24] Add title to 'remove' dialog for 'association_table'
 widget of 'Groups' 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
---
 install/ui/src/freeipa/netgroup.js |  8 ++++----
 ipaserver/plugins/internal.py      | 12 ++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/install/ui/src/freeipa/netgroup.js b/install/ui/src/freeipa/netgroup.js
index 24acb64916..235b9dae67 100644
--- a/install/ui/src/freeipa/netgroup.js
+++ b/install/ui/src/freeipa/netgroup.js
@@ -188,7 +188,7 @@ var add_netgroup_details_facet_widgets = function (spec) {
                             add_method: 'add_member',
                             remove_method: 'remove_member',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member',
+                            remove_title: '@i18n:objects.netgroup.remove_users',
                             columns: [
                                 {
                                     name: 'memberuser_user',
@@ -204,7 +204,7 @@ var add_netgroup_details_facet_widgets = function (spec) {
                             add_method: 'add_member',
                             remove_method: 'remove_member',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member',
+                            remove_title: '@i18n:objects.netgroup.remove_groups',
                             columns: [
                                 {
                                     name: 'memberuser_group',
@@ -277,7 +277,7 @@ var add_netgroup_details_facet_widgets = function (spec) {
                             remove_method: 'remove_member',
                             external: 'externalhost',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member',
+                            remove_title: '@i18n:objects.netgroup.remove_hosts',
                             columns: [
                                 {
                                     name: 'memberhost_host',
@@ -299,7 +299,7 @@ var add_netgroup_details_facet_widgets = function (spec) {
                             add_method: 'add_member',
                             remove_method: 'remove_member',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member',
+                            remove_title: '@i18n:objects.netgroup.remove_hostgroups',
                             columns: [
                                 {
                                     name: 'memberhost_hostgroup',
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index bf5b3c11f7..55720f90de 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -868,6 +868,18 @@ class i18n_messages(Command):
                 "remove_from_netgroups": _(
                     "Remove netgroup '${primary_key}' from netgroups"
                 ),
+                "remove_groups": _(
+                    "Remove user groups from netgroup '${primary_key}'"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from netgroup '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from netgroup '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from netgroup '${primary_key}'"
+                ),
                 "specified_hosts": _("Specified Hosts and Groups"),
                 "specified_users": _("Specified Users and Groups"),
                 "user": _("User"),

From d87ffe48d3e5897e605bf2a7f9ccc6e84aa78422 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Wed, 19 Sep 2018 16:18:28 +0300
Subject: [PATCH 15/24] Allow having a custom title of 'Remove' dialog for
 'attribute_table' widget

Fixes: https://pagure.io/freeipa/issue/7704
---
 install/ui/src/freeipa/widget.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 495e294a75..35c865e071 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4188,6 +4188,7 @@ IPA.attribute_table_widget = function(spec) {
 
     that.attribute_name = spec.attribute_name || that.name;
     that.adder_dialog_spec = spec.adder_dialog;
+    that.deleter_dialog_spec = spec.deleter_dialog;
     that.css_class = spec.css_class;
 
     that.add_command = spec.add_command;
@@ -4335,9 +4336,17 @@ IPA.attribute_table_widget = function(spec) {
             return null;
         }
 
+        var title;
+        if (that.deleter_dialog_spec) {
+            var pkey = that.facet.get_pkey();
+            title = text.get(that.deleter_dialog_spec.title);
+            title = title.replace('${primary_key}', pkey);
+        }
+
         var dialog = IPA.deleter_dialog({
             entity: that.entity,
-            values: selected_values
+            values: selected_values,
+            title: title,
         });
 
         dialog.execute = function() {

From 92402c9fc28b6427da03e7835cc3b06738d2f304 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 16/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'Groups' 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
---
 install/ui/src/freeipa/automember.js | 10 ++++++++--
 ipaserver/plugins/internal.py        |  6 ++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js
index 1a2a8f1bf8..5c5144b8b8 100644
--- a/install/ui/src/freeipa/automember.js
+++ b/install/ui/src/freeipa/automember.js
@@ -295,7 +295,10 @@ IPA.automember.rule_details_facet = function(spec) {
                                 required: true
                             }
                         ]
-                    }
+                    },
+                    deleter_dialog: {
+                        title: '@i18n:objects.automember.remove_inc_conditions',
+                    },
                 }
             ]
         },
@@ -325,7 +328,10 @@ IPA.automember.rule_details_facet = function(spec) {
                                 required: true
                             }
                         ]
-                    }
+                    },
+                    deleter_dialog: {
+                        title: '@i18n:objects.automember.remove_exc_conditions',
+                    },
                 }
             ]
         }
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 55720f90de..a5e70a441c 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -476,6 +476,12 @@ class i18n_messages(Command):
                 "hostgrouprules": _("Host group rules"),
                 "inclusive": _("Inclusive"),
                 "remove": _("Remove auto membership rules"),
+                "remove_exc_conditions": _(
+                    "Remove exclusive conditions from rule '${primary_key}'"
+                ),
+                "remove_inc_conditions": _(
+                    "Remove inclusive conditions from rule '${primary_key}'"
+                ),
                 "usergrouprule": _("User group rule"),
                 "usergrouprules": _("User group rules"),
             },

From 1c23d598c1ea8e1ada16a49f88357322864bb592 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 17/24] 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
---
 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 193b89c39e..b5827dc3b6 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 a5e70a441c..d185a1a316 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"),

From 6b1395d036ed6cce320eb25e4b6eeb0473dc2404 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 18/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'Sudo' 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
---
 install/ui/src/freeipa/sudo.js | 22 ++++++++++----------
 ipaserver/plugins/internal.py  | 37 ++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js
index e12681137e..c0b6ccf85a 100644
--- a/install/ui/src/freeipa/sudo.js
+++ b/install/ui/src/freeipa/sudo.js
@@ -359,7 +359,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             remove_method: 'remove_user',
                             external: 'externaluser',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member'
+                            remove_title: '@i18n:objects.sudorule.remove_users',
                         },
                         {
                             $type: 'rule_association_table',
@@ -368,7 +368,7 @@ var add_sudorule_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.sudorule.remove_groups',
                         }
                     ]
                 }
@@ -434,7 +434,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             remove_method: 'remove_host',
                             external: 'externalhost',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member'
+                            remove_title: '@i18n:objects.sudorule.remove_hosts',
                         },
                         {
                             $type: 'rule_association_table',
@@ -443,7 +443,7 @@ var add_sudorule_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.sudorule.remove_hostgroups',
                         }
                     ]
                 }
@@ -527,7 +527,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_allow_command',
                             remove_method: 'remove_allow_command',
                             add_title: '@i18n:association.add.memberallowcmd',
-                            remove_title: '@i18n:association.remove.memberallowcmd'
+                            remove_title: '@i18n:objects.sudorule.remove_allow_cmds',
                         },
                         {
                             $type: 'rule_association_table',
@@ -536,7 +536,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_allow_command',
                             remove_method: 'remove_allow_command',
                             add_title: '@i18n:association.add.memberallowcmd',
-                            remove_title: '@i18n:association.remove.memberallowcmd'
+                            remove_title: '@i18n:objects.sudorule.remove_allow_cmdgroups',
                         },
                         {
                             $factory: IPA.header_widget,
@@ -551,7 +551,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_deny_command',
                             remove_method: 'remove_deny_command',
                             add_title: '@i18n:association.add.memberdenycmd',
-                            remove_title: '@i18n:association.remove.memberdenycmd'
+                            remove_title: '@i18n:objects.sudorule.remove_deny_cmds',
                         },
                         {
                             $type: 'rule_association_table',
@@ -560,7 +560,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_deny_command',
                             remove_method: 'remove_deny_command',
                             add_title: '@i18n:association.add.memberdenycmd',
-                            remove_title: '@i18n:association.remove.memberdenycmd'
+                            remove_title: '@i18n:objects.sudorule.remove_deny_cmdgroups',
                         }
                     ]
                 }
@@ -632,7 +632,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_runasuser',
                             remove_method: 'remove_runasuser',
                             add_title: '@i18n:association.add.ipasudorunas',
-                            remove_title: '@i18n:association.remove.ipasudorunas'
+                            remove_title: '@i18n:objects.sudorule.remove_runas_users',
                         },
                         {
                             $type: 'rule_association_table',
@@ -641,7 +641,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                             add_method: 'add_runasuser',
                             remove_method: 'remove_runasuser',
                             add_title: '@i18n:association.add.ipasudorunas',
-                            remove_title: '@i18n:association.remove.ipasudorunas'
+                            remove_title: '@i18n:objects.sudorule.remove_runas_usergroups',
                         }
                     ]
                 },
@@ -664,7 +664,7 @@ var add_sudorule_details_facet_widgets = function (spec) {
                         add_method: 'add_runasgroup',
                         remove_method: 'remove_runasgroup',
                         add_title: '@i18n:association.add.ipasudorunasgroup',
-                        remove_title: '@i18n:association.remove.ipasudorunasgroup'
+                        remove_title: '@i18n:objects.sudorule.remove_runas_groups',
                     }]
                 }
             ]
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index d185a1a316..54116804f8 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -1078,6 +1078,43 @@ class i18n_messages(Command):
                 "option_removed": _("${count} option(s) removed"),
                 "options": _("Options"),
                 "remove": _("Remove sudo rules"),
+                "remove_allow_cmds": _(
+                    "Remove allow sudo commands from sudo rule "
+                    "'${primary_key}'"
+                ),
+                "remove_allow_cmdgroups": _(
+                    "Remove allow sudo command groups from sudo rule "
+                    "'${primary_key}'"
+                ),
+                "remove_deny_cmds": _(
+                    "Remove deny sudo commands from sudo rule "
+                    "'${primary_key}'"
+                ),
+                "remove_deny_cmdgroups": _(
+                    "Remove deny sudo command groups from sudo rule "
+                    "'${primary_key}'"
+                ),
+                "remove_groups": _(
+                    "Remove user groups from sudo rule '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from sudo rule '${primary_key}'"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from sudo rule '${primary_key}'"
+                ),
+                "remove_runas_users": _(
+                    "Remove RunAs users from sudo rule '${primary_key}'"
+                ),
+                "remove_runas_usergroups": _(
+                    "Remove RunAs user groups from sudo rule '${primary_key}'"
+                ),
+                "remove_runas_groups": _(
+                    "Remove RunAs groups from sudo rule '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from sudo rule '${primary_key}'"
+                ),
                 "runas": _("As Whom"),
                 "specified_commands": _("Specified Commands and Groups"),
                 "specified_groups": _("Specified Groups"),

From 57083929d620aed0df4db63d9fc6ee2a76601700 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 19/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'SELinux' 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
---
 install/ui/src/freeipa/selinux.js |  8 ++++----
 ipaserver/plugins/internal.py     | 12 ++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/install/ui/src/freeipa/selinux.js b/install/ui/src/freeipa/selinux.js
index 2fb28826bc..bbc764b366 100644
--- a/install/ui/src/freeipa/selinux.js
+++ b/install/ui/src/freeipa/selinux.js
@@ -221,7 +221,7 @@ var add_selinux_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.selinuxusermap.remove_users',
                         },
                         {
                             $type: 'rule_association_table',
@@ -230,7 +230,7 @@ var add_selinux_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.selinuxusermap.remove_groups',
                         }
                     ]
                 }
@@ -294,7 +294,7 @@ var add_selinux_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.selinuxusermap.remove_hosts',
                         },
                         {
                             $type: 'rule_association_table',
@@ -303,7 +303,7 @@ var add_selinux_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.selinuxusermap.remove_hostgroups',
                         }
                     ]
                 }
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 54116804f8..092622ba2b 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -985,6 +985,18 @@ class i18n_messages(Command):
                 "anyone": _("Anyone"),
                 "host": _("Host"),
                 "remove": _("Remove selinux user maps"),
+                "remove_groups": _(
+                    "Remove user groups from SELinux user map '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from SELinux user map '${primary_key}'"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from SELinux user map '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from SELinux user map '${primary_key}'"
+                ),
                 "specified_hosts": _("Specified Hosts and Groups"),
                 "specified_users": _("Specified Users and Groups"),
                 "user": _("User"),

From c54fd19b6021a34a8a3e3695c2d5dd9147ddb7e5 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 20/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'CA' 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
---
 install/ui/src/freeipa/plugins/caacl.js | 14 +++++++-------
 ipaserver/plugins/internal.py           | 22 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/install/ui/src/freeipa/plugins/caacl.js b/install/ui/src/freeipa/plugins/caacl.js
index 3408693a5c..57ec84bad0 100644
--- a/install/ui/src/freeipa/plugins/caacl.js
+++ b/install/ui/src/freeipa/plugins/caacl.js
@@ -197,7 +197,7 @@ var add_caacl_details_facet_widgets = function (spec) {
                             add_method: 'add_profile',
                             remove_method: 'remove_profile',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member'
+                            remove_title: '@i18n:objects.caacl.remove_profiles',
                         }
                     ]
                 }
@@ -302,7 +302,7 @@ var add_caacl_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.caacl.remove_users',
                         },
                         {
                             $type: 'rule_association_table',
@@ -311,7 +311,7 @@ var add_caacl_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.caacl.remove_groups',
                         }
                     ]
                 },
@@ -341,7 +341,7 @@ var add_caacl_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.caacl.remove_hosts',
                         },
                         {
                             $type: 'rule_association_table',
@@ -350,7 +350,7 @@ var add_caacl_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.caacl.remove_hostgroups',
                         }
                     ]
                 },
@@ -373,7 +373,7 @@ var add_caacl_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.caacl.remove_services',
                         }
                     ]
                 },
@@ -397,7 +397,7 @@ var add_caacl_details_facet_widgets = function (spec) {
                             add_method: 'add_ca',
                             remove_method: 'remove_ca',
                             add_title: '@i18n:association.add.member',
-                            remove_title: '@i18n:association.remove.member'
+                            remove_title: '@i18n:objects.caacl.remove_ca',
                         }
                     ]
                 }
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 092622ba2b..f165e377e3 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -512,6 +512,28 @@ class i18n_messages(Command):
                 "no_ca_msg": _("If no CAs are specified, requests to the default CA are allowed."),
                 "profile": _("Profiles"),
                 "remove": _("Remove CA ACLs"),
+                "remove_ca": _(
+                    "Remove Certificate Authorities from CA ACL "
+                    "'${primary_key}'"
+                ),
+                "remove_groups": _(
+                    "Remove user groups from CA ACL '${primary_key}'"
+                ),
+                "remove_hostgroups": _(
+                    "Remove host groups from CA ACL '${primary_key}'"
+                ),
+                "remove_hosts": _(
+                    "Remove hosts from CA ACL '${primary_key}'"
+                ),
+                "remove_profiles": _(
+                    "Remove certificate profiles from CA ACL '${primary_key}'"
+                ),
+                "remove_services": _(
+                    "Remove services from CA ACL '${primary_key}'"
+                ),
+                "remove_users": _(
+                    "Remove users from CA ACL '${primary_key}'"
+                ),
                 "specified_cas": _("Specified CAs"),
                 "specified_hosts": _("Specified Hosts and Groups"),
                 "specified_profiles": _("Specified Profiles"),

From f92c0bf86c523d910eb5ead3d7732f2da71bebb1 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 21/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'Topology' 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
---
 install/ui/src/freeipa/topology.js | 3 ++-
 ipaserver/plugins/internal.py      | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/topology.js b/install/ui/src/freeipa/topology.js
index 271ff8c70e..91b41ea210 100644
--- a/install/ui/src/freeipa/topology.js
+++ b/install/ui/src/freeipa/topology.js
@@ -448,7 +448,8 @@ return {
                                 {
                                     name: 'service_relative_weight'
                                 }
-                            ]
+                            ],
+                            remove_title: '@i18n:objects.topologylocation.remove_servers',
                         }
                     ]
                 }
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index f165e377e3..4f966c583b 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -1167,6 +1167,9 @@ class i18n_messages(Command):
             },
             "topologylocation": {
                 "remove": _("Remove IPA locations"),
+                "remove_servers": _(
+                    "Remove IPA servers from IPA location '${primary_key}'"
+                ),
             },
             "topologysegment": {
                 "remove": _("Remove topology segments"),

From 5a3433e1a4eba447b548590d215f7184f308b53a Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 22/24] Add title to 'Remove' dialog for 'association_table'
 widget of 'Vault' 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
---
 install/ui/src/freeipa/vault.js | 21 ++++++++++++++-------
 ipaserver/plugins/internal.py   | 19 +++++++++++++++++++
 2 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/install/ui/src/freeipa/vault.js b/install/ui/src/freeipa/vault.js
index 29aa546791..181b0fb415 100644
--- a/install/ui/src/freeipa/vault.js
+++ b/install/ui/src/freeipa/vault.js
@@ -88,7 +88,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'member_user',
                                 label: '@i18n:objects.vault.user'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_member_users',
                     },
                     {
                         $type: 'association_table',
@@ -101,7 +102,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'member_group',
                                 label: '@i18n:objects.vault.group'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_member_groups',
                     },
                     {
                         $type: 'association_table',
@@ -115,7 +117,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'member_service',
                                 label: '@i18n:objects.vault.service'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_member_services',
                     }
                 ]
             },
@@ -137,7 +140,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'owner_user',
                                 label: '@i18n:objects.vault.user'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_owner_users',
                     },
                     {
                         $type: 'association_table',
@@ -152,7 +156,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'owner_group',
                                 label: '@i18n:objects.vault.group'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_owner_groups',
                     },
                     {
                         $type: 'association_table',
@@ -168,7 +173,8 @@ var make_vaults_details_page_spec = function() {
                                 name: 'owner_service',
                                 label: '@i18n:objects.vault.service'
                             }
-                        ]
+                        ],
+                        remove_title: '@i18n:objects.vault.remove_owner_services',
                     }
                 ]
             }
@@ -225,7 +231,8 @@ var make_my_vault_spec = function() {
             // in case that table on each facet gather more columns with these names.
             // I.e. facet with user vaults get column with name 'service', then
             // the value of 'service' column will be also added to command options.
-            additional_table_attrs: ['username', 'service', 'shared']
+            additional_table_attrs: ['username', 'service', 'shared'],
+            title: '@i18n:objects.vault.remove',
         }
     };
 
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 4f966c583b..bf1a355c47 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -1245,6 +1245,25 @@ class i18n_messages(Command):
                 "members": _("Members"),
                 "my_vaults_title": _("My User Vaults"),
                 "owners": _("Owners"),
+                "remove": _("Remove vaults"),
+                "remove_member_groups": _(
+                    "Remove user groups from members of vault '${primary_key}'"
+                ),
+                "remove_member_services": _(
+                    "Remove services from members of vault '${primary_key}'"
+                ),
+                "remove_member_users": _(
+                    "Remove users from members of vault '${primary_key}'"
+                ),
+                "remove_owner_groups": _(
+                    "Remove user groups from owners of vault '${primary_key}'"
+                ),
+                "remove_owner_services": _(
+                    "Remove services from owners of vault '${primary_key}'"
+                ),
+                "remove_owner_users": _(
+                    "Remove users from owners of vault '${primary_key}'"
+                ),
                 "service": _("Service"),
                 "service_vaults_title": _("Service Vaults"),
                 "shared": _("Shared"),

From ddd491c037d59fa7057705459ca6f837611b09a2 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 23/24] Add title to 'unprovision' dialog

To improve translation quality the title of 'unprovision' dialog
should be specified explicitly in the spec and should be an entire
sentence.

Fixes: https://pagure.io/freeipa/issue/7704
---
 install/ui/src/freeipa/host.js    | 2 --
 install/ui/src/freeipa/service.js | 3 ---
 ipaserver/plugins/internal.py     | 4 ++--
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index 1b597ac9aa..1b27bf27b2 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -927,8 +927,6 @@ IPA.host_unprovision_dialog = function(spec) {
     var that = IPA.dialog(spec);
     that.facet = spec.facet;
 
-    that.title = that.title.replace('${entity}', that.entity.metadata.label_singular);
-
     that.create_content = function() {
         that.container.append(text.get('@i18n:objects.host.unprovision_confirmation'));
     };
diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js
index 1bbb93fa23..efd4f695d8 100644
--- a/install/ui/src/freeipa/service.js
+++ b/install/ui/src/freeipa/service.js
@@ -654,9 +654,6 @@ IPA.service.unprovision_dialog = function(spec) {
     var that = IPA.dialog(spec);
     that.facet = spec.facet;
 
-    var entity_singular = that.entity.metadata.label_singular;
-    that.title = that.title.replace('${entity}', entity_singular);
-
     that.create_content = function() {
         that.container.append(text.get('@i18n:objects.service.unprovision_confirmation'));
     };
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index bf1a355c47..fe7951d0d3 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -837,7 +837,7 @@ class i18n_messages(Command):
                 "status": _("Status"),
                 "unprovision": _("Unprovision"),
                 "unprovision_confirmation": _("Are you sure you want to unprovision this host?"),
-                "unprovision_title": _("Unprovisioning ${entity}"),
+                "unprovision_title": _("Unprovisioning host"),
                 "unprovisioned": _("Host unprovisioned"),
             },
             "hostgroup": {
@@ -1051,7 +1051,7 @@ class i18n_messages(Command):
                 "status": _("Status"),
                 "unprovision": _("Unprovision"),
                 "unprovision_confirmation": _("Are you sure you want to unprovision this service?"),
-                "unprovision_title": _("Unprovisioning ${entity}"),
+                "unprovision_title": _("Unprovisioning service"),
                 "unprovisioned": _("Service unprovisioned"),
                 "valid": _("Kerberos Key Present, Service Provisioned"),
             },

From 95b1776091bad8a0ffaf0b9e227b80890aba73fb Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Sun, 16 Sep 2018 23:14:45 +0300
Subject: [PATCH 24/24] Add title to remove dialog of 'DNS' entity

To improve translation quality the title of Remove dialog
should be specified explicitly in the spec and should be an
entire sentence.

Fixes: https://pagure.io/freeipa/issue/7704
---
 ipaserver/plugins/internal.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index fe7951d0d3..2b8b680858 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -674,6 +674,7 @@ class i18n_messages(Command):
                 "ptr_redir_zones": _("Fetching DNS zones."),
                 "ptr_redir_zones_err": _("An error occurred while fetching dns zones."),
                 "redirection_dnszone": _("You will be redirected to DNS Zone."),
+                "remove": _("Remove DNS resource records"),
                 "standard": _("Standard Record Types"),
                 "title": _("Records for DNS Zone"),
                 "type": _("Record Type"),
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to