This is also a problem on regular Zope, fwiw.

It's not particular hard to call ``translate`` first on the mapped
values, but it's of course a little tedious. The question is whether
it's too much of an overhead to go through any mapping, looking for
messages (i.e. the automatic alternative).

\malthe

On 27 July 2011 16:27, Wichert Akkerman <wich...@wiggy.net> wrote:
> We are running into an i18n conundrum with deform. Basically what happens is
> this:
>
> - we have a sequence item in a colander schema with a title, which
>  is a TranslationString instance
> - deform generates an add-button for the sequence which uses this
>  title using something similar to _('Add ${title}', mapping={...})
>
> When the add button is rendered its label is translated, but the sequence
> item title is not translated. I can see two ways of fixing
> this:
>
> 1. translationstring detects translatable items in its mapping, and
>   if it finds any it translates those before replacing them
> 2. deform (and others who do similar things) must manually translate
>   mapping items
>
> I'm not sure what the best option is. The second option may not be viable
> since I'm not sure the request or translate function is available
> at the places where you would need it. The first option adds extra
> complexity to translationstring, which isn't very attractive either. I
> suspect that is still the better option though.
>
> Opinions?
>
> Wichert.
>
>
> --
> Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
> http://www.wiggy.net/                  It is hard to make things simple.
> _______________________________________________
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to