1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Converted usage of ugettext* functions to their gettext* aliases

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz
2017-01-26 20:58:33 +01:00
parent 4353640ea9
commit c651331b34
129 changed files with 362 additions and 355 deletions

View File

@@ -15,7 +15,7 @@ from django.core.management.utils import find_command
from django.test import SimpleTestCase, override_settings
from django.test.utils import captured_stderr, captured_stdout
from django.utils import translation
from django.utils.translation import ugettext
from django.utils.translation import gettext
from .utils import RunInTmpDirMixin, copytree
@@ -167,15 +167,15 @@ class FuzzyTranslationTest(ProjectAndAppTests):
with override_settings(LOCALE_PATHS=[os.path.join(self.test_dir, 'locale')]):
call_command('compilemessages', locale=[self.LOCALE], stdout=StringIO())
with translation.override(self.LOCALE):
self.assertEqual(ugettext('Lenin'), 'Ленин')
self.assertEqual(ugettext('Vodka'), 'Vodka')
self.assertEqual(gettext('Lenin'), 'Ленин')
self.assertEqual(gettext('Vodka'), 'Vodka')
def test_fuzzy_compiling(self):
with override_settings(LOCALE_PATHS=[os.path.join(self.test_dir, 'locale')]):
call_command('compilemessages', locale=[self.LOCALE], fuzzy=True, stdout=StringIO())
with translation.override(self.LOCALE):
self.assertEqual(ugettext('Lenin'), 'Ленин')
self.assertEqual(ugettext('Vodka'), 'Водка')
self.assertEqual(gettext('Lenin'), 'Ленин')
self.assertEqual(gettext('Vodka'), 'Водка')
class AppCompilationTest(ProjectAndAppTests):