From 0f30fd834576ab6e83247b1c2741e21e5ebeb8a5 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Tue, 25 Sep 2018 11:11:48 +0300 Subject: [PATCH] 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 --- install/ui/src/freeipa/topology.js | 6 ++---- ipaserver/plugins/internal.py | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install/ui/src/freeipa/topology.js b/install/ui/src/freeipa/topology.js index 1903f6ace..5f163d22e 100644 --- a/install/ui/src/freeipa/topology.js +++ b/install/ui/src/freeipa/topology.js @@ -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, diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py index cc7e50358..9ed44ccfa 100644 --- a/ipaserver/plugins/internal.py +++ b/ipaserver/plugins/internal.py @@ -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}'"