Description

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:

I would like to start by pointing out that as it is right now, the patch breaks a few blocktrans msgids from the admin app.
However I feel that it might be worth it anyway, and I am sure there can be a workaround. Perhaps a transitional period where two checks are made, one with stripping and then a second AS IS if the first fails...

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.

Another problem that I haven't seen mentioned, that is implied above: The same blocktrans text could be used at different indentation levels and gets interpreted as different msgids, thus needs to be translated more than necessary.