Adrian Holovaty wrote: > > Agreed WHOLEHEARTEDLY! We've avoided Python syntax in template tags > thus far, and this proposal goes completely against that. > > I must say I like Ian's proposal that the template_loader could load a > different template based on language. That would avoid this whole > problem, and it'd allow for more language-specific flexibility -- e.g. > displaying different background colors or images, including different > JavaScript modules, etc., for different languages. >
I've got to reiterate that this is a really bad idea. It means that any time a template is changed, those logic changes have to be tracked by translators. The tools that currently exist will tell them which particular strings are out of date, rather than monolithically dumping the whole changed template, so they have to eyeball the changes or use diff ( translators are not programmers). It means that translators are working at a much coarser granularity, which will then lead to pressure to never change the logic in a template, so as not to affect translators. A string freeze then by proxy becomes a code freeze. It will also mean things breaking randomly for different languages, as you can be sure that not every translator will make the right changes when the original template changes, and they will make errors. "avoiding the whole problem" by making several much bigger ones doesn't really seem to be the right course. I'd love to see a use case for different styles and javascript according to language. Of course it could already be done with : <script src="{{translate "original_script.js"}}" ></script> Robert