summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-01-21 19:36:26 +0000
committerJannis Leidel <jannis@leidel.info>2011-01-21 19:36:26 +0000
commit5f4bc1ff234c0aabef3751052a6664acc56167fe (patch)
treeb1b93acd065944e9cbef492949925201a40b04e4
parentde8565e1c48f1c386a7b256e1ae585cbd8ff11b2 (diff)
Fixed a few translation related tests:
* Extended the admin i18n view to also take the admin translation catalogues into account. * Use a translation string from the core translations to test LOCALE_PATHS. * Fixed Russian translation of singular forms. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/admin/sites.py2
-rw-r--r--tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mobin611 -> 600 bytes
-rw-r--r--tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po14
-rw-r--r--tests/regressiontests/i18n/tests.py2
-rw-r--r--tests/regressiontests/templates/tests.py4
5 files changed, 11 insertions, 11 deletions
diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 0aa730f79e..c1f6970193 100644
--- a/django/contrib/admin/sites.py
+++ b/django/contrib/admin/sites.py
@@ -284,7 +284,7 @@ class AdminSite(object):
from django.views.i18n import javascript_catalog
else:
from django.views.i18n import null_javascript_catalog as javascript_catalog
- return javascript_catalog(request, packages='django.conf')
+ return javascript_catalog(request, packages=['django.conf', 'django.contrib.admin'])
@never_cache
def logout(self, request, extra_context=None):
diff --git a/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo b/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo
index b662e9392d..6db1cb1a8c 100644
--- a/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo
+++ b/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo
Binary files differ
diff --git a/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po b/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po
index fa297e5683..1aeee6983c 100644
--- a/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po
+++ b/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po
@@ -3,23 +3,22 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
-#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: django tests\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-14 17:33+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
+"PO-Revision-Date: 2011-01-16 17:14+0100\n"
+"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
+"Language-Team: de <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: models.py:3
-msgid "Date/time"
-msgstr "Datum/Zeit (LOCALE_PATHS)"
+msgid "Time"
+msgstr "Time (LOCALE_PATHS)"
#: models.py:5
msgctxt "month name"
@@ -37,3 +36,4 @@ msgid "%d result"
msgid_plural "%d results"
msgstr[0] "%d Resultat"
msgstr[1] "%d Resultate"
+
diff --git a/tests/regressiontests/i18n/tests.py b/tests/regressiontests/i18n/tests.py
index deba5d1d03..a9d9f28fd3 100644
--- a/tests/regressiontests/i18n/tests.py
+++ b/tests/regressiontests/i18n/tests.py
@@ -689,7 +689,7 @@ class LocalePathsResolutionOrderI18NTests(ResolutionOrderI18NTests):
super(LocalePathsResolutionOrderI18NTests, self).tearDown()
def test_locale_paths_translation(self):
- self.assertUgettext('Date/time', 'LOCALE_PATHS')
+ self.assertUgettext('Time', 'LOCALE_PATHS')
class ProjectResolutionOrderI18NTests(ResolutionOrderI18NTests):
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 99776e611a..99b4367f60 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -1203,8 +1203,8 @@ class Templates(unittest.TestCase):
'legacyi18n26': ('{% load i18n %}{% blocktrans with myextra_field as extra_field count number as counter %}singular {{ extra_field }}{% plural %}plural{% endblocktrans %}', {'number': 1, 'myextra_field': 'test'}, "singular test"),
# translation of singular form in russian (#14126)
- 'i18n27': ('{% load i18n %}{% blocktrans count counter=number %}1 result{% plural %}{{ counter }} results{% endblocktrans %}', {'number': 1, 'LANGUAGE_CODE': 'ru'}, u'1 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442'),
- 'legacyi18n27': ('{% load i18n %}{% blocktrans count number as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}', {'number': 1, 'LANGUAGE_CODE': 'ru'}, u'1 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442'),
+ 'i18n27': ('{% load i18n %}{% blocktrans count counter=number %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %}', {'number': 1, 'LANGUAGE_CODE': 'ru'}, u'1 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442'),
+ 'legacyi18n27': ('{% load i18n %}{% blocktrans count number as counter %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %}', {'number': 1, 'LANGUAGE_CODE': 'ru'}, u'1 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442'),
# simple translation of multiple variables
'i18n28': ('{% load i18n %}{% blocktrans with a=anton b=berta %}{{ a }} + {{ b }}{% endblocktrans %}', {'anton': 'α', 'berta': 'β'}, u'α + β'),