mysociety/alaveteli — pull request #763 by mlandauer (2013-01-18 05:02:51+00:00)
Title: Make translation interpolations more consistent

This also will fix #755.

I haven't yet finished work on this branch. Doing a pull request now because there are a lot of changes and I want to make sure that I'm doing the right thing especially given the discussion that's been happening in #753.

I'm attacking this whole thing now because there are a lot of potential XSS issues with the i18n text interpolation code. Part of the issue right now is that the interpolation is done inconsistently. I think they're under control with `gettext_interpolate` in `lib/i18n_fixes.rb` but there are still xss issues with `%`.

Rather than chasing down all the different xss issues with the different interpolation methods I'd rather make the interpolation done one way and make absolutely sure that's working right.

Also come across places where html was mixed in with the translation and it didn't need to be as there was a pretty simple way of taking it out. In those situations I've done that too. Again, this could be a source of pain for the translators (see #753) but I think the benefit of getting rid of html where we can should make the job of the translators easier.

Anyway, enough of this. Would appreciate feedback!