Add title to 'add' dialog for 'association_table' widget of Topology entity

To improve translation quality the title of 'Add' 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/7712
Fixes: https://pagure.io/freeipa/issue/7714
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
Stanislav Levin 2018-09-25 11:11:48 +03:00 committed by Serhii Tsymbaliuk
parent 29ca7bf308
commit 0f30fd8345
2 changed files with 5 additions and 4 deletions

View File

@ -170,6 +170,7 @@ return {
}
],
adder_dialog: {
title: '@i18n:objects.topologysegment.add',
fields: [
{
name: 'cn',
@ -449,6 +450,7 @@ return {
name: 'service_relative_weight'
}
],
add_title: '@i18n:objects.topologylocation.add_server',
remove_title: '@i18n:objects.topologylocation.remove_servers'
}
]
@ -714,14 +716,10 @@ topology.location_association_table_widget = function(spec) {
that.create_add_dialog = function() {
var entity_label = that.entity.metadata.label_singular;
var pkey = that.facet.get_pkey();
var other_entity_label = that.other_entity.metadata.label_singular;
var title = that.add_title;
title = title.replace('${entity}', entity_label);
title = title.replace('${primary_key}', pkey);
title = title.replace('${other_entity}', other_entity_label);
return topology.location_server_adder_dialog({
title: title,

View File

@ -1452,6 +1452,9 @@ class i18n_messages(Command):
},
"topologylocation": {
"add": _("Add IPA location"),
"add_server": _(
"Add IPA server into IPA location '${primary_key}'"
),
"remove": _("Remove IPA locations"),
"remove_servers": _(
"Remove IPA servers from IPA location '${primary_key}'"