On Sun, 2007-11-18 at 02:01 -0800, alain D. wrote: > Hi, > > I agree that my proposed syntax was a little bit horrible ... but I > really wonder if it can be different. > > Your syntax is interesting but : > - I'm not sure it's really "djangoic" in the sense that it introduce > a new way to declare markup '[[' and ']]'
Well, as said, the brackets could be anything. Could be {{ }} or %{ } if those fit better. But yes, it is a new way to declare markup, if only inside a "blocktrans"-tag. My primary goal was to preserve (my) sanity by keeping the template code readable. Just imagine your example in everyday use. It may be more "djangoic" but it feels like dropping a scatter-bomb into the template to me... > - the other problem I see is that it exposes the translator to the > "remains" of the markup because of the %{0} and %{1} in the string to > translate... the whole idea is to prevent the translator (who only > wants do deal with translation) from seeing anything of this ... Yes, you have a strong point there. I'd argue that it's worth the tradeoff but others will ofcourse disagree. My rationale is that translators would usually be smart enough to understand and apply the concept after a quick briefing. It's not like you throw a .po file at your newly hired translator without further notice. In any case they already need to know what ${variable} tokens are. I think the step up to ${0}, ${1}, .. is merely a matter of explaining "please insert them in the equivalent spots as in the translation source". One could also add some simple validation code that raises a meaningful error message when the expected tokens are missing in a translated string. But honestly, I cannot think of a real-world example where the token transfer could get so complicated as to raise serious problems... Furthermore I'm not entirely sure that the alternative is without flaws either. I'm not a linguist but I wonder if arbitrarily splitting up the strings and translating the parts independently may introduce problems of its own, in some languages? > Actually, my syntax was more of less adapted from the zope/plone > syntax : see my original posting for a complete example > http://groups.google.com/group/django-developers/browse_thread/thread/c88b582fa4764aaa Saw it and well, didn't impress me. It's the java way and some people seem to like it, just as some people like java. I'm not one of these people, that's why I'm using django. :-) I jumped in so decidedly because I wouldn't like to see django going the way of most java frameworks in terms of verbosity here. Keeping template complexity down seems more important to me than saving my translators one trivial extra-step. YMMV. -mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---