Code

Opened 7 years ago

Closed 7 years ago

#5401 closed (fixed)

[newforms-admin] - make-messages.py does'nt work for django

Reported by: Petr Marhoun <petr.marhoun@…> Owned by: nobody
Component: Internationalization Version: newforms-admin
Severity: Keywords: newforms-admin, make-messages, sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There are some untranslatable strings in django.contrib.admindocs:

> make-messages -l cs
processing language cs
errors happened while running xgettext on views.py
./contrib/admindocs/views.py:172: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                           The translator cannot reorder the arguments.
                                           Please consider using a format string with named arguments,
                                           and a mapping instead of a tuple for the arguments.
./contrib/admindocs/views.py:184: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                           The translator cannot reorder the arguments.
                                           Please consider using a format string with named arguments,
                                           and a mapping instead of a tuple for the arguments.
./contrib/admindocs/views.py:215: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                           The translator cannot reorder the arguments.
                                           Please consider using a format string with named arguments,
                                           and a mapping instead of a tuple for the arguments.

It can be solved by the attached patch.

Attachments (1)

newforms-admin-translations.diff (1.6 KB) - added by Petr Marhoun <petr.marhoun@…> 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Petr Marhoun <petr.marhoun@…>

comment:1 Changed 7 years ago by Dimitris Glezos <dimitris@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Confirming that the attached patch solves the problem.

comment:2 Changed 7 years ago by Fredrik Lundh <fredrik@…>

  • Keywords make-messages, sprintsept14 added; make-messages removed
  • Triage Stage changed from Accepted to Ready for checkin

(I prefer dict(app_label=app_label, ...) over {'app_label': app_label, ...}, but that's me)

comment:3 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [6319]) newforms-admin: Fixed #5401 -- make-messages.py works again. Thanks, Petr Marhoun

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.