mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
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:
@@ -1,5 +1,6 @@
|
|||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
lang_map = zh-Hans: zh_Hans, zh-Hant: zh_Hant
|
||||||
|
|
||||||
[zulip.djangopo]
|
[zulip.djangopo]
|
||||||
source_file = static/locale/en/LC_MESSAGES/django.po
|
source_file = static/locale/en/LC_MESSAGES/django.po
|
||||||
|
|||||||
@@ -40,10 +40,11 @@ class TranslationTestCase(ZulipTestCase):
|
|||||||
languages = [('en', u'Register'),
|
languages = [('en', u'Register'),
|
||||||
('de', u'Registrieren'),
|
('de', u'Registrieren'),
|
||||||
('sr', u'Региструј се'),
|
('sr', u'Региструј се'),
|
||||||
|
('zh-hans', u'注册'),
|
||||||
]
|
]
|
||||||
|
|
||||||
for lang, word in languages:
|
for lang, word in languages:
|
||||||
response = self.fetch('get', '/login/', 200,
|
response = self.fetch('get', '/integrations/', 200,
|
||||||
HTTP_ACCEPT_LANGUAGE=lang)
|
HTTP_ACCEPT_LANGUAGE=lang)
|
||||||
self.assert_in_response(word, response)
|
self.assert_in_response(word, response)
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ class TranslationTestCase(ZulipTestCase):
|
|||||||
languages = [('en', u'Register'),
|
languages = [('en', u'Register'),
|
||||||
('de', u'Registrieren'),
|
('de', u'Registrieren'),
|
||||||
('sr', u'Региструј се'),
|
('sr', u'Региструј се'),
|
||||||
|
('zh-hans', u'注册'),
|
||||||
]
|
]
|
||||||
|
|
||||||
for lang, word in languages:
|
for lang, word in languages:
|
||||||
@@ -59,7 +61,7 @@ class TranslationTestCase(ZulipTestCase):
|
|||||||
# into an ascii otherwise SimpleCookie will raise an exception
|
# into an ascii otherwise SimpleCookie will raise an exception
|
||||||
self.client.cookies = SimpleCookie({str(settings.LANGUAGE_COOKIE_NAME): lang})
|
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)
|
self.assert_in_response(word, response)
|
||||||
|
|
||||||
def test_i18n_urls(self):
|
def test_i18n_urls(self):
|
||||||
@@ -67,10 +69,11 @@ class TranslationTestCase(ZulipTestCase):
|
|||||||
languages = [('en', u'Register'),
|
languages = [('en', u'Register'),
|
||||||
('de', u'Registrieren'),
|
('de', u'Registrieren'),
|
||||||
('sr', u'Региструј се'),
|
('sr', u'Региструј се'),
|
||||||
|
('zh-hans', u'注册'),
|
||||||
]
|
]
|
||||||
|
|
||||||
for lang, word in languages:
|
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)
|
self.assert_in_response(word, response)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user