Changeset 1408
- Timestamp:
- 11/24/05 18:09:46 (3 years ago)
- Files:
-
- 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) (2 diffs)
- django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.po (modified) (18 diffs)
- django/branches/new-admin/django/contrib/admin/templates/registration/password_reset_form.html (modified) (1 diff)
- django/branches/new-admin/django/core/template/loader.py (modified) (1 diff)
- django/branches/new-admin/django/core/template/loaders/app_directories.py (modified) (1 diff)
- django/branches/new-admin/django/core/template/loaders/filesystem.py (modified) (1 diff)
- django/branches/new-admin/django/models/auth.py (modified) (1 diff)
- django/branches/new-admin/django/utils/translation.py (modified) (2 diffs)
- django/branches/new-admin/django/views/debug.py (modified) (9 diffs)
- django/branches/new-admin/django/views/registration/passwords.py (modified) (1 diff)
- django/branches/new-admin/django/views/static.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/new-admin/django/conf/locale/de/LC_MESSAGES/django.po
r1382 r1408 784 784 #: contrib/admin/templates/registration/password_reset_form.html:4 785 785 #: contrib/admin/templates/registration/password_reset_form.html:6 786 #: contrib/admin/templates/registration/password_reset_form.html:10 786 787 #: contrib/admin/templates/registration/password_reset_done.html:4 787 788 msgid "Password reset" … … 1286 1287 1287 1288 #: models/auth.py:37 1288 msgid "Use '[algo]$[salt]$[hexdigest] "1289 msgstr "Im Format '[algo]$[salt]$[hexdigest] "1289 msgid "Use '[algo]$[salt]$[hexdigest]'" 1290 msgstr "Im Format '[algo]$[salt]$[hexdigest]'" 1290 1291 1291 1292 #: models/auth.py:38 django/branches/new-admin/django/conf/locale/sk/LC_MESSAGES/django.po
r1382 r1408 17 17 "Content-Transfer-Encoding: 8bit\n" 18 18 19 #: contrib/redirects/models/redirects.py:7 20 msgid "redirect from" 21 msgstr "presmerovaný z" 22 23 #: contrib/redirects/models/redirects.py:8 24 msgid "" 25 "This should be an absolute path, excluding the domain name. Example: '/" 26 "events/search/'." 27 msgstr "" 28 "Tu by sa mala použiť absolútna cesta, bez domény. Napr.: '/events/search/'." 29 30 #: contrib/redirects/models/redirects.py:9 31 msgid "redirect to" 32 msgstr "presmerovaný na " 33 34 #: contrib/redirects/models/redirects.py:10 35 msgid "" 36 "This can be either an absolute path (as above) or a full URL starting with " 37 "'http://'." 38 msgstr "" 39 "Tu môže byť buď absolútna cesta (ako hore) alebo plné URL začínajúce s " 40 "'http://'." 41 42 #: contrib/redirects/models/redirects.py:12 43 msgid "redirect" 44 msgstr "presmerovanie" 45 46 #: contrib/redirects/models/redirects.py:13 47 msgid "redirects" 48 msgstr "presmerovania" 49 19 50 #: contrib/comments/models/comments.py:8 20 51 #: contrib/comments/models/comments.py:161 21 #, fuzzy22 52 msgid "object ID" 23 53 msgstr "Ukáž objekt id" … … 29 59 #: contrib/comments/models/comments.py:10 30 60 #: contrib/comments/models/comments.py:162 31 #, fuzzy32 61 msgid "comment" 33 msgstr " obsah"62 msgstr "komentár" 34 63 35 64 #: contrib/comments/models/comments.py:11 … … 80 109 81 110 #: contrib/comments/models/comments.py:26 contrib/admin/views/doc.py:274 82 #, fuzzy83 111 msgid "IP address" 84 112 msgstr "IP adresa" … … 101 129 102 130 #: contrib/comments/models/comments.py:32 103 #, fuzzy104 131 msgid "Comments" 105 132 msgstr "Komentáre" … … 107 134 #: contrib/comments/models/comments.py:85 108 135 #: contrib/comments/models/comments.py:204 109 #, fuzzy110 136 msgid "Content object" 111 137 msgstr "Obsah objectu" … … 127 153 128 154 #: contrib/comments/models/comments.py:163 129 #, fuzzy130 155 msgid "person's name" 131 156 msgstr "meno osoby" 132 157 133 158 #: contrib/comments/models/comments.py:166 134 #, fuzzy135 159 msgid "ip address" 136 160 msgstr "ip adresa" … … 141 165 142 166 #: contrib/comments/models/comments.py:172 143 #, fuzzy144 167 msgid "Free comment" 145 168 msgstr "Voľný komentár" 146 169 147 170 #: contrib/comments/models/comments.py:173 148 #, fuzzy149 171 msgid "Free comments" 150 172 msgstr "Voľné komentáre" … … 155 177 156 178 #: contrib/comments/models/comments.py:210 157 #, fuzzy158 179 msgid "score date" 159 msgstr " dátum konca platnosti"180 msgstr "údaje stavu" 160 181 161 182 #: contrib/comments/models/comments.py:213 … … 173 194 174 195 #: contrib/comments/models/comments.py:248 175 #, fuzzy176 196 msgid "flag date" 177 197 msgstr "návestie dátumu" 178 198 179 199 #: contrib/comments/models/comments.py:251 180 #, fuzzy181 200 msgid "User flag" 182 201 msgstr "Návestie uživateľa" 183 202 184 203 #: contrib/comments/models/comments.py:252 185 #, fuzzy186 204 msgid "User flags" 187 205 msgstr "Návestia užívateľa" … … 204 222 205 223 #: contrib/comments/models/comments.py:278 206 #, fuzzy207 224 msgid "deletion date" 208 225 msgstr "vymazaný dátum" … … 226 243 227 244 #: contrib/comments/views/karma.py:22 228 #, fuzzy229 245 msgid "Invalid comment ID" 230 246 msgstr "Neplatný komentár ID" … … 237 253 msgid "" 238 254 "This rating is required because you've entered at least one other rating." 239 msgstr " "255 msgstr "Toto hlasovanie je nevyhnutné, lebo súvisí s predchádzjúcou voľbou." 240 256 "Táto voľba je nevyhnutná nakoľko je pokračovaním vašej predchádzajúcej." 241 257 … … 295 311 "invalid" 296 312 msgstr "Formulár kometára má chybný výstupný parameter -- objectID bol chybný" 313 "Formulár komentára ma chybný 'cieľový' parameter -- the objekt ID bol " 314 "poškodený" 297 315 298 316 #: contrib/comments/views/comments.py:254 … … 533 551 534 552 #: contrib/admin/views/doc.py:266 535 #, fuzzy536 553 msgid "Date (without time)" 537 554 msgstr "Dátum (bez času)" 538 555 539 556 #: contrib/admin/views/doc.py:267 540 #, fuzzy541 557 msgid "Date (with time)" 542 558 msgstr "Dátum (a čas)" 543 559 544 560 #: contrib/admin/views/doc.py:268 545 #, fuzzy546 561 msgid "E-mail address" 547 562 msgstr "E-mailová adresa" … … 552 567 553 568 #: contrib/admin/views/doc.py:270 554 #, fuzzy555 569 msgid "Decimal number" 556 570 msgstr "Desiatkové číslo" … … 561 575 562 576 #: contrib/admin/views/doc.py:277 563 #, fuzzy564 577 msgid "Phone number" 565 578 msgstr "Číslo telefónu" … … 576 589 msgid "Time" 577 590 msgstr "Čas" 578 579 #: contrib/admin/views/doc.py:284 contrib/flatpages/models/flatpages.py:6580 msgid "URL"581 msgstr "URL"582 591 583 592 #: contrib/admin/views/doc.py:285 … … 1307 1316 #: models/auth.py:36 1308 1317 msgid "e-mail address" 1309 msgstr "e mailová adresa"1318 msgstr "e-mailová adresa" 1310 1319 1311 1320 #: models/auth.py:37 django/branches/new-admin/django/contrib/admin/templates/registration/password_reset_form.html
r1070 r1408 8 8 {% block content %} 9 9 10 <h1>{% trans "Password reset") }}</h1>10 <h1>{% trans "Password reset") %}</h1> 11 11 12 12 <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p> django/branches/new-admin/django/core/template/loader.py
r1375 r1408 60 60 for loader in template_source_loaders: 61 61 try: 62 source, display_name = loader(name, dirs)62 source, display_name = loader(name, dirs) 63 63 return (source, make_origin(display_name, loader, name, dirs)) 64 64 except TemplateDoesNotExist: django/branches/new-admin/django/core/template/loaders/app_directories.py
r1372 r1408 28 28 app_template_dirs = tuple(app_template_dirs) 29 29 30 def get_template_sources(template_name, template_dirs=None): 31 for template_dir in app_template_dirs: 32 yield os.path.join(template_dir, template_name) + TEMPLATE_FILE_EXTENSION 33 30 34 def load_template_source(template_name, template_dirs=None): 31 for template_dir in app_template_dirs: 32 filepath = os.path.join(template_dir, template_name) + TEMPLATE_FILE_EXTENSION 35 for filepath in get_template_sources(template_name, template_dirs): 33 36 try: 34 37 return (open(filepath).read(), filepath) django/branches/new-admin/django/core/template/loaders/filesystem.py
r913 r1408 5 5 import os 6 6 7 def load_template_source(template_name, template_dirs=None):7 def get_template_sources(template_name, template_dirs=None): 8 8 if not template_dirs: 9 9 template_dirs = TEMPLATE_DIRS 10 for template_dir in template_dirs: 11 yield os.path.join(template_dir, template_name) + TEMPLATE_FILE_EXTENSION 12 13 def load_template_source(template_name, template_dirs=None): 10 14 tried = [] 11 for template_dir in template_dirs: 12 filepath = os.path.join(template_dir, template_name) + TEMPLATE_FILE_EXTENSION 15 for filepath in get_template_sources(template_name, template_dirs): 13 16 try: 14 17 return (open(filepath).read(), filepath) django/branches/new-admin/django/models/auth.py
r1361 r1408 35 35 last_name = meta.CharField(_('last name'), maxlength=30, blank=True) 36 36 email = meta.EmailField(_('e-mail address'), blank=True) 37 password = meta.CharField(_('password'), maxlength=128, help_text=_("Use '[algo]$[salt]$[hexdigest] "))37 password = meta.CharField(_('password'), maxlength=128, help_text=_("Use '[algo]$[salt]$[hexdigest]'")) 38 38 is_staff = meta.BooleanField(_('staff status'), help_text=_("Designates whether the user can log into this admin site.")) 39 39 is_active = meta.BooleanField(_('active'), default=True) django/branches/new-admin/django/utils/translation.py
r1269 r1408 365 365 constant_re = re.compile(r"""_\(((?:".*?")|(?:'.*?'))\)""") 366 366 def templateize(src): 367 from django.core.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK368 367 """ 369 368 Turns a Django template into something that is understood by xgettext. It … … 371 370 function invocations. 372 371 """ 372 from django.core.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK 373 373 out = StringIO() 374 374 intrans = False django/branches/new-admin/django/views/debug.py
r1386 r1408 1 1 2 2 from django.conf import settings 3 from django.core.template import Template, Context 3 from django.core.template import Template, Context, TemplateDoesNotExist 4 4 from django.utils.html import escape 5 5 from django.utils.httpwrappers import HttpResponseServerError, HttpResponseNotFound … … 11 11 12 12 def linebreak_iter(template_source): 13 yield 0 13 14 p = template_source.find('\n') 14 15 while p >= 0: 15 yield p 16 yield p+1 16 17 p = template_source.find('\n', p+1) 17 18 yield len(template_source) + 1 … … 24 25 upto = 0 25 26 source_lines = [] 26 linebreaks = izip(count(0), linebreak_iter(template_source)) 27 linebreaks.next() # skip the nothing before initial line start 28 for num, next in linebreaks: 27 for num, next in enumerate(linebreak_iter(template_source)): 29 28 if start >= upto and end <= next: 30 29 line = num 31 30 before = escape(template_source[upto:start]) 32 31 during = escape(template_source[start:end]) 33 after = escape(template_source[end:next - 1])34 source_lines.append( (num, escape(template_source[upto:next - 1])) )32 after = escape(template_source[end:next]) 33 source_lines.append( (num, escape(template_source[upto:next])) ) 35 34 upto = next 36 35 total = len(source_lines) 37 36 38 top = max( 0, line - context_lines)37 top = max(1, line - context_lines) 39 38 bottom = min(total, line + 1 + context_lines) 40 39 … … 45 44 'during': during, 46 45 'after': after, 47 'top': top ,48 'bottom': bottom ,46 'top': top, 47 'bottom': bottom, 49 48 'total': total, 50 49 'line': line, … … 60 59 """ 61 60 template_info = None 61 template_does_not_exist = False 62 loader_debug_info = None 63 if issubclass(exc_type, TemplateDoesNotExist): 64 from django.core.template.loader import template_source_loaders 65 template_does_not_exist = True 66 loader_debug_info = [] 67 for loader in template_source_loaders: 68 try: 69 source_list_func = getattr(__import__(loader.__module__, '', '', ['get_template_sources']), 'get_template_sources') 70 # NOTE: This assumes exc_value is the name of the template that 71 # the loader attempted to load. 72 template_list = [{'name': t, 'exists': os.path.exists(t)} \ 73 for t in source_list_func(str(exc_value))] 74 except (ImportError, AttributeError): 75 template_list = [] 76 loader_debug_info.append({ 77 'loader': loader.__module__ + '.' + loader.__name__, 78 'templates': template_list, 79 }) 62 80 if settings.TEMPLATE_DEBUG and hasattr(exc_value, 'source'): 63 81 exc_type, exc_value, tb, template_info = get_template_exception_info(exc_type, exc_value, tb) … … 102 120 'settings': settings_dict, 103 121 'template_info': template_info, 122 'template_does_not_exist': template_does_not_exist, 123 'loader_debug_info': loader_debug_info, 104 124 }) 105 125 return HttpResponseServerError(t.render(c), mimetype='text/html') … … 189 209 #summary h2 { font-weight: normal; color: #666; } 190 210 #explanation { background:#eee; } 191 #template { background:#f6f6f6; } 211 #template, #template-not-exist { background:#f6f6f6; } 212 #template-not-exist ul { margin: 0 0 0 20px; } 192 213 #traceback { background:#eee; } 193 214 #requestinfo { background:#f6f6f6; padding-left:120px; } … … 274 295 </table> 275 296 </div> 297 {% if template_does_not_exist %} 298 <div id="template-not-exist"> 299 <h2>Template-loader postmortem</h2> 300 {% if loader_debug_info %} 301 <p>Django tried loading these templates, in this order:</p> 302 <ul> 303 {% for loader in loader_debug_info %} 304 <li>Using loader <code>{{ loader.loader }}</code>: 305 <ul>{% for t in loader.templates %}<li><code>{{ t.name }}</code> (File {% if t.exists %}exists{% else %}does not exist{% endif %})</li>{% endfor %}</ul> 306 </li> 307 {% endfor %} 308 </ul> 309 {% else %} 310 <p>Django couldn't find any templates because your <code>TEMPLATE_LOADERS</code> setting is empty!</p> 311 {% endif %} 312 </div> 313 {% endif %} 276 314 {% if template_info %} 277 315 <div id="template"> … … 286 324 {% else %} 287 325 <tr><th>{{ source_line.0 }}</th> 288 <td> {{ source_line.1 }}</td></tr>326 <td>{{ source_line.1 }}</td></tr> 289 327 {% endifequal %} 290 328 {% endfor %} django/branches/new-admin/django/views/registration/passwords.py
r876 r1408 42 42 'user': self.user_cache, 43 43 } 44 send_mail('Password reset on %s' % site_name, t.render( c), None, [self.user_cache.email])44 send_mail('Password reset on %s' % site_name, t.render(Context(c)), None, [self.user_cache.email]) 45 45 46 46 class PasswordChangeForm(formfields.Manipulator): django/branches/new-admin/django/views/static.py
r1361 r1408 35 35 # strip '.' amd '..' in path 36 36 continue 37 newpath = os.path.join(newpath, part) 37 newpath = os.path.join(newpath, part).replace('\\', '/') 38 38 if newpath and path != newpath: 39 39 return HttpResponseRedirect(newpath)
