|
From: <sub...@co...> - 2008-11-15 20:47:55
|
Author: ianb
Date: 2008-11-15 13:47:50 -0700 (Sat, 15 Nov 2008)
New Revision: 3664
Modified:
FormEncode/trunk/formencode/validators.py
Log:
Change the way _ is defined so pygettext doesn't mind it
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2008-11-15 20:47:24 UTC (rev 3663)
+++ FormEncode/trunk/formencode/validators.py 2008-11-15 20:47:50 UTC (rev 3664)
@@ -54,11 +54,12 @@
True, False = (1==1), (0==1)
-def _(s): return s # dummy translation function, nothing is translated here.
- # Instead this is actually done in api.message.
- # The surrounding _("string") of the strings is only for extracting
- # the strings automatically
- # if you run pygettext with this source comment this function out temporarly
+# dummy translation function, nothing is translated here.
+# Instead this is actually done in api.message.
+# The surrounding _("string") of the strings is only for extracting
+# the strings automatically
+# (Note: we can't use a def statement, because pygettext dislikes it)
+_ = lambda s: return s
############################################################
## Utility methods
|