danihodovic / django-allauth-ui

Nice looking templates for django-allauth
https://django-allauth-ui.hodovi.ch
MIT License
188 stars 24 forks source link

Translation Error #56

Closed nicokant closed 4 weeks ago

nicokant commented 4 weeks ago

Hi, I'm having an error while compiling locale with `compilemessages.

I'm using Django 5, the error is the following:

Execution of msgfmt failed: /app/.venv/lib/python3.11/site-packages/allauth_ui/locale/fr/LC_MESSAGES/django.po:226: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: In the directive number 1, the character 'p' is not a valid conversion specifier.
msgfmt: found 1 fatal error
danihodovic commented 4 weeks ago

What commands did you run? What is the git diff?

nicokant commented 4 weeks ago

I used python manage.py compilemessages.

python 3.11 Django 5

the git diff between the file and the latest in your repository shows no difference

nicokant commented 4 weeks ago

I think the problem is %(provider_name) at line 228 that misses the s character at the end: https://github.com/danihodovic/django-allauth-ui/blob/master/allauth_ui/locale/fr/LC_MESSAGES/django.po#L228C51-L228C66

nicokant commented 4 weeks ago

I opened a PR for this, it could be related to this issue in django rosetta: https://github.com/mbi/django-rosetta/issues/128

nicokant commented 2 weeks ago

Hi, I have a new compilemessages error for the language pt_BR probably related to commit 37854f24ba92be42acba682278f4c291e4b48d47.

allauth_ui/locale/pt_BR/LC_MESSAGES/django.po:126: a format specification for argument 'passwd_reset_url' doesn't exist in 'msgstr'
#16 1.547 /app/.venv/lib/python3.11/site-packages/allauth_ui/locale/pt_BR/LC_MESSAGES/django.po:229: 'msgid' and 'msgstr' entries do not both end with '\n'

I think it would be helpful to add a CI task that verifies that the translations can be compiled, to avoid having them committed in the source code