#29174: makemessages does not find translations in Python 3.6 formatted string
literals
------------------------------------------------+------------------------
Reporter: tonnzor | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Python 3.6 introduced formatted string literals, that are easy to use
https://docs.python.org/3/reference/lexical_analysis.html#f-strings
But Django 2.0.2 does not recognize it when it tries to extract
translations into PO file.
Demo:
{{{
# views.py
from django.utils.translation import ugettext_lazy as _
header = f'{_("Header")}'
header_old = '{}'.format(_("Header old"))
}}}
Run:
{{{
./manage.py makemessages -a
}}}
PO file would contain only "Header old".
--
Ticket URL: <https://code.djangoproject.com/ticket/29174>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.5791839e6f8d226953e6626e4b3ff4d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.