Hi,

Yes, the messages do need to be replaceable and use i18n. I think the
right thing to do is something like the suggestion below, with the
strings wrapped in a lazygettext call...

Kevin

On 1/5/06, Ksenia Marasanova <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I wonder what would be the preferred way to customize datacontroller
> messages (things like "Record deleted!")? Maybe all messages should go
> to a class variable:
>
> class DataController(BaseDataController):
>     messages = dict(
>         delete='Record deleted!',
>         add='Record added!',
>         .....
>     )
>
> Than we can use:
>
> class News(DataController):
>     messages = dict(
>         delete='Newsitem is deleted',
>         add='Newsitem is added, don't forget to <a href="/pages/">link
> ik to a page</a>'
> )
>
> And the translation: it looks like turbogears internal modules don't
> use i18n yet. Since datacontroller and complex widgets are the first
> components "exposed" to the end user, it is probably a good idea not
> to hardcode english strings in it. Oh, and maybe translations for
> those components should be contributed as "plugins" / "language packs"
> :) ?
>
> --Ksenia
>


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to