Drop concatenated title of remove dialog

As for now the default title of remove dialogs, which are
initialized from 'association_table' facet, is set to something
like 'Remove ${other_entity} from ${entity} ${primary_key}',
where 'other_entity' and 'entity' are also translatable texts.
This construction is used via method 'show_remove_dialog'
of 'association_table' widget for the all 'Delete' actions within
details of entities.

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/7704
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Stanislav Levin 2018-09-16 22:52:46 +03:00 committed by Serhii Tsymbaliuk
parent f658a3d107
commit 43d9eda919

View File

@ -735,14 +735,10 @@ IPA.association_table_widget = function (spec) {
return;
}
var entity_label = that.entity.metadata.label_singular;
var pkey = that.facet.get_pkey();
var other_entity_label = that.other_entity.metadata.label;
var title = that.remove_title;
title = title.replace('${entity}', entity_label);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', other_entity_label);
var dialog = IPA.association_deleter_dialog({
title: title,