Permalink
Browse files

unicode: Fixed #4442 -- Fixed a problem with string_concat() when

USE_I18N=False.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 8b3781c commit 797c1d2a858bce0ae728c7bb2274e5b9a5b2423e @malcolmt malcolmt committed May 31, 2007
Showing with 4 additions and 4 deletions.
  1. +4 −4 django/utils/translation/trans_null.py
View
8 django/utils/translation/trans_null.py
@@ -3,17 +3,17 @@
# settings.USE_I18N = False can use this module rather than trans_real.py.
from django.conf import settings
-from django.utils.encoding import smart_unicode
+from django.utils.encoding import force_unicode
def ngettext(singular, plural, number):
if number == 1: return singular
return plural
ngettext_lazy = ngettext
def ungettext(singular, plural, number):
- return smart_unicode(ngettext(singular, plural, number))
+ return force_unicode(ngettext(singular, plural, number))
-string_concat = lambda *strings: u''.join([smart_unicode(el) for el in strings])
+string_concat = lambda *strings: u''.join([force_unicode(el) for el in strings])
activate = lambda x: None
deactivate = deactivate_all = install = lambda: None
get_language = lambda: settings.LANGUAGE_CODE
@@ -35,7 +35,7 @@ def gettext(message):
return TECHNICAL_ID_MAP.get(message, message)
def ugettext(message):
- return smart_unicode(gettext(message))
+ return force_unicode(gettext(message))
gettext_noop = gettext_lazy = _ = gettext

0 comments on commit 797c1d2

Please sign in to comment.