The object_name, object_name_plural and messages that use these
attributes have been converted to support translation. The label
attribute in the Param class has been modified to accept unicode
string.

Ticket #1435

--
Endi S. Dewata
From 0fb19d888e845dca25df219b374730e010499586 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata <edew...@redhat.com>
Date: Tue, 12 Jul 2011 11:01:25 -0500
Subject: [PATCH] Fixed object_name and object_name_plural
 internationalization

The object_name, object_name_plural and messages that use these
attributes have been converted to support translation. The label
attribute in the Param class has been modified to accept unicode
string.

Ticket #1435
---
 ipalib/parameters.py           |    2 +-
 ipalib/plugins/automount.py    |   12 ++++++------
 ipalib/plugins/baseldap.py     |   22 +++++++++++-----------
 ipalib/plugins/config.py       |    2 +-
 ipalib/plugins/delegation.py   |    4 ++--
 ipalib/plugins/dns.py          |    8 ++++----
 ipalib/plugins/entitle.py      |    4 ++--
 ipalib/plugins/group.py        |    4 ++--
 ipalib/plugins/hbacrule.py     |    4 ++--
 ipalib/plugins/hbacsvc.py      |    4 ++--
 ipalib/plugins/hbacsvcgroup.py |    4 ++--
 ipalib/plugins/host.py         |    4 ++--
 ipalib/plugins/hostgroup.py    |    4 ++--
 ipalib/plugins/krbtpolicy.py   |    2 +-
 ipalib/plugins/migration.py    |    2 +-
 ipalib/plugins/netgroup.py     |    4 ++--
 ipalib/plugins/permission.py   |    4 ++--
 ipalib/plugins/pkinit.py       |    2 +-
 ipalib/plugins/privilege.py    |    4 ++--
 ipalib/plugins/pwpolicy.py     |    4 ++--
 ipalib/plugins/role.py         |    4 ++--
 ipalib/plugins/selfservice.py  |    4 ++--
 ipalib/plugins/service.py      |    4 ++--
 ipalib/plugins/sudocmd.py      |    4 ++--
 ipalib/plugins/sudocmdgroup.py |    4 ++--
 ipalib/plugins/sudorule.py     |    4 ++--
 ipalib/plugins/user.py         |    4 ++--
 27 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 76ca2d7919823533001fe388742c65817fb4de50..75981e960e788d7f6f25a5607d04223431e90f41 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -301,7 +301,7 @@ class Param(ReadOnly):
     kwargs = (
         ('cli_name', str, None),
         ('cli_short_name', str, None),
-        ('label', (str, Gettext), None),
+        ('label', (basestring, Gettext), None),
         ('doc', (basestring, Gettext), None),
         ('required', bool, True),
         ('multivalue', bool, False),
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 5f8102d9209bd35ea348c484e994c08a5cea01df..dcfa03559a4ade60362b80c093ca4634997ecf34 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -183,8 +183,8 @@ class automountlocation(LDAPObject):
     Location container for automount maps.
     """
     container_dn = api.env.container_automount
-    object_name = 'automount location'
-    object_name_plural = 'automount locations'
+    object_name = _('automount location')
+    object_name_plural = _('automount locations')
     object_class = ['nscontainer']
     default_attributes = ['cn']
     label = _('Automount Locations')
@@ -494,8 +494,8 @@ class automountmap(LDAPObject):
     """
     parent_object = 'automountlocation'
     container_dn = api.env.container_automount
-    object_name = 'automount map'
-    object_name_plural = 'automount maps'
+    object_name = _('automount map')
+    object_name_plural = _('automount maps')
     object_class = ['automountmap']
     default_attributes = ['automountmapname', 'description']
 
@@ -575,8 +575,8 @@ class automountkey(LDAPObject):
     """
     parent_object = 'automountmap'
     container_dn = api.env.container_automount
-    object_name = 'automount key'
-    object_name_plural = 'automount keys'
+    object_name = _('automount key')
+    object_name_plural = _('automount keys')
     object_class = ['automount']
     default_attributes = [
         'automountkey', 'automountinformation', 'description'
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 5912b8dcf7f92d87b201e74b8250293111529f64..87a9fbed342a876943eaac3170cb5fd2270264ab 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -247,8 +247,8 @@ class LDAPObject(Object):
     parent_object = ''
     container_dn = ''
     normalize_dn = True
-    object_name = 'entry'
-    object_name_plural = 'entries'
+    object_name = _('entry')
+    object_name_plural = _('entries')
     object_class = []
     object_class_config = None
     # If an objectclass is possible but not default in an entry. Needed for
@@ -1084,7 +1084,7 @@ class LDAPModMember(LDAPQuery):
     Base class for member manipulation.
     """
     member_attributes = ['member']
-    member_param_doc = 'comma-separated list of %s'
+    member_param_doc = _('comma-separated list of %s')
     member_count_out = ('%i member processed.', '%i members processed.')
 
     def get_options(self):
@@ -1096,7 +1096,7 @@ class LDAPModMember(LDAPQuery):
                 name = to_cli(ldap_obj_name)
                 doc = self.member_param_doc % ldap_obj.object_name_plural
                 yield List('%s?' % name, cli_name='%ss' % name, doc=doc,
-                           label='member ' + ldap_obj.object_name, alwaysask=True)
+                           label=_('member %s') % ldap_obj.object_name, alwaysask=True)
 
     def get_member_dns(self, **options):
         dns = {}
@@ -1125,7 +1125,7 @@ class LDAPAddMember(LDAPModMember):
     """
     Add other LDAP entries to members.
     """
-    member_param_doc = 'comma-separated list of %s to add'
+    member_param_doc = _('comma-separated list of %s to add')
     member_count_out = ('%i member added.', '%i members added.')
     allow_same = False
 
@@ -1231,7 +1231,7 @@ class LDAPRemoveMember(LDAPModMember):
     """
     Remove LDAP entries from members.
     """
-    member_param_doc = 'comma-separated list of %s to remove'
+    member_param_doc = _('comma-separated list of %s to remove')
     member_count_out = ('%i member removed.', '%i members removed.')
 
     has_output = (
@@ -1341,8 +1341,8 @@ class LDAPSearch(CallbackInterface, crud.Search):
     Retrieve all LDAP entries matching the given criteria.
     """
     member_attributes = []
-    member_param_incl_doc = 'Search for %s with these %s %s.'
-    member_param_excl_doc = 'Search for %s without these %s %s.'
+    member_param_incl_doc = _('Search for %s with these %s %s.')
+    member_param_excl_doc = _('Search for %s without these %s %s.')
 
     takes_options = (
         Int('timelimit?',
@@ -1558,7 +1558,7 @@ class LDAPModReverseMember(LDAPQuery):
     Base class for reverse member manipulation.
     """
     reverse_attributes = ['member']
-    reverse_param_doc = 'comma-separated list of %s'
+    reverse_param_doc = _('comma-separated list of %s')
     reverse_count_out = ('%i member processed.', '%i members processed.')
 
     has_output_params = global_output_params
@@ -1582,7 +1582,7 @@ class LDAPAddReverseMember(LDAPModReverseMember):
     The call looks like "add A to B" but in fact executes
     add B to A to handle reverse membership.
     """
-    member_param_doc = 'comma-separated list of %s to add'
+    member_param_doc = _('comma-separated list of %s to add')
     member_count_out = ('%i member added.', '%i members added.')
 
     show_command = None
@@ -1695,7 +1695,7 @@ class LDAPRemoveReverseMember(LDAPModReverseMember):
     The call looks like "remove A from B" but in fact executes
     remove B from A to handle reverse membership.
     """
-    member_param_doc = 'comma-separated list of %s to remove'
+    member_param_doc = _('comma-separated list of %s to remove')
     member_count_out = ('%i member removed.', '%i members removed.')
 
     show_command = None
diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py
index 349717925035950b186b52592a81713f19384e56..82b8e89943070db5c2669ff5d1d510e6015d56ba 100644
--- a/ipalib/plugins/config.py
+++ b/ipalib/plugins/config.py
@@ -80,7 +80,7 @@ class config(LDAPObject):
     """
     IPA configuration object
     """
-    object_name = 'configuration options'
+    object_name = _('configuration options')
     default_attributes = [
         'ipamaxusernamelength', 'ipahomesrootdir', 'ipadefaultloginshell',
         'ipadefaultprimarygroup', 'ipadefaultemaildomain', 'ipasearchtimelimit',
diff --git a/ipalib/plugins/delegation.py b/ipalib/plugins/delegation.py
index ad6106a4bc9f703349061d6d4012a44058ff0709..0327b1dabac98de6ef6a64c641e2cbad905170fc 100644
--- a/ipalib/plugins/delegation.py
+++ b/ipalib/plugins/delegation.py
@@ -97,8 +97,8 @@ class delegation(Object):
     """
 
     bindable = False
-    object_name = 'delegation',
-    object_name_plural = 'delegation',
+    object_name = _('delegation')
+    object_name_plural = _('delegations')
     label = _('Delegations')
     label_singular = _('delegation')
 
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py
index 2bba446d04169bf50ce9d3485c465034ef37ac40..4682b819a44649b16c629c50fdbdfa0f7561fe0a 100644
--- a/ipalib/plugins/dns.py
+++ b/ipalib/plugins/dns.py
@@ -274,8 +274,8 @@ class dnszone(LDAPObject):
     DNS Zone, container for resource records.
     """
     container_dn = api.env.container_dns
-    object_name = 'DNS zone'
-    object_name_plural = 'DNS zones'
+    object_name = _('DNS zone')
+    object_name_plural = _('DNS zones')
     object_class = ['top', 'idnsrecord', 'idnszone']
     default_attributes = [
         'idnsname', 'idnszoneactive', 'idnssoamname', 'idnssoarname',
@@ -516,8 +516,8 @@ class dnsrecord(LDAPObject):
     """
     parent_object = 'dnszone'
     container_dn = api.env.container_dns
-    object_name = 'DNS resource record'
-    object_name_plural = 'DNS resource records'
+    object_name = _('DNS resource record')
+    object_name_plural = _('DNS resource records')
     object_class = ['top', 'idnsrecord']
     default_attributes = _record_attributes + ['idnsname']
 
diff --git a/ipalib/plugins/entitle.py b/ipalib/plugins/entitle.py
index 95aff39ee01190ed405ca88be7c825bd364edc3d..03b6f02f074156268bba3a1b8ee5ec8d78ea33c2 100644
--- a/ipalib/plugins/entitle.py
+++ b/ipalib/plugins/entitle.py
@@ -179,8 +179,8 @@ class entitle(LDAPObject):
     Entitlement object
     """
     container_dn = api.env.container_entitlements
-    object_name = 'entitlement'
-    object_name_plural = 'entitlements'
+    object_name = _('entitlement')
+    object_name_plural = _('entitlements')
     object_class = ['ipaobject', 'ipaentitlement']
     search_attributes = ['usercertificate']
     default_attributes = ['ipaentitlement']
diff --git a/ipalib/plugins/group.py b/ipalib/plugins/group.py
index f3692857b47d6e0494fcb380085adab2773ac7bb..819d8c8326dd235ff4395c936b18fa9fdd608d18 100644
--- a/ipalib/plugins/group.py
+++ b/ipalib/plugins/group.py
@@ -77,8 +77,8 @@ class group(LDAPObject):
     Group object.
     """
     container_dn = api.env.container_group
-    object_name = 'group'
-    object_name_plural = 'groups'
+    object_name = _('group')
+    object_name_plural = _('groups')
     object_class = ['ipausergroup']
     object_class_config = 'ipagroupobjectclasses'
     possible_objectclasses = ['posixGroup', 'mepManagedEntry']
diff --git a/ipalib/plugins/hbacrule.py b/ipalib/plugins/hbacrule.py
index 3eff396fc74f99750840c42c1406ae7614708799..b4398b85b30c59183e3ac273bdd3b1038baa3ece 100644
--- a/ipalib/plugins/hbacrule.py
+++ b/ipalib/plugins/hbacrule.py
@@ -104,8 +104,8 @@ class hbacrule(LDAPObject):
     HBAC object.
     """
     container_dn = api.env.container_hbac
-    object_name = 'HBAC rule'
-    object_name_plural = 'HBAC rules'
+    object_name = _('HBAC rule')
+    object_name_plural = _('HBAC rules')
     object_class = ['ipaassociation', 'ipahbacrule']
     default_attributes = [
         'cn', 'accessruletype', 'ipaenabledflag',
diff --git a/ipalib/plugins/hbacsvc.py b/ipalib/plugins/hbacsvc.py
index c2f2532e727d98ec8057ebba83242c46ab67d5d9..552bd1acfa8f9b22d757410f50d2207f10d90c06 100644
--- a/ipalib/plugins/hbacsvc.py
+++ b/ipalib/plugins/hbacsvc.py
@@ -52,8 +52,8 @@ class hbacsvc(LDAPObject):
     HBAC Service object.
     """
     container_dn = api.env.container_hbacservice
-    object_name = 'HBAC service'
-    object_name_plural = 'HBAC services'
+    object_name = _('HBAC service')
+    object_name_plural = _('HBAC services')
     object_class = [ 'ipaobject', 'ipahbacservice' ]
     default_attributes = ['cn', 'description', 'memberindirect',]
     uuid_attribute = 'ipauniqueid'
diff --git a/ipalib/plugins/hbacsvcgroup.py b/ipalib/plugins/hbacsvcgroup.py
index 356bae43f9d448a36b08e08cdb237e0dc9e27141..6099583431bda93e56413478ba3fc431bfbf4378 100644
--- a/ipalib/plugins/hbacsvcgroup.py
+++ b/ipalib/plugins/hbacsvcgroup.py
@@ -52,8 +52,8 @@ class hbacsvcgroup(LDAPObject):
     HBAC service group object.
     """
     container_dn = api.env.container_hbacservicegroup
-    object_name = 'HBAC service group'
-    object_name_plural = 'HBAC service groups'
+    object_name = _('HBAC service group')
+    object_name_plural = _('HBAC service groups')
     object_class = ['ipaobject', 'ipahbacservicegroup']
     default_attributes = [ 'cn', 'description', 'member' ]
     uuid_attribute = 'ipauniqueid'
diff --git a/ipalib/plugins/host.py b/ipalib/plugins/host.py
index eff199b42041338d7470d43bdb9e691153b0e248..37d906d48c8c050e0decfbddf54dd5134fc964d7 100644
--- a/ipalib/plugins/host.py
+++ b/ipalib/plugins/host.py
@@ -213,8 +213,8 @@ class host(LDAPObject):
     Host object.
     """
     container_dn = api.env.container_host
-    object_name = 'host'
-    object_name_plural = 'hosts'
+    object_name = _('host')
+    object_name_plural = _('hosts')
     object_class = ['ipaobject', 'nshost', 'ipahost', 'pkiuser', 'ipaservice']
     # object_class_config = 'ipahostobjectclasses'
     search_attributes = [
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index 6683c49c4423f600ba93b049227e60d0f1891ced..5b231316a9085201e9c3bf3ff4cab0e7500d0f47 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -56,8 +56,8 @@ class hostgroup(LDAPObject):
     Hostgroup object.
     """
     container_dn = api.env.container_hostgroup
-    object_name = 'host group'
-    object_name_plural = 'host groups'
+    object_name = _('host group')
+    object_name_plural = _('host groups')
     object_class = ['ipaobject', 'ipahostgroup']
     default_attributes = ['cn', 'description', 'member', 'memberof',
         'memberindirect', 'memberofindirect',
diff --git a/ipalib/plugins/krbtpolicy.py b/ipalib/plugins/krbtpolicy.py
index 0c76256b7f0d634cfc187f3fd422bbb29e2c3626..e24b5447e38ade080131403bae13011ab7d346fc 100644
--- a/ipalib/plugins/krbtpolicy.py
+++ b/ipalib/plugins/krbtpolicy.py
@@ -72,7 +72,7 @@ class krbtpolicy(LDAPObject):
     Kerberos Ticket Policy object
     """
     container_dn = 'cn=%s,cn=kerberos' % api.env.realm
-    object_name = 'kerberos ticket policy settings'
+    object_name = _('kerberos ticket policy settings')
     default_attributes = ['krbmaxticketlife', 'krbmaxrenewableage']
     limit_object_classes = ['krbticketpolicyaux']
 
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py
index d2e6a7d7c75d0f7935ccdff8587784294ffbbe07..c2d3da8a875a857a622c0ec4926c1966547b0029 100644
--- a/ipalib/plugins/migration.py
+++ b/ipalib/plugins/migration.py
@@ -479,7 +479,7 @@ can use their Kerberos accounts.''')
             if truncated:
                 self.log.error(
                     '%s: %s' % (
-                        ldap_obj.object_name_plural, self.truncated_err_msg
+                        ldap_obj.name, self.truncated_err_msg
                     )
                 )
 
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py
index e611ea29930e08302714fe92b51faa32155e9da3..65949a822812682330fe898db6ff7d54104862f4 100644
--- a/ipalib/plugins/netgroup.py
+++ b/ipalib/plugins/netgroup.py
@@ -68,8 +68,8 @@ class netgroup(LDAPObject):
     Netgroup object.
     """
     container_dn = api.env.container_netgroup
-    object_name = 'netgroup'
-    object_name_plural = 'netgroups'
+    object_name = _('netgroup')
+    object_name_plural = _('netgroups')
     object_class = ['ipaobject', 'ipaassociation', 'ipanisnetgroup']
     default_attributes = [
         'cn', 'description', 'memberof', 'externalhost', 'nisdomainname',
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index 63f166c6f67ee3d6e48bac28673e32272ff7f2f8..4f37790dfd83879f4bdbed91c477c12d9cadb0eb 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -90,8 +90,8 @@ class permission(LDAPObject):
     Permission object.
     """
     container_dn = api.env.container_permission
-    object_name = 'permission'
-    object_name_plural = 'permissions'
+    object_name = _('permission')
+    object_name_plural = _('permissions')
     object_class = ['groupofnames', 'ipapermission']
     default_attributes = ['cn', 'member', 'memberof',
         'memberindirect', 'ipapermissiontype',
diff --git a/ipalib/plugins/pkinit.py b/ipalib/plugins/pkinit.py
index 55a0650856831ae973e8fe888e75a763a9daf71a..7a5a93b424a5dd650a0c812d346443c56728b132 100644
--- a/ipalib/plugins/pkinit.py
+++ b/ipalib/plugins/pkinit.py
@@ -46,7 +46,7 @@ class pkinit(Object):
     """
     PKINIT Options
     """
-    object_name = 'pkinit'
+    object_name = _('pkinit')
 
     label=_('PKINIT')
 
diff --git a/ipalib/plugins/privilege.py b/ipalib/plugins/privilege.py
index 890dcd7cc842f4c87a4383d9dd00542cd5d07515..d1a63ace52b24496584a1163af88b498c32ae7c0 100644
--- a/ipalib/plugins/privilege.py
+++ b/ipalib/plugins/privilege.py
@@ -46,8 +46,8 @@ class privilege(LDAPObject):
     Privilege object.
     """
     container_dn = api.env.container_privilege
-    object_name = 'privilege'
-    object_name_plural = 'privileges'
+    object_name = _('privilege')
+    object_name_plural = _('privileges')
     object_class = ['nestedgroup', 'groupofnames']
     default_attributes = ['cn', 'description', 'member', 'memberof',
         'memberindirect', 'memberofindirect',
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py
index db16713659921aaec1219b190d88464c449e70a3..673f2ebf1db7dcac8c41ae5fc54aaf2532c91c37 100644
--- a/ipalib/plugins/pwpolicy.py
+++ b/ipalib/plugins/pwpolicy.py
@@ -173,8 +173,8 @@ class pwpolicy(LDAPObject):
     Password Policy object
     """
     container_dn = 'cn=%s,cn=kerberos' % api.env.realm
-    object_name = 'password policy'
-    object_name_plural = 'password policies'
+    object_name = _('password policy')
+    object_name_plural = _('password policies')
     object_class = ['top', 'nscontainer', 'krbpwdpolicy']
     default_attributes = [
         'cn', 'cospriority', 'krbmaxpwdlife', 'krbminpwdlife',
diff --git a/ipalib/plugins/role.py b/ipalib/plugins/role.py
index cdbe5130af510db325437fe5ec26166da6993572..365ee837245322f93ac6158e016450e2850c48ee 100644
--- a/ipalib/plugins/role.py
+++ b/ipalib/plugins/role.py
@@ -63,8 +63,8 @@ class role(LDAPObject):
     Role object.
     """
     container_dn = api.env.container_rolegroup
-    object_name = 'role'
-    object_name_plural = 'roles'
+    object_name = _('role')
+    object_name_plural = _('roles')
     object_class = ['groupofnames', 'nestedgroup']
     default_attributes = ['cn', 'description', 'member', 'memberof',
         'memberindirect', 'memberofindirect',
diff --git a/ipalib/plugins/selfservice.py b/ipalib/plugins/selfservice.py
index 55aa7c1de67d65f40a4148d574bbf0f341c4ac48..47650e0394abc560adda8cc550092ee0d6466530 100644
--- a/ipalib/plugins/selfservice.py
+++ b/ipalib/plugins/selfservice.py
@@ -70,8 +70,8 @@ class selfservice(Object):
     """
 
     bindable = False
-    object_name = 'self service permission',
-    object_name_plural = 'self service permissions',
+    object_name = _('self service permission')
+    object_name_plural = _('self service permissions')
     label = _('Self Service Permissions')
     label_singular = _('self service permission')
 
diff --git a/ipalib/plugins/service.py b/ipalib/plugins/service.py
index 4f8bc1eb83fad0c9c57cb03e6cc0a3aa8946ebb9..2fda569426efcdf0bf3dc361c334cfdeb7c078f8 100644
--- a/ipalib/plugins/service.py
+++ b/ipalib/plugins/service.py
@@ -200,8 +200,8 @@ class service(LDAPObject):
     Service object.
     """
     container_dn = api.env.container_service
-    object_name = 'service'
-    object_name_plural = 'services'
+    object_name = _('service')
+    object_name_plural = _('services')
     object_class = [
         'krbprincipal', 'krbprincipalaux', 'krbticketpolicyaux', 'ipaobject',
         'ipaservice', 'pkiuser'
diff --git a/ipalib/plugins/sudocmd.py b/ipalib/plugins/sudocmd.py
index 800ab2409a2f58813681ca5e2ee9fc52b2dfc815..2da041e0a5a66d461562f888502d307b7e32da78 100644
--- a/ipalib/plugins/sudocmd.py
+++ b/ipalib/plugins/sudocmd.py
@@ -47,8 +47,8 @@ class sudocmd(LDAPObject):
     Sudo Command object.
     """
     container_dn = api.env.container_sudocmd
-    object_name = 'sudo command'
-    object_name_plural = 'sudo commands'
+    object_name = _('sudo command')
+    object_name_plural = _('sudo commands')
     object_class = ['ipaobject', 'ipasudocmd']
     # object_class_config = 'ipahostobjectclasses'
     search_attributes = [
diff --git a/ipalib/plugins/sudocmdgroup.py b/ipalib/plugins/sudocmdgroup.py
index bee417a90820b8262041af01eee332a856a0a876..fe7d670c8ac9db9c645a14d3a653be6bf39531f3 100644
--- a/ipalib/plugins/sudocmdgroup.py
+++ b/ipalib/plugins/sudocmdgroup.py
@@ -51,8 +51,8 @@ class sudocmdgroup(LDAPObject):
     Sudo Group object.
     """
     container_dn = api.env.container_sudocmdgroup
-    object_name = 'sudo command group'
-    object_name_plural = 'sudo command groups'
+    object_name = _('sudo command group')
+    object_name_plural = _('sudo command groups')
     object_class = ['ipaobject', 'ipasudocmdgrp']
     default_attributes = [
         'cn', 'description', 'member',
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index f595727df71742086a689f836b97cb3fd97de80d..c1bbfb62cd5c654c44a70e3e3f827f3a3981e19b 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -45,8 +45,8 @@ class sudorule(LDAPObject):
     Sudo Rule management
     """
     container_dn = api.env.container_sudorule
-    object_name = 'sudo rule'
-    object_name_plural = 'sudo rules'
+    object_name = _('sudo rule')
+    object_name_plural = _('sudo rules')
     object_class = ['ipaassociation', 'ipasudorule']
     default_attributes = [
         'cn', 'ipaenabledflag',
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index 1f85238daeccb67349cd53242356f19c9e6b81ea..105814d5f5507ee14718c395c25452aca8b15c8d 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -80,8 +80,8 @@ class user(LDAPObject):
     User object.
     """
     container_dn = api.env.container_user
-    object_name = 'user'
-    object_name_plural = 'users'
+    object_name = _('user')
+    object_name_plural = _('users')
     object_class = ['posixaccount']
     object_class_config = 'ipauserobjectclasses'
     possible_objectclasses = ['meporiginentry']
-- 
1.7.5.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to