Created
December 18, 2012 20:41
-
-
Save anonymous/4331766 to your computer and use it in GitHub Desktop.
Bug with Django translations, issue with documentation, or me being stupid?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: from django.utils.translation import ugettext as _ | |
In [2]: [_('red'),_('blue')] | |
Out[2]: [u'red', u'blue'] | |
In [3]: [_('red'),_('blue')] | |
TypeError Traceback (most recent call last) | |
/Users/jg026715/.virtualenvs/iqh/lib/python2.7/site-packages/django/core/management/commands/shell.pyc in <module>() | |
----> 1 [_('red'),_('blue')] | |
TypeError: 'list' object is not callable | |
In [4]: [_('red'),_('blue')] | |
KeyboardInterrupt | |
In [4]: from django.utils.translation import ugettext | |
In [5]: [ugettext('red'),ugettext('blue')] | |
Out[5]: [u'red', u'blue'] | |
In [6]: [ugettext('red'),ugettext('blue')] | |
Out[6]: [u'red', u'blue'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment