From c2eebee3b38ca4637527b92b9a26484949849f3e Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Sun, 16 Sep 2018 23:14:45 +0300 Subject: [PATCH] Add title to 'Remove' dialog for 'association_table' widget of '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 Reviewed-By: Serhii Tsymbaliuk --- 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 e12681137..c0b6ccf85 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 550119874..2f38c7340 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"),