On Sep 26, 2006, at 5:50 AM, Gregor Horvath wrote:

>
> Kevin Dangoor schrieb:
>>
>> I think the general idea was that FormEncode would have a plug point
>> where we could attach our lazy string or some similar mechanism to
>> transform the message that gets displayed. Ultimately, localizable
>> validation messages are something we should have.
>>
>
> I am going to develop e mechanism for FormEncode that determines if  
> a _
> function ist installed in the __builtin__ and use that for message
> translation. (and if not uses its own translation mechanism)
>
> What I dont see yet is how to integrate the standard compiled  
> FormEncode
> messages to my own projects TG messages. Is there any proposed  
> mechanism
> or idea in TG for that?

I see two possible solutions for this:

1) Subclass FormEncode's validators in turbogears.validators under  
the same name, copy&paste their messages and wrap the strings in _(),  
hen jst collect those _() wrapped strings in the usual way.... yuck!

2) Hack the string collecting function in i18n to walk all FE's  
modules, grab the validator's "messages" attribute and extract those  
strings into the .pot files.

Disclaimer: I'm no i18n expert whatsoever so please excuse me if any  
of the above are crazy suggestions.

i18n for FE's messages is something I've always longed and a feature  
(shamefully :( ) missing from TG so your work on this is much  
appreciated! :)

Alberto

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to