How to set up wire transfer with Django Allauth

I am trying to set up translations for emails using django-allauth.
I rewrote my templates, translated my .po files and executed them.

The html translations work fine, but for some reason, the letters just don't translate.

I set up translations correctly after the django tutorial
https://docs.djangoproject.com/en/1.10/topics/i18n/translation/#how-django-discovers-language-preference

A related question doesn't help: How does email translation work with django allauth?

Package Options:
Django == 1.10
Django-allauth == 0.27.0

+4
source share
1 answer

I had the same problem with django-allauth==0.32.0and Django==1.11.1. The translations supplied with allauthare simply outdated or incomplete. In my project, for example, an email with a link to reset, the password was always in English (the default language LANGUAGE_CODE = 'en'), although the user set the language to Czech.

In the .pofile for Czech translations: https://github.com/pennersr/django-allauth/blob/master/allauth/locale/cs/LC_MESSAGES/django.po#L408 - this is an email translation marked as fuzzy- therefore translations are not is used. The same applies to other languages ​​that I checked ( de, es...).

The reason is explained in this comment by the author allauth:

allauth , - . , , . , .

: https://github.com/pennersr/django-allauth/issues/1113#issuecomment-141189606

, :

+1

Source: https://habr.com/ru/post/1652639/


All Articles