Ian Bicking schrieb:
>
> That would be fine, but for this case we might also just put
> "gettext_domain='FormEncode'" into the class too, no? It seems
> reasonable to set the domain to 'FormEncode' by default.
>
yes, but the standard gettext function does not accept a domain argument
like the TG gettext function does. Instead the domain is definied at
creation time of the translation object:
import gettext # standard
t = gettext.translation(domain='FormEncode', \
languages=None, \
fallback=True)
_stdtrans = t.ugettext
from http://docs.python.org/lib/node735.html
ugettext(message)
Look up the message id in the catalog and return the corresponding
message string, as a Unicode string.
TG accepts a domain argument for gettext:
def gettext(key, locale=None, domain=None):
"""Gets the gettext value for key. Added to builtins as '_'. Returns
Unicode string."""
Therefore the gettext_domain argument (or more generally gettextargs)
must be a empty dict in case of standard translation.
--
Greg, Vienna
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---