Drop concatenated title of remove dialog

As for now the default title of remove dialogs is set to
'Remove ${entity}', where 'entity' is also translatable text.
This construction is used via method 'create_remove_dialog'
of Search facet for the all association 'Delete' actions of
entities.

The such concatenation leads to a bad quality translation and
should be changed to an entire sentence.

From now a mentioned title is taken from a spec and should be
specified explicitly.

Fixes: https://pagure.io/freeipa/issue/7699
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Stanislav Levin 2018-09-12 17:48:44 +03:00 committed by Serhii Tsymbaliuk
parent c6b3cf6dd7
commit 09750589f5
3 changed files with 7 additions and 8 deletions

View File

@ -230,10 +230,8 @@ IPA.search_facet = function(spec, no_init) {
dialog.facet = that;
dialog.pkey_prefix = that.managed_entity_pkey_prefix();
title = text.get('@i18n:dialogs.remove_title');
var label = that.managed_entity.metadata.label;
dialog.title = title.replace('${entity}', label);
dialog.title = dialog.title ||
text.get('@i18n:dialogs.remove_title_default');
dialog.set_values(values);
return dialog;

View File

@ -855,7 +855,6 @@ IPA.sudo.options_section = function(spec) {
that.show_remove_dialog = function() {
var label = IPA.get_command_option('sudorule_add_option', 'ipasudoopt').label;
var values = that.table.get_selected_values();
if (!values.length) {
@ -866,8 +865,7 @@ IPA.sudo.options_section = function(spec) {
var pkey = that.facet.get_pkey();
var title = text.get('@i18n:dialogs.remove_title');
title = title.replace('${entity}', label);
var title = text.get('@i18n:objects.sudooptions.remove');
var dialog = IPA.deleter_dialog({
title: title,

View File

@ -287,7 +287,7 @@ class i18n_messages(Command):
"prospective": _("Prospective"),
"redirection": _("Redirection"),
"remove_empty": _("Select entries to be removed."),
"remove_title": _("Remove ${entity}"),
"remove_title_default": _("Remove"),
"result": _("Result"),
"show_details": _("Show details"),
"success": _("Success"),
@ -866,6 +866,9 @@ class i18n_messages(Command):
"specified_users": _("Specified Users and Groups"),
"user": _("Who"),
},
"sudooptions": {
"remove": _("Remove sudo options"),
},
"topology": {
"autogenerated": _("Autogenerated"),
"segment_details": _("Segment details"),