Changeset 1382
- Timestamp:
- 11/23/05 17:23:20 (3 years ago)
- Files:
-
- django/branches/new-admin/django/bin/make-messages.py (modified) (1 diff)
- django/branches/new-admin/django/conf/locale/de/LC_MESSAGES/django.mo (modified) (previous)
- django/branches/new-admin/django/conf/locale/de/LC_MESSAGES/django.po (modified) (1 diff)
- django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.mo (modified) (previous)
- django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.po (modified) (3 diffs)
- django/branches/new-admin/django/contrib/admin/templates/admin/index.html (modified) (1 diff)
- django/branches/new-admin/django/contrib/comments/templatetags/comments.py (modified) (1 diff)
- django/branches/new-admin/django/core/urlresolvers.py (modified) (2 diffs)
- django/branches/new-admin/django/utils/timesince.py (modified) (2 diffs)
- django/branches/new-admin/django/views/debug.py (modified) (5 diffs)
- django/branches/new-admin/tests/othertests/templates.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/new-admin/django/bin/make-messages.py
r1125 r1382 15 15 localedir = os.path.abspath('locale') 16 16 else: 17 print "this script should be run from the django svn tree or your project or app tree" 17 print "This script should be run from the django svn tree or your project or app tree." 18 print "If you did indeed run it from the svn checkout or your project or application," 19 print "maybe you are just missing the conf/locale (in the django tree) or locale (for project" 20 print "and application) directory?" 21 print "make-messages.py doesn't create it automatically, you have to create it by hand if" 22 print "you want to enable i18n for your project or application." 18 23 sys.exit(1) 19 24 django/branches/new-admin/django/conf/locale/de/LC_MESSAGES/django.po
r1365 r1382 1172 1172 msgid "hour" 1173 1173 msgid_plural "hours" 1174 msgstr[0] " "1175 msgstr[1] " "1174 msgstr[0] "Stunde" 1175 msgstr[1] "Stunden" 1176 1176 1177 1177 #: utils/timesince.py:16 django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.po
r1362 r1382 1192 1192 1193 1193 #: utils/timesince.py:14 1194 #, fuzzy1195 1194 msgid "day" 1196 1195 msgid_plural "days" … … 1201 1200 msgid "hour" 1202 1201 msgid_plural "hours" 1203 msgstr[0] " "1204 msgstr[1] " "1202 msgstr[0] "hodina" 1203 msgstr[1] "hodín" 1205 1204 1206 1205 #: utils/timesince.py:16 1207 #, fuzzy1208 1206 msgid "minute" 1209 1207 msgid_plural "minutes" 1210 msgstr[0] " web"1211 msgstr[1] " web"1208 msgstr[0] "minúta" 1209 msgstr[1] "minút" 1212 1210 1213 1211 #: models/core.py:7 … … 1380 1378 1381 1379 #: conf/global_settings.py:40 1382 #, fuzzy1383 1380 msgid "Danish" 1384 msgstr " Španielsky"1381 msgstr "Dánsky" 1385 1382 1386 1383 #: conf/global_settings.py:41 django/branches/new-admin/django/contrib/admin/templates/admin/index.html
r1154 r1382 23 23 <th>{{ model.name }}</th> 24 24 {% endif %} 25 25 {{}} 26 26 {% if model.perms.add %} 27 27 <td class="x50"><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td> django/branches/new-admin/django/contrib/comments/templatetags/comments.py
r1268 r1382 45 45 46 46 FREE_COMMENT_FORM = ''' 47 {% load i18n %} 47 48 {% if display_form %} 48 49 <form action="/comments/postfree/" method="post"> django/branches/new-admin/django/core/urlresolvers.py
r719 r1382 8 8 """ 9 9 10 from django.core.exceptions import Http404, ViewDoesNotExist10 from django.core.exceptions import Http404, ImproperlyConfigured, ViewDoesNotExist 11 11 import re 12 12 … … 75 75 return self._urlconf_module 76 76 except AttributeError: 77 self._urlconf_module = __import__(self.urlconf_name, '', '', ['']) 77 try: 78 self._urlconf_module = __import__(self.urlconf_name, '', '', ['']) 79 except ValueError, e: 80 # Invalid urlconf_name, such as "foo.bar." (note trailing period) 81 raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e) 78 82 return self._urlconf_module 79 83 urlconf_module = property(_get_urlconf_module) django/branches/new-admin/django/utils/timesince.py
r1361 r1382 1 import datetime, time1 import datetime, math, time 2 2 from django.utils.tzinfo import LocalTimezone 3 3 from django.utils.translation import ngettext … … 31 31 if count != 0: 32 32 break 33 if count < 0: 34 return '%d milliseconds' % math.floor(delta.microseconds / 1000) 33 35 s = '%d %s' % (count, name(count)) 34 36 if i + 1 < len(chunks): django/branches/new-admin/django/views/debug.py
r1373 r1382 1 1 2 from django.conf import settings 2 3 from django.core.template import Template, Context … … 173 174 table td.code { width:100%; } 174 175 table td.code div { overflow:hidden; } 176 table.source th { color:#666; } 177 table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } 175 178 ul.traceback { list-style-type:none; } 176 179 ul.traceback li.frame { margin-bottom:1em; } … … 185 188 #summary h2 { font-weight: normal; color: #666; } 186 189 #explanation { background:#eee; } 190 #template { background:#f6f6f6; } 187 191 #traceback { background:#eee; } 188 192 #requestinfo { background:#f6f6f6; padding-left:120px; } … … 190 194 #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; } 191 195 #requestinfo h3 { margin-bottom:-1em; } 192 table.source td { font-family: monospace; white-space: pre; }193 span.specific { background:#ffcab7; }194 196 .error { background: #ffc; } 197 .specific { color:#cc3300; font-weight:bold; } 195 198 </style> 196 199 <script type="text/javascript"> … … 272 275 {% if template_info %} 273 276 <div id="template"> 274 <h2>Template </h2>275 In template {{ template_info.name }}, error at line {{ template_info.line }}276 < div>{{ template_info.message|escape }}</div>277 <h2>Template error</h2> 278 <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p> 279 <h3>{{ template_info.message|escape }}</h3> 277 280 <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> 278 281 {% for source_line in template_info.source_lines %} 279 282 {% ifequal source_line.0 template_info.line %} 280 <tr class="error"><t d>{{ source_line.0 }}</td>283 <tr class="error"><th>{{ source_line.0 }}</th> 281 284 <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td></tr> 282 285 {% else %} 283 <tr><t d>{{ source_line.0 }}</td>286 <tr><th>{{ source_line.0 }}</th> 284 287 <td> {{ source_line.1 }}</td></tr> 285 288 {% endifequal %} django/branches/new-admin/tests/othertests/templates.py
r1361 r1382 100 100 'basic-syntax29': ('{{ var|removetags:"b i"|upper|lower }}', {"var": "<b><i>Yes</i></b>"}, "yes"), 101 101 102 #Escaped string as argument 102 #Escaped string as argument 103 103 'basic-syntax30': (r"""{{ var|default_if_none:" endquote\" hah" }}""", {"var": None}, ' endquote" hah'), 104 104 105 105 106 106 ### IF TAG ################################################################ … … 233 233 Hello, 234 234 boys. 235 How 236 are 235 How 236 are 237 237 you 238 gentlemen. 239 """, 240 {}, 238 gentlemen. 239 """, 240 {}, 241 241 """ 242 242 Hello, 243 243 boys. 244 How 245 are 244 How 245 are 246 246 you 247 gentlemen. 247 gentlemen. 248 248 """ ), 249 249 # simple translation of a string delimited by '
