Commits

g8way  committed 4bdd3c7

fixed one error in regressiontests.view

  • Participants
  • Parent commits e14545a

Comments (0)

Files changed (1)

File tests/regressiontests/views/tests/i18n.py

 import gettext
+import os, sys
 
 from django.conf import settings
 from django.test import TestCase
         for lang_code in ['es', 'fr', 'ru']:
             activate(lang_code)
             catalog = gettext.translation('djangojs', locale_dir, [lang_code])
-            trans_txt = catalog.ugettext('this is to be translated')
+            if sys.version_info >= (3,): 
+                trans_txt = catalog.gettext('this is to be translated')
+            else:
+                trans_txt = catalog.ugettext('this is to be translated')
             response = self.client.get('/views/jsi18n/')
             # in response content must to be a line like that:
             # catalog['this is to be translated'] = 'same_that_trans_txt'