Revert "locale: Fix incorrect locale name for zh-Hans."

This reverts commit ba8dc62132.

As best I can tell, the old configuration was correct for what Django
wanted.  Further testing is required, but this at least brings
.tx/config to match the actual filenames; I think our Chinese
translations have been broken until now.
This commit is contained in:
Tim Abbott 2017-10-06 10:06:41 -07:00
parent 0f2e4a55c0
commit fe6a04cbdb
4 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = zh-Hans: zh_Hans, zh-Hant: zh_Hant
[zulip.djangopo]
source_file = static/locale/en/LC_MESSAGES/django.po

View File

@ -40,10 +40,11 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-hans', u'注册'),
]
for lang, word in languages:
response = self.fetch('get', '/login/', 200,
response = self.fetch('get', '/integrations/', 200,
HTTP_ACCEPT_LANGUAGE=lang)
self.assert_in_response(word, response)
@ -52,6 +53,7 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-hans', u'注册'),
]
for lang, word in languages:
@ -59,7 +61,7 @@ class TranslationTestCase(ZulipTestCase):
# into an ascii otherwise SimpleCookie will raise an exception
self.client.cookies = SimpleCookie({str(settings.LANGUAGE_COOKIE_NAME): lang})
response = self.fetch('get', '/login/', 200)
response = self.fetch('get', '/integrations/', 200)
self.assert_in_response(word, response)
def test_i18n_urls(self):
@ -67,10 +69,11 @@ class TranslationTestCase(ZulipTestCase):
languages = [('en', u'Register'),
('de', u'Registrieren'),
('sr', u'Региструј се'),
('zh-hans', u'注册'),
]
for lang, word in languages:
response = self.fetch('get', '/{}/login/'.format(lang), 200)
response = self.fetch('get', '/{}/integrations/'.format(lang), 200)
self.assert_in_response(word, response)