Drop concatenated title of 'add' dialog for 'attribute_table' widget

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 14:39:35 +03:00 committed by Serhii Tsymbaliuk
parent 348e813b65
commit bf49664ddd

View File

@ -4418,10 +4418,9 @@ IPA.attribute_table_widget = function(spec) {
$.extend(dialog_spec, that.adder_dialog_spec);
}
var label = that.entity.metadata.label_singular;
var pkey = that.facet.get_pkey();
dialog_spec.title = text.get(dialog_spec.title || '@i18n:dialogs.add_title');
dialog_spec.title = dialog_spec.title.replace('${entity}', label);
dialog_spec.title = text.get(dialog_spec.title ||
'@i18n:dialogs.add_title_default');
dialog_spec.title = dialog_spec.title.replace('${pkey}', pkey);