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
This commit is contained in:
parent
de8565e1c4
commit
5f4bc1ff23
|
@ -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):
|
||||
|
|
Binary file not shown.
|
@ -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"
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
||||
|
|
|
@ -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'α + β'),
|
||||
|
|
Loading…
Reference in New Issue