URL: https://github.com/freeipa/freeipa/pull/2378
Author: stanislavlevin
 Title: #2378: Fix translation of title of entity's add dialog
Action: opened

PR body:
"""
As for now the default title of 'add' dialog is set to something like:
```
'Add ${entity}'
```
where 'entity' is also translatable text. Such construction is used via method 
'adder_dialog' of Entity for the all 'Add' actions.

From now a mentioned title (containing entire sentence) is taken from the spec 
and should be specified explicitly.
    
Fixes: https://pagure.io/freeipa/issue/7707
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2378/head:pr2378
git checkout pr2378
From cd29b521464e9053f489359ca49bb93699fded10 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:37:01 +0300
Subject: [PATCH 01/23] Drop concatenated title of 'add' dialog

As for now the default title of 'add' dialog is set to something
like 'Add ${entity}', where 'entity' is also translatable text.
Such construction is used via method 'adder_dialog' of Entity
for the all 'Add' actions.

This leads to a bad quality translation and should be changed to
an entire sentence.

From now a mentioned title is taken from a spec and should be
specified explicitly.

Fixes: https://pagure.io/freeipa/issue/7707
---
 install/ui/src/freeipa/entity.js | 6 +-----
 ipaserver/plugins/internal.py    | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/install/ui/src/freeipa/entity.js b/install/ui/src/freeipa/entity.js
index 61698e859c..a7901df935 100644
--- a/install/ui/src/freeipa/entity.js
+++ b/install/ui/src/freeipa/entity.js
@@ -709,11 +709,7 @@ exp.entity_builder = IPA.entity_builder = function(entity) {
         spec.$factory = spec.$factory || IPA.entity_adder_dialog;
         spec.name = spec.name || 'add';
 
-        if (!spec.title) {
-            var title = text.get('@i18n:dialogs.add_title');
-            var label = entity.metadata.label_singular;
-            spec.title = title.replace('${entity}', label);
-        }
+        spec.title = spec.title || text.get('@i18n:dialogs.add_title_default');
 
         return that.dialog(spec);
     };
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 142560d933..f0bd98bff6 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -272,7 +272,7 @@ class i18n_messages(Command):
         "dialogs": {
             "add_confirmation": _("${entity} successfully added"),
             "add_custom_value": _("Add custom value"),
-            "add_title": _("Add ${entity}"),
+            "add_title_default": _("Add"),
             "available": _("Available"),
             "batch_error_message": _("Some operations failed."),
             "batch_error_title": _("Operations Error"),

From 25a17f8e3ed9f67d1dc082405f53ff1ffc97216b Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 02/23] Add title to 'add' dialog for 'Users' 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
---
 install/ui/src/freeipa/stageuser.js | 1 +
 install/ui/src/freeipa/user.js      | 3 ++-
 ipaserver/plugins/internal.py       | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/stageuser.js b/install/ui/src/freeipa/stageuser.js
index 75f03bb892..248c7fc7e2 100644
--- a/install/ui/src/freeipa/stageuser.js
+++ b/install/ui/src/freeipa/stageuser.js
@@ -250,6 +250,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.stageuser.add',
         sections: [
             {
                 fields: [
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index 37740e8305..47bd1b8daa 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -498,6 +498,7 @@ return {
         $pre_ops: [ IPA.user.association_facet_ss_pre_op ]
     },
     adder_dialog: {
+        title: '@i18n:objects.user.add',
         $factory: IPA.user.adder_dialog,
         sections: [
             {
@@ -841,7 +842,7 @@ IPA.user.add_otptoken_action = function(spec) {
 
     spec = spec || {};
     spec.name = spec.name || 'add_otptoken';
-    spec.label = spec.label || '@i18n:objects.otptoken.add_token';
+    spec.label = spec.label || '@i18n:objects.otptoken.add';
     spec.disable_cond = spec.disable_cond || ['self-service-other'];
 
     var that = IPA.action(spec);
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index f0bd98bff6..52315c0ce1 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -876,6 +876,7 @@ class i18n_messages(Command):
                 "activate_confirm": _("Are you sure you want to activate selected users?"),
                 "activate_one_confirm": _("Are you sure you want to activate ${object}?"),
                 "activate_success": _("${count} user(s) activated"),
+                "add": _("Add stage user"),
                 "label": _("Stage users"),
                 "preserved_label": _("Preserved users"),
                 "preserved_remove": _("Remove preserved users"),
@@ -957,6 +958,7 @@ class i18n_messages(Command):
                 "account": _("Account Settings"),
                 "account_status": _("Account Status"),
                 "activeuser_label": _("Active users"),
+                "add": _("Add user"),
                 "contact": _("Contact Settings"),
                 "delete_mode": _("Delete mode"),
                 "employee": _("Employee Information"),

From 5ffa37fe9b68fa42fe26c3234e72a2127f3d2b9c Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 03/23] Add title to 'add' dialog for 'OTP' 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
---
 install/ui/src/freeipa/otptoken.js | 1 +
 ipaserver/plugins/internal.py      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js
index ebd161dc05..91f4f53c1d 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -231,6 +231,7 @@ return {
     ],
 
     adder_dialog: {
+        title: '@i18n:objects.otptoken.add',
         $factory: otptoken.adder_dialog,
         $pre_ops: [
             otptoken.adder_dialog_preop
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 52315c0ce1..db7985fb5b 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -759,7 +759,7 @@ class i18n_messages(Command):
                 "users": _("Users"),
             },
             "otptoken": {
-                "add_token": _("Add OTP Token"),
+                "add": _("Add OTP token"),
                 "app_link": _("You can use <a href=\"${link}\" target=\"_blank\">FreeOTP<a/> as a software OTP token application."),
                 "config_title": _("Configure your token"),
                 "config_instructions": _("Configure your token by scanning the QR code below. Click on the QR code if you see this on the device you want to configure."),

From 1fb972d2ebc514137e919f60b5454bd7e17fd1da Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 04/23] Add title to 'add' dialog for 'Host' 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
---
 install/ui/src/freeipa/host.js | 1 +
 ipaserver/plugins/internal.py  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index 2d35700066..43920005a4 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -438,6 +438,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.host.add',
         $factory: IPA.host_adder_dialog,
         height: 300,
         sections: [
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index db7985fb5b..95369ac154 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -674,6 +674,7 @@ class i18n_messages(Command):
                 "unmatched": _("Unmatched"),
             },
             "host": {
+                "add": _("Add host"),
                 "certificate": _("Host Certificate"),
                 "cn": _("Host Name"),
                 "delete_key_unprovision": _("Delete Key, Unprovision"),

From a2b33d737b9c7515c3bced98b3aa84faa269c4f2 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 05/23] Add title to 'add' dialog for 'Service' 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
---
 install/ui/src/freeipa/service.js | 1 +
 ipaserver/plugins/internal.py     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js
index 9db799ae5d..984a878df2 100644
--- a/install/ui/src/freeipa/service.js
+++ b/install/ui/src/freeipa/service.js
@@ -375,6 +375,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.service.add',
         $factory: IPA.service_adder_dialog,
         height: 350,
         sections: [
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 95369ac154..927a994352 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -848,6 +848,7 @@ class i18n_messages(Command):
                 "remove_server_msg": _("Deleting a server removes it permanently from the topology. Note that this is a non-reversible action.")
             },
             "service": {
+                "add": _("Add service"),
                 "certificate": _("Service Certificate"),
                 "delete_key_unprovision": _("Delete Key, Unprovision"),
                 "details": _("Service Settings"),

From c39c8a2318c452894222879182030a36ba9334a0 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 06/23] Add title to 'add' dialog for 'Groups' 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
---
 install/ui/src/freeipa/group.js     | 1 +
 install/ui/src/freeipa/hostgroup.js | 1 +
 install/ui/src/freeipa/netgroup.js  | 1 +
 ipaserver/plugins/internal.py       | 3 +++
 4 files changed, 6 insertions(+)

diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js
index b530e13397..2b9431ec49 100644
--- a/install/ui/src/freeipa/group.js
+++ b/install/ui/src/freeipa/group.js
@@ -177,6 +177,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.group.add',
         $factory: IPA.group_adder_dialog,
         fields: [
             'cn',
diff --git a/install/ui/src/freeipa/hostgroup.js b/install/ui/src/freeipa/hostgroup.js
index a7646a4c05..8409379107 100644
--- a/install/ui/src/freeipa/hostgroup.js
+++ b/install/ui/src/freeipa/hostgroup.js
@@ -90,6 +90,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.hostgroup.add',
         fields: [
             'cn',
             {
diff --git a/install/ui/src/freeipa/netgroup.js b/install/ui/src/freeipa/netgroup.js
index edb66e550c..07a5cd8b19 100644
--- a/install/ui/src/freeipa/netgroup.js
+++ b/install/ui/src/freeipa/netgroup.js
@@ -65,6 +65,7 @@ var spec = {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.netgroup.add',
         fields: [
             'cn',
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 927a994352..ffaa76456a 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -627,6 +627,7 @@ class i18n_messages(Command):
                 "set": _("Set Domain Level"),
             },
             "group": {
+                "add": _("Add user group"),
                 "details": _("Group Settings"),
                 "external": _("External"),
                 "groups": _("Groups"),
@@ -703,6 +704,7 @@ class i18n_messages(Command):
                 "unprovisioned": _("Host unprovisioned"),
             },
             "hostgroup": {
+                "add": _("Add host group"),
                 "host_group": _("Host Groups"),
                 "identity": _("Host Group Settings"),
                 "remove": _("Remove host groups"),
@@ -744,6 +746,7 @@ class i18n_messages(Command):
                 "identity": _("Kerberos Ticket Policy"),
             },
             "netgroup": {
+                "add": _("Add netgroup"),
                 "any_host": _("Any Host"),
                 "anyone": _("Anyone"),
                 "external": _("External"),

From 4a3ac7e1dae185c7e466327ca7a8ef86bc5ed014 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 07/23] Add title to 'add' dialog for 'ID Views' 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
---
 install/ui/src/freeipa/idviews.js | 3 +++
 ipaserver/plugins/internal.py     | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/install/ui/src/freeipa/idviews.js b/install/ui/src/freeipa/idviews.js
index 66cdf4950c..dbca8ac99a 100644
--- a/install/ui/src/freeipa/idviews.js
+++ b/install/ui/src/freeipa/idviews.js
@@ -208,6 +208,7 @@ return {
     ],
 
     adder_dialog: {
+        title: '@i18n:objects.idview.add',
         fields: [
             'cn',
             {
@@ -291,6 +292,7 @@ return {
     ],
 
     adder_dialog: {
+        title: '@i18n:objects.idview.add_user',
         policies: [
             { $factory: idviews.idoverride_adder_policy }
         ],
@@ -386,6 +388,7 @@ return {
     ],
 
     adder_dialog: {
+        title: '@i18n:objects.idview.add_group',
         policies: [
             { $factory: idviews.idoverride_adder_policy }
         ],
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index ffaa76456a..11135e6d91 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -721,6 +721,9 @@ class i18n_messages(Command):
                 "anchor_tooltip_ad": _("Enter trusted group name."),
             },
             "idview": {
+                "add": _("Add ID view"),
+                "add_group": _("Add group ID override"),
+                "add_user": _("Add user ID override"),
                 "appliesto_tab": _("${primary_key} applies to:"),
                 "appliedtohosts": _("Applied to hosts"),
                 "appliedtohosts_title": _("Applied to hosts"),

From 39e10227ae0b5c9f0331fa047fb349ae4611e7de Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 14:39:35 +0300
Subject: [PATCH 08/23] 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
---
 install/ui/src/freeipa/widget.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 495e294a75..f0f418ff48 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4409,10 +4409,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);
 
 

From 65d75beb030bb0daa6ad442e04f820376e3616fb Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 09/23] Add title to 'add' dialog for 'Automember' 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
---
 install/ui/src/freeipa/automember.js | 6 +++---
 install/ui/src/freeipa/widget.js     | 2 +-
 ipaserver/plugins/internal.py        | 9 +++++++--
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/install/ui/src/freeipa/automember.js b/install/ui/src/freeipa/automember.js
index 1a2a8f1bf8..dad8b13a60 100644
--- a/install/ui/src/freeipa/automember.js
+++ b/install/ui/src/freeipa/automember.js
@@ -105,7 +105,7 @@ return {
     ],
     adder_dialog: {
         $factory: IPA.automember.rule_adder_dialog,
-        title: '@i18n:objects.automember.add_rule',
+        title: '@i18n:objects.automember.add',
         fields: [
             {
                 $type: 'entity_select',
@@ -281,7 +281,7 @@ IPA.automember.rule_details_facet = function(spec) {
                     add_command: 'add_condition',
                     remove_command: 'remove_condition',
                     adder_dialog: {
-                        title: '@i18n:objects.automember.add_condition',
+                        title: '@i18n:objects.automember.add_inc_condition',
                         fields: [
                             {
                                 name: 'key',
@@ -311,7 +311,7 @@ IPA.automember.rule_details_facet = function(spec) {
                     add_command: 'add_condition',
                     remove_command: 'remove_condition',
                     adder_dialog: {
-                        title: '@i18n:objects.automember.add_condition',
+                        title: '@i18n:objects.automember.add_exc_condition',
                         fields:  [
                             {
                                 name: 'key',
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index f0f418ff48..017de5f5c7 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4412,7 +4412,7 @@ IPA.attribute_table_widget = function(spec) {
         var pkey = that.facet.get_pkey();
         dialog_spec.title = text.get(dialog_spec.title ||
                                          '@i18n:dialogs.add_title_default');
-        dialog_spec.title = dialog_spec.title.replace('${pkey}', pkey);
+        dialog_spec.title = dialog_spec.title.replace('${primary_key}', pkey);
 
 
         var factory = dialog_spec.$factory || IPA.entity_adder_dialog;
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 11135e6d91..de14277c98 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -423,8 +423,13 @@ class i18n_messages(Command):
                 "remove": _("Remove self service permissions"),
             },
             "automember": {
-                "add_condition": _("Add Condition into ${pkey}"),
-                "add_rule": _("Add Rule"),
+                "add": _("Add rule"),
+                "add_inc_condition": _(
+                    "Add inclusive condition into '${primary_key}'"
+                ),
+                "add_exc_condition": _(
+                    "Add exclusive condition into '${primary_key}'"
+                ),
                 "attribute": _("Attribute"),
                 "default_host_group": _("Default host group"),
                 "default_user_group": _("Default user group"),

From f298819e9779438c7361a5b1ecf56e264d457225 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 10/23] Add title to 'add' dialog for 'HBAC' 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
---
 install/ui/src/freeipa/hbac.js | 3 +++
 ipaserver/plugins/internal.py  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/install/ui/src/freeipa/hbac.js b/install/ui/src/freeipa/hbac.js
index 674de79d40..6b875a3687 100644
--- a/install/ui/src/freeipa/hbac.js
+++ b/install/ui/src/freeipa/hbac.js
@@ -97,6 +97,7 @@ var spec =  {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.hbacrule.add',
         fields: [ 'cn' ]
     },
     deleter_dialog: {
@@ -158,6 +159,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.hbacsvc.add',
         fields: [
             'cn',
             {
@@ -220,6 +222,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.hbacsvcgroup.add',
         fields: [
             'cn',
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index de14277c98..2b5f41aabe 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -646,6 +646,7 @@ class i18n_messages(Command):
                 "user_groups": _("User Groups"),
             },
             "hbacrule": {
+                "add": _("Add HBAC rule"),
                 "any_host": _("Any Host"),
                 "any_service": _("Any Service"),
                 "anyone": _("Anyone"),
@@ -659,9 +660,11 @@ class i18n_messages(Command):
                 "user": _("Who"),
             },
             "hbacsvc": {
+                "add": _("Add HBAC service"),
                 "remove": _("Remove HBAC services"),
             },
             "hbacsvcgroup": {
+                "add": _("Add HBAC service group"),
                 "remove": _("Remove HBAC service groups"),
                 "services": _("Services"),
             },

From fe89b90e8d155e7fa863dec4993f486291e74ad6 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 11/23] Add title to 'add' dialog for 'Sudo' 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
---
 install/ui/src/freeipa/sudo.js | 8 ++++----
 ipaserver/plugins/internal.py  | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/install/ui/src/freeipa/sudo.js b/install/ui/src/freeipa/sudo.js
index 497964a08e..441df050c3 100644
--- a/install/ui/src/freeipa/sudo.js
+++ b/install/ui/src/freeipa/sudo.js
@@ -97,6 +97,7 @@ var spec = {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.sudorule.add',
         fields: [ 'cn' ]
     },
     deleter_dialog: {
@@ -159,6 +160,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.sudocmd.add',
         fields: [
             'sudocmd',
             {
@@ -222,6 +224,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.sudocmdgroup.add',
         fields: [
             'cn',
             {
@@ -802,12 +805,9 @@ IPA.sudo.options_section = function(spec) {
 
         var label = IPA.get_command_option('sudorule_add_option', 'ipasudoopt').label;
 
-        var title = text.get('@i18n:dialogs.add_title');
-        title = title.replace('${entity}', label);
-
         var dialog = IPA.dialog({
             name: 'option-adder-dialog',
-            title: title,
+            title: text.get('@i18n:objects.sudorule.add_option'),
             sections: [
                 {
                     fields: [
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 2b5f41aabe..dc2bf34cf7 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -906,14 +906,18 @@ class i18n_messages(Command):
                 "user_categories": _("User categories"),
             },
             "sudocmd": {
+                "add": _("Add sudo command"),
                 "groups": _("Groups"),
                 "remove": _("Remove sudo commands"),
             },
             "sudocmdgroup": {
+                "add": _("Add sudo command group"),
                 "commands": _("Commands"),
                 "remove": _("Remove sudo command groups"),
             },
             "sudorule": {
+                "add": _("Add sudo rule"),
+                "add_option": _("Add sudo option"),
                 "allow": _("Allow"),
                 "any_command": _("Any Command"),
                 "any_group": _("Any Group"),

From 99ecd61f094f911115c1b90696945a26daa28194 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 12/23] Add title to 'add' dialog for 'SELinux' 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
---
 install/ui/src/freeipa/selinux.js | 1 +
 ipaserver/plugins/internal.py     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/selinux.js b/install/ui/src/freeipa/selinux.js
index 2fb28826bc..c7b80e9bf3 100644
--- a/install/ui/src/freeipa/selinux.js
+++ b/install/ui/src/freeipa/selinux.js
@@ -95,6 +95,7 @@ var spec = {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.selinuxusermap.add',
         fields: [
             'cn',
             'ipaselinuxuser'
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index dc2bf34cf7..c6c2a3c283 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -843,6 +843,7 @@ class i18n_messages(Command):
             "selfservice": {
             },
             "selinuxusermap": {
+                "add": _("Add SELinux user map"),
                 "any_host": _("Any Host"),
                 "anyone": _("Anyone"),
                 "host": _("Host"),

From 39487ed6c5fecde3239086e81b38efa9e7821859 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 13/23] Add title to 'add' dialog for 'Password Policies'
 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
---
 install/ui/src/freeipa/policy.js | 1 +
 ipaserver/plugins/internal.py    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/policy.js b/install/ui/src/freeipa/policy.js
index b890f2bda3..df3e544ebc 100644
--- a/install/ui/src/freeipa/policy.js
+++ b/install/ui/src/freeipa/policy.js
@@ -79,6 +79,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.pwpolicy.add',
         fields: [
             {
                 $type: 'entity_select',
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index c6c2a3c283..f9b6c5258d 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -808,6 +808,7 @@ class i18n_messages(Command):
                 "status_new_s": _("New: key set"),
             },
             "pwpolicy": {
+                "add": _("Add password policy"),
                 "identity": _("Password Policy"),
                 "remove": _("Remove password policies"),
             },

From 55bbc878b13eef6db665922381f3013ebf4349e5 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 14/23] Add title to 'add' dialog for 'Certificates' 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
---
 install/ui/src/freeipa/plugins/ca.js    | 1 +
 install/ui/src/freeipa/plugins/caacl.js | 1 +
 ipaserver/plugins/internal.py           | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/install/ui/src/freeipa/plugins/ca.js b/install/ui/src/freeipa/plugins/ca.js
index 33a21f0109..71373f6af4 100644
--- a/install/ui/src/freeipa/plugins/ca.js
+++ b/install/ui/src/freeipa/plugins/ca.js
@@ -51,6 +51,7 @@ function(IPA, $, phases, reg, cert) {
              }
          ],
          adder_dialog: {
+             title: '@i18n:objects.ca.add',
              fields: [
                  {
                      $type: 'text',
diff --git a/install/ui/src/freeipa/plugins/caacl.js b/install/ui/src/freeipa/plugins/caacl.js
index 3408693a5c..f1c0389379 100644
--- a/install/ui/src/freeipa/plugins/caacl.js
+++ b/install/ui/src/freeipa/plugins/caacl.js
@@ -84,6 +84,7 @@ var spec = {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.caacl.add',
         fields: [
             'cn',
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index f9b6c5258d..89de6367d7 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -456,9 +456,11 @@ class i18n_messages(Command):
                 "remove": _("Remove automount maps"),
             },
             "ca": {
+                "add": _("Add certificate authority"),
                 "remove": _("Remove certificate authorities"),
             },
             "caacl": {
+                "add": _("Add CA ACL"),
                 "all": _("All"),
                 "any_ca": _("Any CA"),
                 "any_host": _("Any Host"),

From 027ca06adda531f1a49946f2672336c1122b6cc8 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 15/23] Add title to 'add' dialog for 'RADIUS' 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
---
 install/ui/src/freeipa/radiusproxy.js | 1 +
 ipaserver/plugins/internal.py         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/radiusproxy.js b/install/ui/src/freeipa/radiusproxy.js
index cb464ec9e1..bd161879c4 100644
--- a/install/ui/src/freeipa/radiusproxy.js
+++ b/install/ui/src/freeipa/radiusproxy.js
@@ -85,6 +85,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.radiusproxy.add',
         fields: [
             'cn',
             'ipatokenradiusserver',
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 89de6367d7..5aefe49a3d 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -831,6 +831,7 @@ class i18n_messages(Command):
                 "type_winsync": _("Active Directory winsync"),
             },
             "radiusproxy": {
+                "add": _("Add RADIUS server"),
                 "details": _("RADIUS Proxy Server Settings"),
                 "remove": _("Remove RADIUS servers"),
             },

From 4857b1bba652aac3f70c4a6e61abe6ee3e50f50f Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 16/23] Add title to 'add' dialog for 'Certificate Identity'
 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
---
 install/ui/src/freeipa/plugins/certmap.js | 1 +
 ipaserver/plugins/internal.py             | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/install/ui/src/freeipa/plugins/certmap.js b/install/ui/src/freeipa/plugins/certmap.js
index 04c54d506e..4d77b511da 100644
--- a/install/ui/src/freeipa/plugins/certmap.js
+++ b/install/ui/src/freeipa/plugins/certmap.js
@@ -133,6 +133,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.certmap.add',
         fields: [
             'cn',
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 5aefe49a3d..feff49940a 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -562,12 +562,13 @@ class i18n_messages(Command):
                 "userlogin": _("User Login"),
             },
             "certmap": {
-                "adder_title": _("Add Certificate Mapping Data"),
+                "add": _("Add certificate identity mapping rule"),
+                "adder_title": _("Add certificate mapping data"),
                 "data_label": _("Certificate mapping data"),
                 "certificate": _("Certificate"),
                 "conf_str": _("Configuration string"),
                 "deleter_content": _("Do you want to remove certificate mapping data ${data}?"),
-                "deleter_title": _("Remove Certificate Mapping Data"),
+                "deleter_title": _("Remove certificate mapping data"),
                 "issuer": _("Issuer"),
                 "issuer_subject": _("Issuer and subject"),
                 "remove": _("Remove certificate identity mapping rules"),

From 1ee784b6d1a2782be4bbbc942c6b4ba9e88c2d96 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 17/23] Add title to 'add' dialog for 'Automount' 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
---
 install/ui/src/freeipa/automount.js | 3 +++
 ipaserver/plugins/internal.py       | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/install/ui/src/freeipa/automount.js b/install/ui/src/freeipa/automount.js
index 38c0bdef76..3fb56ef0db 100644
--- a/install/ui/src/freeipa/automount.js
+++ b/install/ui/src/freeipa/automount.js
@@ -63,6 +63,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.automountlocation.add',
         fields: [ 'cn' ]
     },
     deleter_dialog: {
@@ -112,6 +113,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.automountmap.add',
         $factory: IPA.automountmap_adder_dialog,
         sections: [
             {
@@ -193,6 +195,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.automountkey.add',
         show_edit_page : function(entity, result){
             var key = result.automountkey[0];
             var info = result.automountinformation[0];
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index feff49940a..8e8677e307 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -443,13 +443,16 @@ class i18n_messages(Command):
                 "usergrouprules": _("User group rules"),
             },
             "automountkey": {
+                "add": _("Add automount key"),
                 "remove": _("Remove automount keys"),
             },
             "automountlocation": {
+                "add": _("Add automount location"),
                 "identity": _("Automount Location Settings"),
                 "remove": _("Remove automount locations"),
             },
             "automountmap": {
+                "add": _("Add automount map"),
                 "map_type": _("Map Type"),
                 "direct": _("Direct"),
                 "indirect": _("Indirect"),

From 74e01cc0b5ce384d7053e22b07d71dbcf178192b Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 18/23] Add title to 'add' dialog for 'DNS' 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
---
 install/ui/src/freeipa/dns.js | 8 ++++----
 ipaserver/plugins/internal.py | 7 +++++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js
index fe2f271897..b23d331992 100644
--- a/install/ui/src/freeipa/dns.js
+++ b/install/ui/src/freeipa/dns.js
@@ -290,6 +290,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.dnszone.add',
         height: 300,
         sections: [
             {
@@ -436,6 +437,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.dnsforwardzone.add',
         sections: [
             {
                 name: 'name',
@@ -1348,6 +1350,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.dnsrecord.add',
         $factory: IPA.dns.record_adder_dialog,
         fields: [
             {
@@ -2006,15 +2009,12 @@ IPA.dns.record_type_table_widget = function(spec) {
 
     that.create_add_dialog = function() {
 
-        var title = text.get('@i18n:dialogs.add_title');
-        var label = that.entity.metadata.label_singular;
-
         var dialog_spec = {
             entity: that.entity,
             fields: [],
             widgets: [],
             retry: false,
-            title: title.replace('${entity}', label)
+            title: text.get('@i18n:objects.dnsrecord.add'),
         };
 
         var dnstype = that.dnstype.toLowerCase();
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 8e8677e307..fc9129a7fc 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -597,9 +597,11 @@ class i18n_messages(Command):
                 "updated_dns": _("System DNS records updated"),
             },
             "dnsforwardzone": {
+                "add": _("Add DNS forward zone"),
                 "remove": _("Remove DNS forward zones"),
             },
             "dnsrecord": {
+                "add": _("Add DNS resource record"),
                 "data": _("Data"),
                 "deleted_no_data": _("DNS record was deleted because it contained no data."),
                 "other": _("Other Record Types"),
@@ -620,9 +622,10 @@ class i18n_messages(Command):
                 "type": _("Record Type"),
             },
             "dnszone": {
-                "identity": _("DNS Zone Settings"),
-                "add_permission":_("Add Permission"),
+                "add": _("Add DNS zone"),
+                "add_permission":_("Add permission"),
                 "add_permission_confirm":_("Are you sure you want to add permission for DNS Zone ${object}?"),
+                "identity": _("DNS Zone Settings"),
                 "remove": _("Remove DNS zones"),
                 "remove_permission": _("Remove Permission"),
                 "remove_permission_confirm": _("Are you sure you want to remove permission for DNS Zone ${object}?"),

From f915762aaf10283adda4431de58795897d423d40 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 19/23] Add title to 'add' dialog for 'Vault' 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
---
 install/ui/src/freeipa/vault.js | 1 +
 ipaserver/plugins/internal.py   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/vault.js b/install/ui/src/freeipa/vault.js
index 29aa546791..909ac27c1d 100644
--- a/install/ui/src/freeipa/vault.js
+++ b/install/ui/src/freeipa/vault.js
@@ -213,6 +213,7 @@ var make_my_vault_spec = function() {
             }
         ],
         adder_dialog: {
+            title: '@i18n:objects.vault.add',
             $factory: vault.custom_adder_dialog,
             name: 'add',
             method: 'add_internal',
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index fc9129a7fc..3caef9a6c8 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -1008,6 +1008,7 @@ class i18n_messages(Command):
                 "unlock_confirm": _("Are you sure you want to unlock user ${object}?"),
             },
             "vault": {
+                "add": _("Add vault"),
                 "add_warn_arch_ret": _(
                     "Secrets can be added/retrieved to vault only by using "
                     "vault-archive and vault-retrieve from CLI."

From 2c6697c857d03f12b65dae7007e276cc32f94a9c Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 20/23] Add title to 'add' dialog for 'RBAC' 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
---
 install/ui/src/freeipa/aci.js | 5 +++++
 ipaserver/plugins/internal.py | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/install/ui/src/freeipa/aci.js b/install/ui/src/freeipa/aci.js
index 1b7e6d2cfd..3e796141ed 100644
--- a/install/ui/src/freeipa/aci.js
+++ b/install/ui/src/freeipa/aci.js
@@ -209,6 +209,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.acipermission.add',
         height: 450,
         fields: [
             {
@@ -365,6 +366,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.aciprivilege.add',
         fields: [
             'cn',
             {
@@ -416,6 +418,7 @@ return {
     ],
     standard_association_facets: true,
     adder_dialog: {
+        title: '@i18n:objects.acirole.add',
         fields: [
             'cn',
             {
@@ -458,6 +461,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.aciselfservice.add',
         fields: [
             'aciname',
             {
@@ -521,6 +525,7 @@ return {
     ],
     standard_association_facets: false,
     adder_dialog: {
+        title: '@i18n:objects.acidelegation.add',
         fields: [
             'aciname',
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 3caef9a6c8..2e4c87ccea 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -408,18 +408,23 @@ class i18n_messages(Command):
                 "attribute": _("Attribute"),
             },
             "acidelegation": {
+                "add": _("Add delegation"),
                 "remove": _("Remove delegations"),
             },
             "acipermission": {
+                "add": _("Add permission"),
                 "remove": _("Remove permissions"),
             },
             "aciprivilege": {
+                "add": _("Add privilege"),
                 "remove": _("Remove privileges"),
             },
             "acirole": {
+                "add": _("Add role"),
                 "remove": _("Remove roles"),
             },
             "aciselfservice": {
+                "add": _("Add self service permission"),
                 "remove": _("Remove self service permissions"),
             },
             "automember": {

From dac02cedcff5657d00de9dcc8a22ca9b49bebef2 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 21/23] Add title to 'add' dialog for 'ID Ranges' 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
---
 install/ui/src/freeipa/idrange.js | 1 +
 ipaserver/plugins/internal.py     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/idrange.js b/install/ui/src/freeipa/idrange.js
index b77c47e39b..968e2e5df6 100644
--- a/install/ui/src/freeipa/idrange.js
+++ b/install/ui/src/freeipa/idrange.js
@@ -92,6 +92,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.idrange.add',
         fields: [
             {
                 name: 'cn'
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 2e4c87ccea..b02677e059 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -827,6 +827,7 @@ class i18n_messages(Command):
                 "remove": _("Remove password policies"),
             },
             "idrange": {
+                "add": _("Add ID range"),
                 "details": _("Range Settings"),
                 "ipabaseid": _("Base ID"),
                 "ipabaserid": _("Primary RID base"),

From 48a4b8f08ceb2aa2cc15ce02b5113d5261cfc5c1 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 22/23] Add title to 'add' dialog for 'Trusts' 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
---
 install/ui/src/freeipa/trust.js | 1 +
 ipaserver/plugins/internal.py   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/install/ui/src/freeipa/trust.js b/install/ui/src/freeipa/trust.js
index 77a2031ee8..b7e763e622 100644
--- a/install/ui/src/freeipa/trust.js
+++ b/install/ui/src/freeipa/trust.js
@@ -174,6 +174,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.trust.add',
         $factory: IPA.trust.adder_dialog,
         fields: [
             {
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index b02677e059..0e8d14290f 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -974,6 +974,7 @@ class i18n_messages(Command):
             },
             "trust": {
                 "account": _("Account"),
+                "add": _("Add trust"),
                 "admin_account": _("Administrative account"),
                 "blacklists": _("SID blacklists"),
                 "details": _("Trust Settings"),

From 1febbb9d6b3b6bc19bb46247f8a5c48befde807f Mon Sep 17 00:00:00 2001
From: Stanislav Levin <s...@altlinux.org>
Date: Fri, 21 Sep 2018 11:45:28 +0300
Subject: [PATCH 23/23] 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
---
 install/ui/src/freeipa/topology.js | 6 ++----
 ipaserver/plugins/internal.py      | 2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/install/ui/src/freeipa/topology.js b/install/ui/src/freeipa/topology.js
index 271ff8c70e..9fdc9eef08 100644
--- a/install/ui/src/freeipa/topology.js
+++ b/install/ui/src/freeipa/topology.js
@@ -456,6 +456,7 @@ return {
         }
     ],
     adder_dialog: {
+        title: '@i18n:objects.topologylocation.add',
         fields: [
             {
                 $type: 'text',
@@ -1014,10 +1015,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 0e8d14290f..cc7502b24c 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -967,9 +967,11 @@ class i18n_messages(Command):
                 "insufficient_domain_level" : _("Managed topology requires minimal domain level ${domainlevel}"),
             },
             "topologylocation": {
+                "add": _("Add IPA location"),
                 "remove": _("Remove IPA locations"),
             },
             "topologysegment": {
+                "add": _("Add topology segment"),
                 "remove": _("Remove topology segments"),
             },
             "trust": {
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to