mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 14:17:41 -05:00
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.
This commit is contained in:
1 parent
eba3a341e6
commit
90d99f6017
5 files changed
+21
-19
No files matched your search
@@ -587,8 +587,8 @@ class sudorule_add_option(LDAPQuery):
|
||||
return dict(result=entry_attrs)
|
||||
|
||||
def output_for_cli(self, textui, result, cn, **options):
|
||||
textui.print_dashed(_('Added option "%s" to Sudo Rule "%s"') % \
|
||||
(options['ipasudoopt'], cn))
|
||||
textui.print_dashed(_('Added option "%(option)s" to Sudo Rule "%(rule)s"') % \
|
||||
dict(option=options['ipasudoopt'], rule=cn))
|
||||
super(sudorule_add_option, self).output_for_cli(textui, result, cn, options)
|
||||
|
||||
|
||||
@@ -642,8 +642,8 @@ class sudorule_remove_option(LDAPQuery):
|
||||
return dict(result=entry_attrs)
|
||||
|
||||
def output_for_cli(self, textui, result, cn, **options):
|
||||
textui.print_dashed(_('Removed option "%s" from Sudo Rule "%s"') % \
|
||||
(options['ipasudoopt'], cn))
|
||||
textui.print_dashed(_('Removed option "%(option)s" from Sudo Rule "%(rule)s"') % \
|
||||
dict(option=options['ipasudoopt'], rule=cn))
|
||||
super(sudorule_remove_option, self).output_for_cli(textui, result, cn, options)
|
||||
|
||||
api.register(sudorule_remove_option)
|
||||
Reference in new issue
Block a user