Opened 6 years ago
Closed 6 years ago
#30109 closed Bug (duplicate)
F-String translations don't work
Reported by: | ZaArsProgger | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 2.1 |
Severity: | Normal | Keywords: | translations f-strings formated string |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
So, f-strings connot be translate.
Code:
modal_important_info_list.append( dict( type='danger', title=_(f'The client {client_instance.title} has debts on:'), content=', '.join([str(x) for x in content_list]), ) )
#: models.py:1031 #, python-brace-format msgid "The client {client_instance.title} has debts on:" msgstr "У клиента {client_instance.title} есть задолженности по:"
As result, I see next:
The client НАЗВАНИЕ_КЛИЕНТА has debts on:
Change History (1)
comment:1 by , 6 years ago
Component: | Uncategorized → Internationalization |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Summary: | F-String translations no works → F-String translations don't work |
Note:
See TracTickets
for help on using tickets.
Django isn't at fault -- it's a limitation of
gettext
- see #29174.