From d97ff69ed1bf62c052f4e6e506ccd4d4e2ca585a 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 '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 Reviewed-By: Serhii Tsymbaliuk --- 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 2d3570006..f63cad4ea 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 268f12a43..13d47e143 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?"),