On Sun, 2007-10-28 at 21:46 +0000, Dmitri Fedortchenko wrote:
> That's a great idea! I'll see if I can squeeze out a patch for this,
> since I feel that I want to be able to indent blocktrans without
> having the extra spaces in the po files (I realize one can remove the
> extra spaces manually in the po files, but I like consistent
> autogeneration hehe).
> 
> In other words, whitespace equal to the amount of the indentation of
> first line will be removed, as well as leading and trailing whitespace
> and line breaks.
> One question that springs to mind: If the first line is on the same
> line as the {% blocktrans %}tag itself (i.e. it has no indentation),
> should we strip the subsequent lines based on the indentation of the
> second line, or assume that the user wants to keep the text as is?

Well, firstly, I'd rather you solved the two problems in a slightly
reverse order: first allow linebreaks inside blocktrans, then let's
worry about stripping whitespace. But it's up to you.

My ideal scenario would be that if we have a block of text that needs to
be translated, strip a constant amount of whitespace from the front of
each line. This amount will be the minimum amount of leading whitespace
on any of the lines in that block. So, at the end, one line (at least)
will always be flush against the left margin and all other lines will be
indented relative to that line as they were in the source text.

(My reason for writing that alternative formulation is because I don't
really understand what you were asking about being on the same level as
the blocktrans tag. I'm not sure why the tag is relevant here.)

Come up with a patch that does whatever you like and we can go from
there. I think we're thinking along similar lines, so it will be easy
enough to tweak once we have some concrete code to throw darts at.

Regards,
Malcolm

-- 
Remember that you are unique. Just like everyone else. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to