diff --git a/django/views/i18n.py b/django/views/i18n.py
index 133c42f..d55d5aa 100644
a
|
b
|
def javascript_catalog(request, domain='djangojs', packages=None):
|
211 | 211 | en_catalog_missing = True |
212 | 212 | # Otherwise it is harmless. |
213 | 213 | pass |
| 214 | paths.extend(settings.LOCALE_PATHS) |
214 | 215 | # next load the settings.LANGUAGE_CODE translations if it isn't english |
215 | 216 | if default_locale != 'en': |
216 | 217 | for path in paths: |
diff --git a/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/djangojs.po b/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/djangojs.po
new file mode 100644
index 0000000..1b32c76
-
|
+
|
|
| 1 | msgid "" |
| 2 | msgstr "" |
| 3 | "Project-Id-Version: Django\n" |
| 4 | "Report-Msgid-Bugs-To: \n" |
| 5 | "POT-Creation-Date: 2010-05-05 00:38+0200\n" |
| 6 | "PO-Revision-Date: 2008-06-23 21:02+0100\n" |
| 7 | "Last-Translator: Jannis Leidel <jannis@leidel.info>\n" |
| 8 | "Language-Team: \n" |
| 9 | "MIME-Version: 1.0\n" |
| 10 | "Content-Type: text/plain; charset=UTF-8\n" |
| 11 | "Content-Transfer-Encoding: 8bit\n" |
| 12 | "Plural-Forms: nplurals=2; plural=(n != 1)\n" |
| 13 | |
| 14 | #: test.js:1 |
| 15 | msgid "Thanks Django" |
| 16 | msgstr "Danke Django" |
| 17 | |
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index 615ffe8..c3e8d05 100644
a
|
b
|
class AppResolutionOrderI18NTests(ResolutionOrderI18NTests):
|
652 | 652 | self.assertUgettext('Date/time', 'APP') |
653 | 653 | |
654 | 654 | class LocalePathsResolutionOrderI18NTests(ResolutionOrderI18NTests): |
| 655 | urls = 'regressiontests.i18n.urls' |
655 | 656 | |
656 | 657 | def setUp(self): |
657 | 658 | self.old_locale_paths = settings.LOCALE_PATHS |
… |
… |
class LocalePathsResolutionOrderI18NTests(ResolutionOrderI18NTests):
|
665 | 666 | def test_locale_paths_translation(self): |
666 | 667 | self.assertUgettext('Date/time', 'LOCALE_PATHS') |
667 | 668 | |
| 669 | def test_locale_paths_js_translation(self): |
| 670 | response = self.client.get('/jsi18n/') |
| 671 | self.assertContains(response, "catalog['Thanks Django'] = 'Danke Django';") |
| 672 | |
668 | 673 | class ProjectResolutionOrderI18NTests(ResolutionOrderI18NTests): |
669 | 674 | |
670 | 675 | def setUp(self): |
diff --git a/tests/regressiontests/i18n/urls.py b/tests/regressiontests/i18n/urls.py
new file mode 100644
index 0000000..42e3ce7
-
|
+
|
|
| 1 | # coding: utf-8 |
| 2 | from django.conf.urls.defaults import * |
| 3 | |
| 4 | urlpatterns = patterns('', |
| 5 | (r'^jsi18n/$', 'django.views.i18n.javascript_catalog'), |
| 6 | ) |