diff --git a/rosetta/locale/uk/LC_MESSAGES/django.mo b/rosetta/locale/uk/LC_MESSAGES/django.mo index fa2316d..d94dc10 100644 Binary files a/rosetta/locale/uk/LC_MESSAGES/django.mo and b/rosetta/locale/uk/LC_MESSAGES/django.mo differ diff --git a/rosetta/tests/tests.py b/rosetta/tests/tests.py index eb7eba5..2defbc6 100644 --- a/rosetta/tests/tests.py +++ b/rosetta/tests/tests.py @@ -50,6 +50,7 @@ class RosettaTestCase(TestCase): ('fr_FR.utf8', 'French (France), UTF8'), ('bs-Cyrl-BA', u'Bosnian (Cyrillic) (Bosnia and Herzegovina)'), ('yy-Anot', u'Yet Another dummy language'), + ('zh_Hans', u'Chinese (simplified)'), ) self.__session_engine = settings.SESSION_ENGINE @@ -720,6 +721,11 @@ class RosettaTestCase(TestCase): r = self.client.get(reverse('rosetta-pick-file')) self.assertTrue(os.path.normpath('locale/yy_Anot/LC_MESSAGES/django.po') in str(r.content)) + def test_38_issue_161_more_weird_locales(self): + r = self.client.get(reverse('rosetta-pick-file') + '?filter=all') + r = self.client.get(reverse('rosetta-pick-file')) + self.assertTrue(os.path.normpath('locale/zh_Hans/LC_MESSAGES/django.po') in str(r.content)) + # Stubbed access control function def no_access(user): diff --git a/testproject/locale/zh_Hans/LC_MESSAGES/django.po b/testproject/locale/zh_Hans/LC_MESSAGES/django.po new file mode 100644 index 0000000..5d9c151 --- /dev/null +++ b/testproject/locale/zh_Hans/LC_MESSAGES/django.po @@ -0,0 +1,34 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-14 02:28-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: templates/test.html:3 +msgid "Some text to translate" +msgstr "" + +#: templates/test.html:5 +#, python-format +msgid "" +"\n" +"one bottle of beer on the wall\n" +msgid_plural "" +"\n" +"%(num_bottles)s bottles of beer on the wall\n" +msgstr[0] "" +msgstr[1] "" diff --git a/testproject/settings.py b/testproject/settings.py index c9514ba..6511996 100644 --- a/testproject/settings.py +++ b/testproject/settings.py @@ -60,11 +60,13 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware' ) +# Note: languages are overridden in the test runner LANGUAGES = ( ('bs-Cyrl-BA', u'Bosnian (Cyrillic) (Bosnia and Herzegovina)'), ('ja', u'日本語'), ('xx', u'XXXXX'), ('fr', u'French'), + ('zh_Hans', u'Chinese (Simplified)'), ('fr_FR.utf8', u'French (France), UTF8'), )