[p2pu-dev] Success message after course creation is not in English, even though LANGUAGE_CODE = 'en'

Prasanth oneaufs at gmail.com
Sat Jun 2 09:09:39 UTC 2012


Hello,

I noticed a strange behavior in the latest commit in the master branch on
github (commit bca3ba2b6b59c9f3de593a48ca5cc4a7c4146e55).

After creating a course I get the following message (in a green "box" just
after the breadcrumbs trail):

course已经被创造。

First I thought the language setting was wrong. But in settings.py,
language is set to English in line 41:

   # Language code for this installation. All choices can be found here:
   # http://www.i18nguy.com/unicode/language-identifiers.html
   LANGUAGE_CODE = 'en'

This string is present in line 188 of locale/zh_CN/LC_MESSAGES/django.po:

   #: apps/badges/views.py:86 apps/projects/views.py:191
   #, python-format
   msgid "The %s has been created."
   msgstr "%s已经被创造。"


To see if the program was performing this translation, I changed line 190
in apps/projects/views.py from

       messages.success(request,
                _('The %s has been created.') % project.kind.lower())

to

       messages.success(request,
                _('Something else %s.') % project.kind.lower())

Then I get the expected message "Something else course".


Is the program, for some reason, trying to translate the line into zh_CN?
Or is this behavior due to some other reason?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p2pu.org/pipermail/p2pu-dev/attachments/20120602/017a8286/attachment.html>


More information about the p2pu-dev mailing list