Django

Code

Ticket #5401 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: Petr Marhoun <petr.marhoun@gmail.com> Assigned to: nobody
Milestone: Component: Internationalization
Version: newforms-admin Keywords: newforms-admin, make-messages, sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

newforms-admin-translations.diff (1.6 kB) - added by Petr Marhoun <petr.marhoun@gmail.com> on 09/11/07 11:26:02.

Change History

09/11/07 11:26:02 changed by Petr Marhoun <petr.marhoun@gmail.com>

  • attachment newforms-admin-translations.diff added.

09/14/07 14:20:59 changed by Dimitris Glezos <dimitris@glezos.com>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

Confirming that the attached patch solves the problem.

09/15/07 06:13:10 changed by Fredrik Lundh <fredrik@pythonware.com>

  • keywords changed from newforms-admin, make-messages to newforms-admin, make-messages, sprintsept14.
  • stage changed from Accepted to Ready for checkin.

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

09/15/07 14:48:08 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #5401 ([newforms-admin] - make-messages.py does'nt work for django)




Change Properties
Action