Author: mtredinnick
Date: 2007-05-31 04:51:39 -0500 (Thu, 31 May 2007)
New Revision: 5390

Modified:
   django/branches/unicode/django/utils/translation/trans_null.py
Log:
unicode: Fixed #4442 -- Fixed a problem with string_concat() when
USE_I18N=False.


Modified: django/branches/unicode/django/utils/translation/trans_null.py
===================================================================
--- django/branches/unicode/django/utils/translation/trans_null.py      
2007-05-31 09:04:55 UTC (rev 5389)
+++ django/branches/unicode/django/utils/translation/trans_null.py      
2007-05-31 09:51:39 UTC (rev 5390)
@@ -3,7 +3,7 @@
 # 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
@@ -11,9 +11,9 @@
 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 @@
     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
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to