From 01eba53c80d9b1cf8a10057b5665c00cba752698 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Mon, 24 Sep 2018 11:41:58 +0300 Subject: [PATCH] Add title to 'add' dialog for details of 'ID Views' entity To improve translation quality the title of 'Add' dialog, which is initialized within details 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/idviews.js | 2 -- ipaserver/plugins/internal.py | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/install/ui/src/freeipa/idviews.js b/install/ui/src/freeipa/idviews.js index 21a417935..285f6d7d1 100644 --- a/install/ui/src/freeipa/idviews.js +++ b/install/ui/src/freeipa/idviews.js @@ -718,10 +718,8 @@ idviews.apply_action = function(spec) { var pkey = facet.get_pkey(); var other_entity = reg.entity.get(that.other_entity); - var other_entity_label = other_entity.metadata.label; var exclude = that.get_exclude(facet); var title = text.get(that.dialog_title); - title = title.replace('${entity}', other_entity_label); title = title.replace('${primary_key}', pkey); var dialog = IPA.association_adder_dialog({ diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py index 473171ca9..04fe55278 100644 --- a/ipaserver/plugins/internal.py +++ b/ipaserver/plugins/internal.py @@ -966,9 +966,13 @@ class i18n_messages(Command): "appliedtohosts": _("Applied to hosts"), "appliedtohosts_title": _("Applied to hosts"), "apply_hostgroups": _("Apply to host groups"), - "apply_hostgroups_title": _("Apply ID View ${primary_key} on hosts of ${entity}"), + "apply_hostgroups_title": _( + "Apply ID view '${primary_key}' on hosts of host groups" + ), "apply_hosts": _("Apply to hosts"), - "apply_hosts_title": _("Apply ID view ${primary_key} on ${entity}"), + "apply_hosts_title": _( + "Apply ID view '${primary_key}' on hosts" + ), "ipaassignedidview": _("Assigned ID View"), "overrides_tab": _("${primary_key} overrides:"), "remove": _("Remove ID views"), @@ -976,12 +980,13 @@ class i18n_messages(Command): "remove_groups": _("Remove group ID overrides"), "unapply_hostgroups": _("Un-apply from host groups"), "unapply_hostgroups_all_title": _("Un-apply ID Views from hosts of hostgroups"), - "unapply_hostgroups_title": _("Un-apply ID View ${primary_key} from hosts of ${entity}"), "unapply_hosts": _("Un-apply"), "unapply_hosts_all": _("Un-apply from hosts"), "unapply_hosts_all_title": _("Un-apply ID Views from hosts"), "unapply_hosts_confirm": _("Are you sure you want to un-apply ID view from selected entries?"), - "unapply_hosts_title": _("Un-apply ID View ${primary_key} from hosts"), + "unapply_hosts_title": _( + "Un-apply ID view '${primary_key}' from hosts" + ), }, "krbtpolicy": { "identity": _("Kerberos Ticket Policy"),