Author: jezdez
Date: 2011-01-21 13:36:26 -0600 (Fri, 21 Jan 2011)
New Revision: 15273

Modified:
   django/trunk/django/contrib/admin/sites.py
   django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo
   django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po
   django/trunk/tests/regressiontests/i18n/tests.py
   django/trunk/tests/regressiontests/templates/tests.py
Log:
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.

Modified: django/trunk/django/contrib/admin/sites.py
===================================================================
--- django/trunk/django/contrib/admin/sites.py  2011-01-21 19:35:41 UTC (rev 
15272)
+++ django/trunk/django/contrib/admin/sites.py  2011-01-21 19:36:26 UTC (rev 
15273)
@@ -284,7 +284,7 @@
             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):

Modified: 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo
===================================================================
--- 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo   
    2011-01-21 19:35:41 UTC (rev 15272)
+++ 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.mo   
    2011-01-21 19:36:26 UTC (rev 15273)
@@ -1,11 +1,11 @@
-Þ  •            D       l       ˆ         ‰       “       ¢       ¾   _   Ç    
   '       A       E       ^                                Date/time month 
name May search %d result %d results verb May Project-Id-Version: PACKAGE 
VERSION
+Þ  •            D       l       ˆ       ‰       Ž               ¹   _   Â      
 "       6       :       S                                Time month name May 
search %d result %d results verb May Project-Id-Version: django tests
 Report-Msgid-Bugs-To: 
 POT-Creation-Date: 2010-02-14 17:33+0100
-PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE
-Last-Translator: FULL NAME <EMAIL@ADDRESS>
-Language-Team: LANGUAGE <l...@li.org>
+PO-Revision-Date: 2011-01-16 17:14+0100
+Last-Translator: Jannis Leidel <jan...@leidel.info>
+Language-Team: de <d...@li.org>
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 Plural-Forms: nplurals=2; plural=(n != 1)
- Datum/Zeit (LOCALE_PATHS) Mai %d Resultat %d Resultate Kann 
\ No newline at end of file
+ Time (LOCALE_PATHS) Mai %d Resultat %d Resultate Kann 
\ No newline at end of file

Modified: 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po
===================================================================
--- 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po   
    2011-01-21 19:35:41 UTC (rev 15272)
+++ 
django/trunk/tests/regressiontests/i18n/other/locale/de/LC_MESSAGES/django.po   
    2011-01-21 19:36:26 UTC (rev 15273)
@@ -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 <l...@li.org>\n"
+"PO-Revision-Date: 2011-01-16 17:14+0100\n"
+"Last-Translator: Jannis Leidel <jan...@leidel.info>\n"
+"Language-Team: de <d...@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_plural "%d results"
 msgstr[0] "%d Resultat"
 msgstr[1] "%d Resultate"
+

Modified: django/trunk/tests/regressiontests/i18n/tests.py
===================================================================
--- django/trunk/tests/regressiontests/i18n/tests.py    2011-01-21 19:35:41 UTC 
(rev 15272)
+++ django/trunk/tests/regressiontests/i18n/tests.py    2011-01-21 19:36:26 UTC 
(rev 15273)
@@ -689,7 +689,7 @@
         super(LocalePathsResolutionOrderI18NTests, self).tearDown()
 
     def test_locale_paths_translation(self):
-        self.assertUgettext('Date/time', 'LOCALE_PATHS')
+        self.assertUgettext('Time', 'LOCALE_PATHS')
 
 class ProjectResolutionOrderI18NTests(ResolutionOrderI18NTests):
 

Modified: django/trunk/tests/regressiontests/templates/tests.py
===================================================================
--- django/trunk/tests/regressiontests/templates/tests.py       2011-01-21 
19:35:41 UTC (rev 15272)
+++ django/trunk/tests/regressiontests/templates/tests.py       2011-01-21 
19:36:26 UTC (rev 15273)
@@ -1203,8 +1203,8 @@
             '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'α + β'),

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to