From 35fa528cdfbdfb719efe3c24a66f7f026e846a9e Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Sun, 16 Sep 2018 23:14:45 +0300 Subject: [PATCH] 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 Reviewed-By: Serhii Tsymbaliuk --- 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 37740e830..3e434b4e6 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 9b92552b7..268f12a43 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?
The change will take effect immediately."), "status_link": _("Click to ${action}"), "unlock": _("Unlock"),