From bcf922369fe1a2a0321d988f18faaee053178417 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Oct 01 2018 09:34:08 +0000 Subject: Add title to 'add' dialog for 'Topology' entity 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 --- diff --git a/install/ui/src/freeipa/topology.js b/install/ui/src/freeipa/topology.js index 4c4b381..1903f6a 100644 --- a/install/ui/src/freeipa/topology.js +++ b/install/ui/src/freeipa/topology.js @@ -457,6 +457,7 @@ return { } ], adder_dialog: { + title: '@i18n:objects.topologylocation.add', fields: [ { $type: 'text', @@ -1015,10 +1016,7 @@ topology.create_add_dialog = function(spec) { spec.entity = spec.entity || 'topologysegment'; - var entity = reg.entity.get('topologysegment'); - var title = text.get('@i18n:dialogs.add_title'); - var label = entity.metadata.label_singular; - spec.title = title.replace('${entity}', label); + spec.title = text.get('@i18n:objects.topologysegment.add'); spec.fields = spec.fields || [ { diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py index f50237c..c1ca95d 100644 --- a/ipaserver/plugins/internal.py +++ b/ipaserver/plugins/internal.py @@ -1206,12 +1206,14 @@ class i18n_messages(Command): "insufficient_domain_level" : _("Managed topology requires minimal domain level ${domainlevel}"), }, "topologylocation": { + "add": _("Add IPA location"), "remove": _("Remove IPA locations"), "remove_servers": _( "Remove IPA servers from IPA location '${primary_key}'" ), }, "topologysegment": { + "add": _("Add topology segment"), "remove": _("Remove topology segments"), }, "trust": {