Add title to 'add' dialog for 'Sudo' entity

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

Fixes: https://pagure.io/freeipa/issue/7707
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Stanislav Levin 2018-09-21 11:45:28 +03:00 committed by Serhii Tsymbaliuk
parent fd732aaafe
commit 8655c9beb0
2 changed files with 8 additions and 4 deletions

View File

@ -97,6 +97,7 @@ var spec = {
}
],
adder_dialog: {
title: '@i18n:objects.sudorule.add',
fields: [ 'cn' ]
},
deleter_dialog: {
@ -160,6 +161,7 @@ return {
],
standard_association_facets: true,
adder_dialog: {
title: '@i18n:objects.sudocmd.add',
fields: [
'sudocmd',
{
@ -224,6 +226,7 @@ return {
],
standard_association_facets: true,
adder_dialog: {
title: '@i18n:objects.sudocmdgroup.add',
fields: [
'cn',
{
@ -804,12 +807,9 @@ IPA.sudo.options_section = function(spec) {
var label = IPA.get_command_option('sudorule_add_option', 'ipasudoopt').label;
var title = text.get('@i18n:dialogs.add_title');
title = title.replace('${entity}', label);
var dialog = IPA.dialog({
name: 'option-adder-dialog',
title: title,
title: text.get('@i18n:objects.sudorule.add_option'),
sections: [
{
fields: [

View File

@ -1100,6 +1100,7 @@ class i18n_messages(Command):
"user_categories": _("User categories"),
},
"sudocmd": {
"add": _("Add sudo command"),
"groups": _("Groups"),
"remove": _("Remove sudo commands"),
"remove_from_sudocmdgroups": _(
@ -1108,6 +1109,7 @@ class i18n_messages(Command):
),
},
"sudocmdgroup": {
"add": _("Add sudo command group"),
"commands": _("Commands"),
"remove": _("Remove sudo command groups"),
"remove_sudocmds": _(
@ -1116,6 +1118,8 @@ class i18n_messages(Command):
),
},
"sudorule": {
"add": _("Add sudo rule"),
"add_option": _("Add sudo option"),
"allow": _("Allow"),
"any_command": _("Any Command"),
"any_group": _("Any Group"),