[yum-commits] yumutils/i18n.py
James Antill
james at osuosl.org
Fri Feb 4 16:30:46 UTC 2011
yumutils/i18n.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 60e4a1fcb9081c68b8603c51d12d07cf2fa3ecf6
Author: James Antill <james at and.org>
Date: Fri Feb 4 11:30:40 2011 -0500
Have to put the function definitions before the assignments, BZ 674584
diff --git a/yumutils/i18n.py b/yumutils/i18n.py
index 50d448c..eada8ed 100644
--- a/yumutils/i18n.py
+++ b/yumutils/i18n.py
@@ -20,18 +20,6 @@ The yumutils.i18n pythom module for i18n code used by utils and plugins
# flag to disable i18n, set it to false to enable dummy wrappers.
_use_i18n = True
-if _use_i18n:
- try:
- from kitchen.i18n import easy_gettext_setup
- # setup the translation wrappers
- _, P_ = easy_gettext_setup('yum-utils')
- except:
- _ = dummy_wrapper
- P_ = dummyP_wrapper
-else:
- _ = dummy_wrapper
- P_ = dummyP_wrapper
-
def dummy_wrapper(str):
'''
@@ -48,4 +36,16 @@ def dummyP_wrapper(str1, str2, n):
return str1
else:
return str2
-
\ No newline at end of file
+
+if _use_i18n:
+ try:
+ from kitchen.i18n import easy_gettext_setup
+ # setup the translation wrappers
+ _, P_ = easy_gettext_setup('yum-utils')
+ except:
+ _ = dummy_wrapper
+ P_ = dummyP_wrapper
+else:
+ _ = dummy_wrapper
+ P_ = dummyP_wrapper
+
More information about the Yum-commits
mailing list