﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5849	Strip indentation and leading/trailing spaces/linebreaks from contents of blocktrans block.	Dmitri Fedortchenko <zeraien@…>	Bouke Haarsma	"The idea is to strip whitespace indentation from the contents of the blocktrans tag, as well as leading and trailing whitespace and linebreaks.

Blocktrans tags allow you to split your translation strings onto multiple lines and this is a good feature, especially if using the ""plural"" mode.

Picture this:
{{{
{% blocktrans number as count %}
There is {{count}} message
waiting for you
{% plural %}
There are {{count}} messages
waiting for you
{% endblocktrans %}
}}}
The biggest issue is if you indent the above block. Suddenly those msgids are obsolete and you need to edit all your language files....

Indentation is often changed in HTML since you might nest that block in a new DIV element or whatnot, and the ability to spread the msgids along many lines makes for cleaner looking code.

Furthermore, the current blocktrans tag implementation generates some ugly translation strings when using make-messages if you have indented your msgid block.
Since most HTML is somehow indented, the above can easily look like this:
{{{
msgid ""\n""
""\t\t\t\t\tThere are %(count)s messages\n""
""\t\t\t\t\twaiting for you\n""
""\t\t\t\t\t""
}}}

Note the last line of tabs, since it includes the indentation of the ""endblocktrans"" tag as well.

See this thread for more:
http://groups.google.com/group/django-developers/browse_thread/thread/60f0a0ac2347c5f5"	New feature	closed	Internationalization	dev	Normal	fixed	blocktrans strip indentation	chris@… phartig@… macek@… Danilo Bargen bbr@…	Ready for checkin	1	0	0	0	0	0
