mozilla/kitsune — pull request #1128 by willkg (2013-02-07 00:16:58+00:00)
Title: [bug #827649] l10n email templates for users and questions

* add the .ltxt domain so email template strings get extracted.

this only affects jinja templates. the ones that are still
django templates fail silently during extraction and never make
it to the .pot file which is fine.

* convert users app and questions app emails from Django to Jinja
with the exception of apps/users/templates/users/emails/pw_reset.ltxt
because that template is rendered by Django's PasswordResetForm
and thus it has to be a Django template until we change Kitsune
so that jingo overrides the Django templating stuff.

* add required unsubscribe_text macro.

* fix question and answer model makers to create a user with a
profile.

* create new sumo.email_utils library which simplifies dealing with
email templates.

* fix all the places in the users and questions apps where we were
rendering email templates using Django things to use Jingo things
and use the correct locale.

Some thoughts:

1. Run the tests. That tickles most things to make sure the code isn't kicking up errors.
2. Run `scripts/test_locales.sh` and verify that all the email template bits are in there for the users and questions apps.
3. Then you have to go through and do all the things to trigger all the users and questions email template scenarios. This is a pain in the ass. Make sure you're in the `xx` locale. It's easy to slip out because a lot of the links seem to be hardcoded en-US or something like that. You can see the emails generated in your console.

The pw_reset.ltxt template thing is annoying--that's still a Django template. I didn't touch any of the other email templates in the other apps. Once this lands, I'll create bugs to handle the other apps.

r?