but watch out, gettext doesnt like line breaks inside a blocktrans, i
only added them for readbility
On 6/14/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
> I understand Alans problem very well, the problem is that the text
> "this has been done by user A-HREF"
> is not always translated in the same order of words for all the
> languages, so the "XXX" which is a link (in alains example) might be
> at some other position, like in german
> "Dies wurde von Benutzer A-HREF gemacht"
> so the user link is not necessarily at the end of the string
>
> I can see the advantage of the Zope/Plone template solution, which
> tackles exactly this problem. My colleague Tobias has solved this in
> the following way, which might not be very readable and not ideal not
> for maintenance, but it does work very well!!!
> The plural is an additional thing, which makes it even more
> complicated to read :-)
> But it works ...
>
> {% blocktrans count tagged_users|length as counter
> with tagged_users|length as tagged_users_length
> and tag_type|stringformat:"<span class='%s'>" as span_open
> and "</span>" as span_close %}
>
> {{ tagged_users_length }} users also has this
> {{ span_open }}{{ tag_type_translated }}{{ span_close }}
>
> {% plural %}
>
> {{ tagged_users_length }} users also have this {{ span_open }}
> {{ tag_type_translated }}{{ span_close }}
>
> {% endblocktrans %}
>
> have a try alain
>
> good luck
>
> wolfram
>
> On 6/14/07, alain D. <[EMAIL PROTECTED]> wrote:
> >
> > Hi again,
> >
> > I would be happy to know you're impressions about the above
> > explanation ... if I made my point clear or not, or if you have any
> > objection why this would not be a useful feature ...
> >
> > Regards,
> >
> > --
> > AD
> >
> >
> > > >
> >
>
>
> --
> cu
>
> Wolfram
>
--
cu
Wolfram
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---