From dcf1803c961d7c00fddd7f87472dd674f8933baf Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Sep 28 2018 08:30:22 +0000 Subject: 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 Reviewed-By: Serhii Tsymbaliuk Reviewed-By: Christian Heimes --- diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js index b530e13..1acb426 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 a7646a4..22cd242 100644 --- a/install/ui/src/freeipa/hostgroup.js +++ b/install/ui/src/freeipa/hostgroup.js @@ -65,27 +65,41 @@ 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 edb66e5..24acb64 100644 --- a/install/ui/src/freeipa/netgroup.js +++ b/install/ui/src/freeipa/netgroup.js @@ -59,8 +59,14 @@ var spec = { }, { $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 03a478d..d82ec25 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"),