Author: gh
Date: 2006-10-02 13:10:07 -0600 (Mon, 02 Oct 2006)
New Revision: 1969
Modified:
FormEncode/branches/gettext-enabled/docs/i18n.txt
FormEncode/branches/gettext-enabled/formencode/api.py
FormEncode/branches/gettext-enabled/formencode/validators.py
Log:
docs/i18n.txt correction
Modified: FormEncode/branches/gettext-enabled/docs/i18n.txt
===================================================================
--- FormEncode/branches/gettext-enabled/docs/i18n.txt 2006-10-02 19:04:46 UTC (rev 1968)
+++ FormEncode/branches/gettext-enabled/docs/i18n.txt 2006-10-02 19:10:07 UTC (rev 1969)
@@ -6,11 +6,13 @@
Domain "FormEncode"
^^^^^^^^^^^^^^^^^^^
-for standalone use of FormEncode, just place the compiled files in /usr/share/locale/<lang>/LC_MESSAGES/FormEncode.mo The language to use is determined out of the local system (see gettext documentation http://docs.python.org/lib/node733.html). Optionally you can also set the language or the domain explicitly with the function
+for standalone use of FormEncode. The language to use is determined out of the local system (see gettext documentation http://docs.python.org/lib/node733.html). Optionally you can also set the language or the domain explicitly with the function.
example:
formencode.api.set_stdtranslation(domain="FormEncode", languages=["de"])
+The mo files are located in the i18n subdirectory of the formencode installation.
+
state._
^^^^^^^
A custom _ gettext function provided as attribute of the state object.
Modified: FormEncode/branches/gettext-enabled/formencode/api.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-02 19:04:46 UTC (rev 1968)
+++ FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-02 19:10:07 UTC (rev 1969)
@@ -25,7 +25,7 @@
set_stdtranslation()
-#def _(s): return s # dummy i18n translation function, nothing is translated here.
+def _(s): return s # dummy i18n translation function, nothing is translated here.
# Instead this is actually done in api.Validator.message.
# The surrounding _("string") of the strings is only for extracting
# the strings automatically
Modified: FormEncode/branches/gettext-enabled/formencode/validators.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/validators.py 2006-10-02 19:04:46 UTC (rev 1968)
+++ FormEncode/branches/gettext-enabled/formencode/validators.py 2006-10-02 19:10:07 UTC (rev 1969)
@@ -44,7 +44,7 @@
True, False = (1==1), (0==1)
-#def _(s): return s # dummy translation function, nothing is translated here.
+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
|