The IPA.entity_builder has been fixed to use the correct title for the entity's adder dialog.
Ticket #1239 -- Endi S. Dewata
From b28c0b343175981f259d24b71efa1a8d62669797 Mon Sep 17 00:00:00 2001 From: Endi S. Dewata <edew...@redhat.com> Date: Fri, 20 May 2011 23:29:38 -0500 Subject: [PATCH] Fixed adder dialog title. The IPA.entity_builder has been fixed to use the correct title for the entity's adder dialog. Ticket #1239 --- install/ui/entity.js | 9 ++++++++- install/ui/test/data/i18n_messages.json | 22 +++++++++++----------- install/ui/test/data/ipa_init.json | 22 +++++++++++----------- ipalib/plugins/internal.py | 22 +++++++++++----------- 4 files changed, 41 insertions(+), 34 deletions(-) diff --git a/install/ui/entity.js b/install/ui/entity.js index 026e66f79756e3b8e48e1dcfe661f37454aa2889..8af4af968518c3c0f458d5483c457c357ce77de4 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -809,7 +809,14 @@ IPA.entity_builder = function(){ that.adder_dialog = function(spec) { spec.factory = spec.factory || IPA.add_dialog; spec.name = spec.name || 'add'; - spec.title = spec.title || IPA.messages.objects.user.add; + + if (!spec.title) { + var messages = IPA.messages.objects[entity.name]; + if (messages) { + spec.title = messages.add; + } + } + return that.dialog(spec); }; diff --git a/install/ui/test/data/i18n_messages.json b/install/ui/test/data/i18n_messages.json index 7a1d498e07fd53503a28eb1f73b0835b259c8c50..004b3fde61d2c99b544e3d08f09aa3c6aa9debd8 100644 --- a/install/ui/test/data/i18n_messages.json +++ b/install/ui/test/data/i18n_messages.json @@ -120,13 +120,13 @@ "identity": "DNS Zone Settings" }, "group": { - "add": "Add New Group", + "add": "Add Group", "details": "Group Settings", "posix": "Is this a POSIX group?" }, "hbacrule": { "active": "Active", - "add": "Add New Rule", + "add": "Add HBAC Rule", "allow": "Allow", "any_host": "Any Host", "any_service": "Any Service", @@ -143,14 +143,14 @@ "user": "Who" }, "hbacsvc": { - "add": "Add New HBAC Service" + "add": "Add HBAC Service" }, "hbacsvcgroup": { - "add": "Add New HBAC Service Group", + "add": "Add HBAC Service Group", "services": "Services" }, "host": { - "add": "Add New Host", + "add": "Add Host", "certificate": "Host Certificate", "cn": "Host Name", "delete_key_unprovision": "Delete Key, Unprovision", @@ -170,8 +170,8 @@ "valid": "Kerberos Key Present, Host Provisioned" }, "hostgroup": { - "add": "Add Hostgroup", - "identity": "Hostgroup Settings" + "add": "Add Host Group", + "identity": "Host Group Settings" }, "krbtpolicy": { "identity": "Kerberos ticket policy" @@ -207,7 +207,7 @@ "add": "Add Self Service Definition" }, "service": { - "add": "Add New Service", + "add": "Add Service", "certificate": "Service Certificate", "delete_key_unprovision": "Delete Key, Unprovision", "details": "Service Settings", @@ -222,16 +222,16 @@ "valid": "Kerberos Key Present, Service Provisioned" }, "sudocmd": { - "add": "Add New Sudo Command", + "add": "Add Sudo Command", "groups": "Groups" }, "sudocmdgroup": { - "add": "Add New Sudo Command Group", + "add": "Add Sudo Command Group", "commands": "Commands" }, "sudorule": { "active": "Active", - "add": "Add New Rule", + "add": "Add Sudo Rule", "allow": "Allow", "any_command": "Any Command", "any_group": "Any Group", diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 84eecba774c73baf6320cf4cc55772118becf1f7..538b36e0f4b1f171220d0b65acfcf8435aea4870 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -10082,13 +10082,13 @@ "identity": "DNS Zone Settings" }, "group": { - "add": "Add New Group", + "add": "Add Group", "details": "Group Settings", "posix": "Is this a POSIX group?" }, "hbacrule": { "active": "Active", - "add": "Add New Rule", + "add": "Add HBAC Rule", "allow": "Allow", "any_host": "Any Host", "any_service": "Any Service", @@ -10105,14 +10105,14 @@ "user": "Who" }, "hbacsvc": { - "add": "Add New HBAC Service" + "add": "Add HBAC Service" }, "hbacsvcgroup": { - "add": "Add New HBAC Service Group", + "add": "Add HBAC Service Group", "services": "Services" }, "host": { - "add": "Add New Host", + "add": "Add Host", "certificate": "Host Certificate", "cn": "Host Name", "delete_key_unprovision": "Delete Key, Unprovision", @@ -10132,8 +10132,8 @@ "valid": "Kerberos Key Present, Host Provisioned" }, "hostgroup": { - "add": "Add Hostgroup", - "identity": "Hostgroup Settings" + "add": "Add Host Group", + "identity": "Host Group Settings" }, "krbtpolicy": { "identity": "Kerberos ticket policy" @@ -10169,7 +10169,7 @@ "add": "Add Self Service Definition" }, "service": { - "add": "Add New Service", + "add": "Add Service", "certificate": "Service Certificate", "delete_key_unprovision": "Delete Key, Unprovision", "details": "Service Settings", @@ -10184,16 +10184,16 @@ "valid": "Kerberos Key Present, Service Provisioned" }, "sudocmd": { - "add": "Add New Sudo Command", + "add": "Add Sudo Command", "groups": "Groups" }, "sudocmdgroup": { - "add": "Add New Sudo Command Group", + "add": "Add Sudo Command Group", "commands": "Commands" }, "sudorule": { "active": "Active", - "add": "Add New Rule", + "add": "Add Sudo Rule", "allow": "Allow", "any_command": "Any Command", "any_group": "Any Group", diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index ff62bb21ac6e97c3ec5fb2b4f2652b6168fdb399..dabe4e58dfcddbfb883ee78fe354d3bb72c7f991 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -160,12 +160,12 @@ class i18n_messages(Command): "title":_("Records for DNS Zone"), }, "group": { - "add":_("Add New Group"), + "add":_("Add Group"), "details":_("Group Settings"), "posix":_("Is this a POSIX group?"), }, "hbacrule": { - "add":_("Add New Rule"), + "add":_("Add HBAC Rule"), "active":_("Active"), "allow":_("Allow"), "deny":_("Deny"), @@ -183,14 +183,14 @@ class i18n_messages(Command): "sourcehost":_("From"), }, "hbacsvc": { - "add":_("Add New HBAC Service"), + "add":_("Add HBAC Service"), }, "hbacsvcgroup": { - "add":_("Add New HBAC Service Group"), + "add":_("Add HBAC Service Group"), "services":_("Services"), }, "host": { - "add":_("Add New Host"), + "add":_("Add Host"), "certificate":_("Host Certificate"), "cn":_("Host Name"), "details":_("Host Settings"), @@ -210,8 +210,8 @@ class i18n_messages(Command): "unprovision":_("Unprovision"), }, "hostgroup": { - "add":_("Add Hostgroup"), - "identity":_("Hostgroup Settings"), + "add":_("Add Host Group"), + "identity":_("Host Group Settings"), }, "krbtpolicy": { "identity":_("Kerberos ticket policy"), @@ -247,7 +247,7 @@ class i18n_messages(Command): "add":_("Add Self Service Definition"), }, "service": { - "add":_("Add New Service"), + "add":_("Add Service"), "certificate":_("Service Certificate"), "details":_("Service Settings"), "host":_("Host Name"), @@ -262,15 +262,15 @@ class i18n_messages(Command): "unprovision":_("Unprovision"), }, "sudocmd": { - "add":_("Add New Sudo Command"), + "add":_("Add Sudo Command"), "groups":_("Groups"), }, "sudocmdgroup": { - "add":_("Add New Sudo Command Group"), + "add":_("Add Sudo Command Group"), "commands":_("Commands"), }, "sudorule": { - "add":_("Add New Rule"), + "add":_("Add Sudo Rule"), "active":_("Active"), "inactive":_("Inactive"), "allow":_("Allow"), -- 1.7.4
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel