summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/automember.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-02-10 04:27:53 -0500
committerMartin Kosek <mkosek@redhat.com>2012-02-10 11:53:40 +0100
commit90d99f6017c934541a5263f4ccd708ad7c36491f (patch)
tree07d3596ba18675c99cc2656da8ca25814eb6185a /ipalib/plugins/automember.py
parenteba3a341e607b542afabdedf0f6508e7c0a5e96c (diff)
downloadfreeipa-90d99f6017c934541a5263f4ccd708ad7c36491f.tar.gz
freeipa-90d99f6017c934541a5263f4ccd708ad7c36491f.tar.xz
freeipa-90d99f6017c934541a5263f4ccd708ad7c36491f.zip
Clean up i18n strings
This patch switches to named ("%(name)s") instead of positional ("%s") substitutions for internationalized strings, so translators can reorder the words. This fixes https://fedorahosted.org/freeipa/ticket/2179 (xgettext no longer gives warnings). Also, some i18n calls are rewritten to translate the template before substitutions, not after.
Diffstat (limited to 'ipalib/plugins/automember.py')
-rw-r--r--ipalib/plugins/automember.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/plugins/automember.py b/ipalib/plugins/automember.py
index 3b652185e..fabc9bb35 100644
--- a/ipalib/plugins/automember.py
+++ b/ipalib/plugins/automember.py
@@ -185,7 +185,7 @@ class automember(LDAPObject):
try:
(gdn, entry_attrs) = ldap.get_entry(dn, [])
except errors.NotFound:
- raise errors.NotFound(reason=_(u'Group: %s not found!' % groupname))
+ raise errors.NotFound(reason=_(u'Group: %s not found!') % groupname)
return gdn
def get_dn(self, *keys, **options):
@@ -212,7 +212,7 @@ class automember(LDAPObject):
if obj is not None:
return obj
else:
- raise errors.NotFound(reason=_('%s is not a valid attribute.' % attr))
+ raise errors.NotFound(reason=_('%s is not a valid attribute.') % attr)
api.register(automember)
@@ -283,7 +283,7 @@ class automember_add_condition(LDAPUpdate):
try:
(tdn, test_attrs) = ldap.get_entry(dn, [])
except errors.NotFound:
- raise errors.NotFound(reason=_(u'Auto member rule: %s not found!' % keys[0]))
+ raise errors.NotFound(reason=_(u'Auto member rule: %s not found!') % keys[0])
# Define container key
key = options['key']
# Check to see if the attribute is valid
@@ -369,7 +369,7 @@ class automember_remove_condition(LDAPUpdate):
try:
(tdn, test_attrs) = ldap.get_entry(dn, [])
except errors.NotFound:
- raise errors.NotFound(reason=_(u'Auto member rule: %s not found!' % keys[0]))
+ raise errors.NotFound(reason=_(u'Auto member rule: %s not found!') % keys[0])
# Define container key
type_attr_default = {'group': 'manager', 'hostgroup': 'fqdn'}