Django

Code

Changeset 1061

Show
Ignore:
Timestamp:
11/03/05 05:25:18 (3 years ago)
Author:
hugo
Message:

i18n: implemented the proposed syntax change to {% trans %} and {% blocktrans %}

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/i18n/django/bin/make-messages.py

    r907 r1061  
    55import sys 
    66import getopt 
     7 
     8from django.utils.translation import templateize 
    79 
    810localedir = None 
     
    4446elif all: 
    4547    languages = [el for el in os.listdir(localedir) if not el.startswith('.')] 
    46  
    47 dot_re = re.compile('\S') 
    48 def blank(src): 
    49     return dot_re.sub('p', src) 
    50  
    51 def templateize(src): 
    52     o = [] 
    53     going = 1 
    54     while going: 
    55         start = src.find('{') 
    56         if start >= 0 and src[start+1] in ('{', '%'): 
    57             o.append(blank(src[:start])) 
    58             end = src.find(src[start+1] == '{' and '}}' or '%}', start) 
    59             if end >= 0: 
    60                 o.append(src[start:end+2]) 
    61                 src = src[end+2:] 
    62             else: 
    63                 o.append(blank(src[start:])) 
    64                 going = 0 
    65         else: 
    66             o.append(blank(src)) 
    67             going = 0 
    68     return ''.join(o) 
    6948 
    7049for lang in languages: 
  • django/branches/i18n/django/conf/locale/de/LC_MESSAGES/django.po

    r1001 r1061  
    88"Project-Id-Version: Django 1.0\n" 
    99"Report-Msgid-Bugs-To: \n" 
    10 "POT-Creation-Date: 2005-10-24 00:03+0200\n" 
     10"POT-Creation-Date: 2005-11-03 12:21+0100\n" 
    1111"PO-Revision-Date: 2005-10-08 00:03+0200\n" 
    1212"Last-Translator: Georg Bauer <gb@bofh.ms>\n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: contrib/admin/templates/admin/object_history.html:4 
    18 #: contrib/admin/templates/admin/base.html:28 
    19 #: contrib/admin/templates/registration/password_change_done.html:3 
    20 #: contrib/admin/templates/registration/password_reset_form.html:3 
    21 #: contrib/admin/templates/registration/logged_out.html:3 
    22 #: contrib/admin/templates/registration/password_reset_done.html:3 
    23 #: contrib/admin/templates/registration/password_change_form.html:3 
     17#: contrib/admin/templates/admin/object_history.html:5 
     18#: contrib/admin/templates/admin/500.html:4 
     19#: contrib/admin/templates/admin/base.html:29 
     20#: contrib/admin/templates/registration/password_change_done.html:4 
     21#: contrib/admin/templates/registration/password_reset_form.html:4 
     22#: contrib/admin/templates/registration/logged_out.html:4 
     23#: contrib/admin/templates/registration/password_reset_done.html:4 
     24#: contrib/admin/templates/registration/password_change_form.html:4 
    2425msgid "Home" 
    2526msgstr "Start" 
    2627 
    27 #: contrib/admin/templates/admin/object_history.html:4 
     28#: contrib/admin/templates/admin/object_history.html:5 
    2829msgid "History" 
    2930msgstr "Geschichte" 
    3031 
    31 #: contrib/admin/templates/admin/object_history.html:17 
     32#: contrib/admin/templates/admin/object_history.html:18 
    3233msgid "Date/time" 
    3334msgstr "Datum/Zeit" 
    3435 
    35 #: contrib/admin/templates/admin/object_history.html:18 models/auth.py:47 
     36#: contrib/admin/templates/admin/object_history.html:19 models/auth.py:47 
    3637msgid "User" 
    3738msgstr "Benutzer" 
    3839 
    39 #: contrib/admin/templates/admin/object_history.html:19 
     40#: contrib/admin/templates/admin/object_history.html:20 
    4041msgid "Action" 
    4142msgstr "Aktion" 
    4243 
    43 #: contrib/admin/templates/admin/object_history.html:25 
     44#: contrib/admin/templates/admin/object_history.html:26 
    4445msgid "DATE_WITH_TIME_FULL" 
    4546msgstr "j. N Y, H:i" 
    4647 
    47 #: contrib/admin/templates/admin/object_history.html:35 
     48#: contrib/admin/templates/admin/object_history.html:36 
    4849msgid "" 
    4950"This object doesn't have a change history. It probably wasn't added via this " 
     
    5354"�iese Verwaltungsseiten angelegt." 
    5455 
    55 #: contrib/admin/templates/admin/base_site.html:3 
     56#: contrib/admin/templates/admin/base_site.html:4 
    5657msgid "Django site admin" 
    5758msgstr "Django Systemverwaltung" 
    5859 
    59 #: contrib/admin/templates/admin/base_site.html:6 
     60#: contrib/admin/templates/admin/base_site.html:7 
    6061msgid "Django administration" 
    6162msgstr "Django Verwaltung" 
    6263 
    63 #: contrib/admin/templates/admin/500.html:5 
     64#: contrib/admin/templates/admin/500.html:4 
     65msgid "Server error" 
     66msgstr "Serverfehler" 
     67 
     68#: contrib/admin/templates/admin/500.html:6 
    6469msgid "Server error (500)" 
    6570msgstr "Serverfehler (500)" 
    6671 
    67 #: contrib/admin/templates/admin/500.html:8 
     72#: contrib/admin/templates/admin/500.html:9 
    6873msgid "Server Error <em>(500)</em>" 
    6974msgstr "Serverfehler <em>(500)</em>" 
    7075 
    71 #: contrib/admin/templates/admin/500.html:9 
     76#: contrib/admin/templates/admin/500.html:10 
    7277msgid "" 
    7378"There's been an error. It's been reported to the site administrators via e-" 
     
    7883"Verst�nis." 
    7984 
    80 #: contrib/admin/templates/admin/404.html:3 
    81 #: contrib/admin/templates/admin/404.html:7 
     85#: contrib/admin/templates/admin/404.html:4 
     86#: contrib/admin/templates/admin/404.html:8 
    8287msgid "Page not found" 
    8388msgstr "Seite nicht gefunden" 
    8489 
    85 #: contrib/admin/templates/admin/404.html:9 
     90#: contrib/admin/templates/admin/404.html:10 
    8691msgid "We're sorry, but the requested page could not be found." 
    8792msgstr "" 
    8893"Es tut uns leid, aber die angeforderte Seite kann nicht gefunden werden." 
    8994 
    90 #: contrib/admin/templates/admin/index.html:26 
     95#: contrib/admin/templates/admin/index.html:27 
    9196msgid "Add" 
    9297msgstr "Zuf� 
    93 #: contrib/admin/templates/admin/index.html:32 
     98#: contrib/admin/templates/admin/index.html:33 
    9499msgid "Change" 
    95100msgstr "�dern" 
    96101 
    97 #: contrib/admin/templates/admin/index.html:42 
     102#: contrib/admin/templates/admin/index.html:43 
    98103msgid "You don't have permission to edit anything." 
    99104msgstr "Sie haben keine Berechtigung irgendwas zu �ern." 
    100105 
    101 #: contrib/admin/templates/admin/index.html:50 
     106#: contrib/admin/templates/admin/index.html:51 
    102107msgid "Recent Actions" 
    103108msgstr "K�he Aktionen" 
    104109 
    105 #: contrib/admin/templates/admin/index.html:51 
     110#: contrib/admin/templates/admin/index.html:52 
    106111msgid "My Actions" 
    107112msgstr "Meine Aktionen" 
    108113 
    109 #: contrib/admin/templates/admin/index.html:55 
     114#: contrib/admin/templates/admin/index.html:56 
    110115msgid "None available" 
    111116msgstr "Keine vorhanden" 
    112117 
    113 #: contrib/admin/templates/admin/login.html:14 
     118#: contrib/admin/templates/admin/login.html:15 
    114119msgid "Username:" 
    115120msgstr "Benutzername:" 
    116121 
    117 #: contrib/admin/templates/admin/login.html:17 
     122#: contrib/admin/templates/admin/login.html:18 
    118123msgid "Password:" 
    119124msgstr "Passwort:" 
    120125 
    121 #: contrib/admin/templates/admin/login.html:19 
     126#: contrib/admin/templates/admin/login.html:20 
    122127msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?" 
    123128msgstr "Haben Sie <a href=\"/password_reset/\">ihr Passwort vergessen</a>?" 
    124129 
    125 #: contrib/admin/templates/admin/login.html:23 
     130#: contrib/admin/templates/admin/login.html:24 
    126131msgid "Log in" 
    127132msgstr "Anmelden" 
    128133 
    129 #: contrib/admin/templates/admin/base.html:22 
     134#: contrib/admin/templates/admin/base.html:23 
    130135msgid "Welcome," 
    131136msgstr "Willkommen," 
    132137 
    133 #: contrib/admin/templates/admin/base.html:22 
     138#: contrib/admin/templates/admin/base.html:23 
    134139msgid "Change password" 
    135140msgstr "Passwort �ern" 
    136141 
    137 #: contrib/admin/templates/admin/base.html:22 
     142#: contrib/admin/templates/admin/base.html:23 
    138143msgid "Log out" 
    139144msgstr "Abmelden" 
    140145 
    141 #: contrib/admin/templates/admin/delete_confirmation.html:6 
    142 #, python-format 
    143 msgid "" 
    144 "Deleting the %(object_name)s '%(object)s' would result in deleting related " 
     146#: contrib/admin/templates/admin/delete_confirmation.html:7 
     147#, python-format 
     148msgid "" 
     149"Deleting the %(object_name)s '%(object)s' would result in deleting related " 
    145150"objects, but your account doesn't have permission to delete the following " 
    146151"types of objects:" 
     
    150155"folgenden abh�igen Daten zu l�en:" 
    151156 
    152 #: contrib/admin/templates/admin/delete_confirmation.html:13 
     157#: contrib/admin/templates/admin/delete_confirmation.html:14 
    153158#, python-format 
    154159msgid "" 
     
    159164"werden zus�lich die folgenden abh�igen Daten mit gel�t:" 
    160165 
    161 #: contrib/admin/templates/admin/delete_confirmation.html:17 
     166#: contrib/admin/templates/admin/delete_confirmation.html:18 
    162167msgid "Yes, I'm sure" 
    163168msgstr "Ja, ich bin sicher" 
    164169 
    165 #: contrib/admin/templates/registration/password_change_done.html:3 
    166 #: contrib/admin/templates/registration/password_change_form.html:3 
    167 #: contrib/admin/templates/registration/password_change_form.html:5 
    168 #: contrib/admin/templates/registration/password_change_form.html:9 
     170#: contrib/admin/templates/registration/password_change_done.html:4 
     171#: contrib/admin/templates/registration/password_change_form.html:4 
     172#: contrib/admin/templates/registration/password_change_form.html:6 
     173#: contrib/admin/templates/registration/password_change_form.html:10 
    169174msgid "Password change" 
    170175msgstr "Kennwort �ern" 
    171176 
    172 #: contrib/admin/templates/registration/password_change_done.html:5 
    173 #: contrib/admin/templates/registration/password_change_done.html:9 
     177#: contrib/admin/templates/registration/password_change_done.html:6 
     178#: contrib/admin/templates/registration/password_change_done.html:10 
    174179msgid "Password change successful" 
    175180msgstr "Erfolgreiche Kennwort�erung" 
    176181 
    177 #: contrib/admin/templates/registration/password_change_done.html:11 
     182#: contrib/admin/templates/registration/password_change_done.html:12 
    178183msgid "Your password was changed." 
    179184msgstr "Ihr Kennwort wurde ge�ert." 
    180185 
    181 #: contrib/admin/templates/registration/password_reset_form.html:3 
    182 #: contrib/admin/templates/registration/password_reset_form.html:5 
    183 #: contrib/admin/templates/registration/password_reset_form.html:9 
    184 #: contrib/admin/templates/registration/password_reset_done.html:3 
     186#: contrib/admin/templates/registration/password_reset_form.html:4 
     187#: contrib/admin/templates/registration/password_reset_form.html:6 
     188#: contrib/admin/templates/registration/password_reset_done.html:4 
    185189msgid "Password reset" 
    186190msgstr "Kennwort zur�zen" 
    187191 
    188 #: contrib/admin/templates/registration/password_reset_form.html:11 
     192#: contrib/admin/templates/registration/password_reset_form.html:12 
    189193msgid "" 
    190194"Forgotten your password? Enter your e-mail address below, and we'll reset " 
     
    195199"Sie raus." 
    196200 
    197 #: contrib/admin/templates/registration/password_reset_form.html:15 
     201#: contrib/admin/templates/registration/password_reset_form.html:16 
    198202msgid "E-mail address:" 
    199203msgstr "eMail-Adresse:" 
    200204 
    201 #: contrib/admin/templates/registration/password_reset_form.html:15 
     205#: contrib/admin/templates/registration/password_reset_form.html:16 
    202206msgid "Reset my password" 
    203207msgstr "Mein Kennwort zur�zen" 
    204208 
    205 #: contrib/admin/templates/registration/logged_out.html:7 
     209#: contrib/admin/templates/registration/logged_out.html:8 
    206210msgid "Thanks for spending some quality time with the Web site today." 
    207211msgstr "Danke, dass Sie eine Weile bei uns waren." 
    208212 
    209 #: contrib/admin/templates/registration/logged_out.html:9 
     213#: contrib/admin/templates/registration/logged_out.html:10 
    210214msgid "Log in again" 
    211215msgstr "Neu anmelden" 
    212216 
    213 #: contrib/admin/templates/registration/password_reset_done.html:5 
    214 #: contrib/admin/templates/registration/password_reset_done.html:9 
     217#: contrib/admin/templates/registration/password_reset_done.html:6 
     218#: contrib/admin/templates/registration/password_reset_done.html:10 
    215219msgid "Password reset successful" 
    216220msgstr "Erfolgreich Kennwort zur�etzt" 
    217221 
    218 #: contrib/admin/templates/registration/password_reset_done.html:11 
     222#: contrib/admin/templates/registration/password_reset_done.html:12 
    219223msgid "" 
    220224"We've e-mailed a new password to the e-mail address you submitted. You " 
     
    224228"Sie uns gegeben haben. Es sollte in K�nkommen." 
    225229 
    226 #: contrib/admin/templates/registration/password_change_form.html:11 
     230#: contrib/admin/templates/registration/password_change_form.html:12 
    227231msgid "" 
    228232"Please enter your old password, for security's sake, and then enter your new " 
     
    233237"neue Kennwort ein." 
    234238 
    235 #: contrib/admin/templates/registration/password_change_form.html:16 
     239#: contrib/admin/templates/registration/password_change_form.html:17 
    236240msgid "Old password:" 
    237241msgstr "altes Kennwort:" 
    238242 
    239 #: contrib/admin/templates/registration/password_change_form.html:18 
     243#: contrib/admin/templates/registration/password_change_form.html:19 
    240244msgid "New password:" 
    241245msgstr "neues Kennwort:" 
    242246 
    243 #: contrib/admin/templates/registration/password_change_form.html:20 
     247#: contrib/admin/templates/registration/password_change_form.html:21 
    244248msgid "Confirm password:" 
    245249msgstr "Kennwortwiederholung:" 
    246250 
    247 #: contrib/admin/templates/registration/password_change_form.html:22 
     251#: contrib/admin/templates/registration/password_change_form.html:23 
    248252msgid "Change my password" 
    249253msgstr "Mein Kennwort �ern" 
    250254 
    251 #: contrib/admin/templates/registration/password_reset_email.html:1 
     255#: contrib/admin/templates/registration/password_reset_email.html:2 
    252256msgid "You're receiving this e-mail because you requested a password reset" 
    253257msgstr "Sie erhalten diese Mail, weil Sie ein neues Kennwort" 
    254258 
    255 #: contrib/admin/templates/registration/password_reset_email.html:2 
     259#: contrib/admin/templates/registration/password_reset_email.html:3 
    256260#, python-format 
    257261msgid "for your user account at %(site_name)s" 
    258262msgstr "f�en Benutzer bei %(site_name)s angefordert haben." 
    259263 
    260 #: contrib/admin/templates/registration/password_reset_email.html:4 
     264#: contrib/admin/templates/registration/password_reset_email.html:5 
    261265#, python-format 
    262266msgid "Your new password is: %(new_password)s" 
    263267msgstr "Ihr neues Kennwort ist: %(new_password)s" 
    264268 
    265 #: contrib/admin/templates/registration/password_reset_email.html:6 
     269#: contrib/admin/templates/registration/password_reset_email.html:7 
    266270msgid "Feel free to change this password by going to this page:" 
    267271msgstr "Sie k�n das Kennwort auf folgender Seite �ern:" 
    268272 
    269 #: contrib/admin/templates/registration/password_reset_email.html:10 
     273#: contrib/admin/templates/registration/password_reset_email.html:11 
    270274msgid "Your username, in case you've forgotten:" 
    271275msgstr "Ihr Benutzername, falls Sie ihn vergessen haben:" 
    272276 
    273 #: contrib/admin/templates/registration/password_reset_email.html:12 
     277#: contrib/admin/templates/registration/password_reset_email.html:13 
    274278msgid "Thanks for using our site!" 
    275279msgstr "Vielen Dank, das Sie unsere Seiten benutzen!" 
    276280 
    277 #: contrib/admin/templates/registration/password_reset_email.html:14 
     281#: contrib/admin/templates/registration/password_reset_email.html:15 
    278282#, python-format 
    279283msgid "The %(site_name)s team" 
     
    653657 
    654658#: conf/global_settings.py:37 
     659msgid "Czech" 
     660msgstr "Tschechisch" 
     661 
     662#: conf/global_settings.py:38 
    655663msgid "German" 
    656664msgstr "Deutsch" 
    657665 
    658 #: conf/global_settings.py:38 
     666#: conf/global_settings.py:39 
    659667msgid "English" 
    660668msgstr "Englisch" 
    661669 
    662 #: conf/global_settings.py:39 
     670#: conf/global_settings.py:40 
    663671msgid "Spanish" 
    664672msgstr "Spanisch" 
    665673 
    666 #: conf/global_settings.py:40 
     674#: conf/global_settings.py:41 
    667675msgid "French" 
    668676msgstr "Franz�ch" 
    669677 
    670 #: conf/global_settings.py:41 
     678#: conf/global_settings.py:42 
    671679msgid "Galician" 
    672680msgstr "Galicisch" 
    673681 
    674 #: conf/global_settings.py:42 
     682#: conf/global_settings.py:43 
    675683msgid "Italian" 
    676684msgstr "Italienisch" 
    677685 
    678 #: conf/global_settings.py:43 
     686#: conf/global_settings.py:44 
    679687msgid "Brazilian" 
    680688msgstr "Brasilianisch" 
    681689 
    682 #: conf/global_settings.py:44 
     690#: conf/global_settings.py:45 
    683691msgid "Russian" 
    684692msgstr "Russisch" 
    685693 
    686 #: conf/global_settings.py:45 
    687 msgid "Serbic
     694#: conf/global_settings.py:46 
     695msgid "Serbian
    688696msgstr "Serbisch" 
    689697 
    690 #: conf/global_settings.py:46 
    691 msgid "Czech
    692 msgstr "Tschechisch
     698#: conf/global_settings.py:47 
     699msgid "Traditional Chinese
     700msgstr "
    693701 
    694702#: core/validators.py:58 
  • django/branches/i18n/django/contrib/admin/templates/admin/404.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block title %}{{ _('Page not found') }}{% endblock %} 
     4{% block title %}{% trans 'Page not found' %}{% endblock %} 
    45 
    56{% block content %} 
    67 
    7 <h2>{{ _('Page not found') }}</h2> 
     8<h2>{% trans 'Page not found' %}</h2> 
    89 
    9 <p>{{ _("We're sorry, but the requested page could not be found.") }}</p> 
     10<p>{% trans "We're sorry, but the requested page could not be found." %}</p> 
    1011 
    1112{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/admin/500.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">Home</a> &rsaquo; Server error</div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans "Home" %}</a> &rsaquo; {% trans "Server error" %}</div>{% endblock %} 
    45 
    5 {% block title %}{{ _('Server error (500)') }}{% endblock %} 
     6{% block title %}{% trans 'Server error (500)' %}{% endblock %} 
    67 
    78{% block content %} 
    8 <h1>{{ _('Server Error <em>(500)</em>') }}</h1> 
    9 <p>{{ _("There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience.") }}</p> 
     9<h1>{% trans 'Server Error <em>(500)</em>' %}</h1> 
     10<p>{% trans "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." %}</p> 
    1011 
    1112{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/admin/base.html

    r956 r1061  
    77{% block extrahead %}{% endblock %} 
    88</head> 
     9{% load i18n %} 
    910 
    1011<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"> 
     
    2021        </div> 
    2122        {% if not user.is_anonymous %} 
    22         <div id="user-tools">{{ _('Welcome,') }} <strong>{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}</strong>. <br />{% block userlinks %}<a href="/admin/password_change/">{{ _('Change password') }}</a> / <a href="/admin/logout/">{{ _('Log out') }}</a>{% endblock %}</div> 
     23        <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}</strong>. <br />{% block userlinks %}<a href="/admin/password_change/">{% trans 'Change password' %}</a> / <a href="/admin/logout/">{% trans 'Log out' %}</a>{% endblock %}</div> 
    2324        {% endif %} 
    2425        {% block nav-global %}{% endblock %} 
     
    2627    </div> 
    2728    <!-- END Header --> 
    28     {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{{ _('Home') }}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %} 
     29    {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %} 
    2930    {% endif %} 
    3031 
  • django/branches/i18n/django/contrib/admin/templates/admin/base_site.html

    r956 r1061  
    11{% extends "admin/base" %} 
     2{% load i18n %} 
    23 
    3 {% block title %}{{ title }} | {{ _('Django site admin') }}{% endblock %} 
     4{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %} 
    45 
    56{% block branding %} 
    6 <h1 id="site-name">{{ _('Django administration') }}</h1> 
     7<h1 id="site-name">{% trans 'Django administration' %}</h1> 
    78<h2 id="site-url"><a href="http://www.example.com/">example.com</a></h2> 
    89{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/admin/delete_confirmation.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    34{% block content %} 
    45 
    56{% if perms_lacking %} 
    6     <p>{{ _("Deleting the %(object_name)s  '%(object)s' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:") }}</p> 
     7    <p>{% blocktrans %}Deleting the {{ object_name }} '{{ object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p> 
    78    <ul> 
    89    {% for obj in perms_lacking %} 
     
    1112    </ul> 
    1213{% else %} 
    13     <p>{{ _('Are you sure you want to delete the %(object_name)s "%(object)s"? All of the following related items will be deleted:') }}</p> 
     14    <p>{% blocktrans %}Are you sure you want to delete the {{ object_name }} "{{ object }}"? All of the following related items will be deleted:{% endblocktrans %}</p> 
    1415    <ul>{{ deleted_objects|unordered_list }}</ul> 
    1516    <form action="" method="post"> 
    1617    <input type="hidden" name="post" value="yes" /> 
    17     <input type="submit" value="{{ _("Yes, I'm sure") }}" /> 
     18    <input type="submit" value="{% trans "Yes, I'm sure" %}" /> 
    1819    </form> 
    1920{% endif %} 
  • django/branches/i18n/django/contrib/admin/templates/admin/index.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    34{% block coltype %}colMS{% endblock %} 
     
    2425 
    2526            {% if model.perms.add %} 
    26                 <td class="x50"><a href="{{ model.admin_url }}add/" class="addlink">{{ _('Add') }}</a></td> 
     27                <td class="x50"><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td> 
    2728            {% else %} 
    2829                <td class="x50">&nbsp;</td> 
     
    3031 
    3132            {% if model.perms.change %} 
    32                 <td class="x75"><a href="{{ model.admin_url }}" class="changelink">{{ _('Change') }}</a></td> 
     33                <td class="x75"><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td> 
    3334            {% else %} 
    3435                <td class="x75">&nbsp;</td> 
     
    4041    {% endfor %} 
    4142{% else %} 
    42     <p>{{ _("You don't have permission to edit anything.") }}</p> 
     43    <p>{% trans "You don't have permission to edit anything." %}</p> 
    4344{% endif %} 
    4445</div> 
     
    4849<div id="content-related"> 
    4950    <div class="module" id="recent-actions-module"> 
    50         <h2>{{ _('Recent Actions') }}</h2> 
    51         <h3>{{ _('My Actions') }}</h3> 
     51        <h2>{% trans 'Recent Actions' %}</h2> 
     52        <h3>{% trans 'My Actions' %}</h3> 
    5253            {% load log %} 
    5354            {% get_admin_log 10 as admin_log for_user user %} 
    5455            {% if not admin_log %} 
    55             <p>{{ _('None available') }}</p> 
     56            <p>{% trans 'None available' %}</p> 
    5657            {% else %} 
    5758            <ul class="actionlist"> 
  • django/branches/i18n/django/contrib/admin/templates/admin/login.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    34{% block breadcrumbs %}{% endblock %} 
     
    1213 
    1314<p class="aligned"> 
    14 <label for="id_username">{{ _('Username:') }}</label> <input type="text" name="username" id="id_username" /> 
     15<label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" /> 
    1516</p> 
    1617<p class="aligned"> 
    17 <label for="id_password">{{ _('Password:') }}</label> <input type="password" name="password" id="id_password" /> 
     18<label for="id_password">{% trans 'Password:' %}</label> <input type="password" name="password" id="id_password" /> 
    1819<input type="hidden" name="this_is_the_login_form" value="1" /> 
    19 <input type="hidden" name="post_data" value="{{ post_data }}" />{% comment %} <span class="help">{{ _('Have you <a href="/password_reset/">forgotten your password</a>?') }}</span>{% endcomment %} 
     20<input type="hidden" name="post_data" value="{{ post_data }}" />{% comment %} <span class="help">{% trans 'Have you <a href="/password_reset/">forgotten your password</a>?' %}</span>{% endcomment %} 
    2021</p> 
    2122 
    2223<div class="aligned "> 
    23 <label>&nbsp;</label><input type="submit" value="{{ _('Log in') }}" /> 
     24<label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" /> 
    2425</div> 
    2526</form> 
  • django/branches/i18n/django/contrib/admin/templates/admin/object_history.html

    r996 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    34{% block breadcrumbs %} 
    4 <div class="breadcrumbs"><a href="../../../../">{{ _('Home') }}</a> &rsaquo; <a href="../../">{{ module_name }}</a> &rsaquo; <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo; {{ _('History') }}</div> 
     5<div class="breadcrumbs"><a href="../../../../">{% trans 'Home' %}</a> &rsaquo; <a href="../../">{{ module_name }}</a> &rsaquo; <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo; {% trans 'History' %}</div> 
    56{% endblock %} 
    67 
     
    1516        <thead> 
    1617        <tr> 
    17             <th>{{ _('Date/time') }}</th> 
    18             <th>{{ _('User') }}</th> 
    19             <th>{{ _('Action') }}</th> 
     18            <th>{% trans 'Date/time' %}</th> 
     19            <th>{% trans 'User' %}</th> 
     20            <th>{% trans 'Action' %}</th> 
    2021        </tr> 
    2122        </thead> 
     
    3334{% else %} 
    3435 
    35     <p>{{ _("This object doesn't have a change history. It probably wasn't added via this admin site.") }}</p> 
     36    <p>{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}</p> 
    3637 
    3738{% endif %} 
  • django/branches/i18n/django/contrib/admin/templates/registration/logged_out.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{{ _('Home') }}</a></div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %} 
    45 
    56{% block content %} 
    67 
    7 <p>{{ _("Thanks for spending some quality time with the Web site today.") }}</p> 
     8<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> 
    89 
    9 <p><a href="../">{{ _('Log in again') }}</a></p> 
     10<p><a href="../">{% trans 'Log in again' %}</a></p> 
    1011 
    1112{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/registration/password_change_done.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{{ _('Home') }}</a> &rsaquo; {{ _('Password change') }}</div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %} 
    45 
    5 {% block title %}{{ _('Password change successful') }}{% endblock %} 
     6{% block title %}{% trans 'Password change successful' %}{% endblock %} 
    67 
    78{% block content %} 
    89 
    9 <h1>{{ _('Password change successful') }}</h1> 
     10<h1>{% trans 'Password change successful' %}</h1> 
    1011 
    11 <p>{{ _('Your password was changed.') }}</p> 
     12<p>{% trans 'Your password was changed.' %}</p> 
    1213 
    1314{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/registration/password_change_form.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{{ _('Home') }}</a> &rsaquo; {{ _('Password change') }}</div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %} 
    45 
    5 {% block title %}{{ _('Password change') }}{% endblock %} 
     6{% block title %}{% trans 'Password change' %}{% endblock %} 
    67 
    78{% block content %} 
    89 
    9 <h1>{{ _('Password change') }}</h1> 
     10<h1>{% trans 'Password change' %}</h1> 
    1011 
    11 <p>{{ _("Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly.") }}</p> 
     12<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> 
    1213 
    1314<form action="" method="post"> 
    1415 
    1516{% if form.old_password.errors %}{{ form.old_password.html_error_list }}{% endif %} 
    16 <p class="aligned wide"><label for="id_old_password">{{ _('Old password:') }}</label>{{ form.old_password }}</p> 
     17<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p> 
    1718{% if form.new_password1.errors %}{{ form.new_password1.html_error_list }}{% endif %} 
    18 <p class="aligned wide"><label for="id_new_password1">{{ _('New password:') }}</label>{{ form.new_password1 }}</p> 
     19<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> 
    1920{% if form.new_password2.errors %}{{ form.new_password2.html_error_list }}{% endif %} 
    20 <p class="aligned wide"><label for="id_new_password2">{{ _('Confirm password:') }}</label>{{ form.new_password2 }}</p> 
     21<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> 
    2122 
    22 <p><input type="submit" value="{{ _('Change my password') }}" /></p> 
     23<p><input type="submit" value="{% trans 'Change my password' %}" /></p> 
    2324</form> 
    2425 
  • django/branches/i18n/django/contrib/admin/templates/registration/password_reset_done.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{{ _('Home') }}</a> &rsaquo; {{ _('Password reset') }}</div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %} 
    45 
    5 {% block title %}{{ _('Password reset successful') }}{% endblock %} 
     6{% block title %}{% trans 'Password reset successful' %}{% endblock %} 
    67 
    78{% block content %} 
    89 
    9 <h1>{{ _('Password reset successful') }}</h1> 
     10<h1>{% trans 'Password reset successful' %}</h1> 
    1011 
    11 <p>{{ _("We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly.") }}</p> 
     12<p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p> 
    1213 
    1314{% endblock %} 
  • django/branches/i18n/django/contrib/admin/templates/registration/password_reset_email.html

    r956 r1061  
    1 {{ _("You're receiving this e-mail because you requested a password reset") }} 
    2 {{ _("for your user account at %(site_name)s") }}. 
     1{% load i18n %} 
     2{% trans "You're receiving this e-mail because you requested a password reset" %} 
     3{% trans "for your user account at %(site_name)s" %}. 
    34 
    4 {{ _("Your new password is: %(new_password)s") }
     5{% trans "Your new password is: %(new_password)s" %
    56 
    6 {{ _("Feel free to change this password by going to this page:") }
     7{% trans "Feel free to change this password by going to this page:" %
    78 
    89http://{{ domain }}/password_change/ 
    910 
    10 {{ _("Your username, in case you've forgotten:") }} {{ user.username }} 
     11{% trans "Your username, in case you've forgotten:" %} {{ user.username }} 
    1112 
    12 {{ _("Thanks for using our site!") }
     13{% trans "Thanks for using our site!" %
    1314 
    14 {{ _("The %(site_name)s team") }
     15{% trans "The %(site_name)s team" %
  • django/branches/i18n/django/contrib/admin/templates/registration/password_reset_form.html

    r956 r1061  
    11{% extends "admin/base_site" %} 
     2{% load i18n %} 
    23 
    3 {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{{ _('Home') }}</a> &rsaquo; {{ _('Password reset') }}</div>{% endblock %} 
     4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %} 
    45 
    5 {% block title %}{{ _("Password reset") }}{% endblock %} 
     6{% block title %}{% trans "Password reset" %}{% endblock %} 
    67 
    78{% block content %} 
    89 
    9 <h1>{{ _("Password reset") }}</h1> 
     10<h1>{% trans "Password reset") }}</h1> 
    1011 
    11 <p>{{ _("Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you.") }}</p> 
     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> 
    1213 
    1314<form action="" method="post"> 
    1415{% if form.email.errors %}{{ form.email.html_error_list }}{% endif %} 
    15 <p><label for="id_email">{{ _('E-mail address:') }}</label> {{ form.email }} <input type="submit" value="{{ _('Reset my password') }}" /></p> 
     16<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p> 
    1617</form> 
    1718 
  • django/branches/i18n/django/core/template/__init__.py

    <
    r869 r1061  
    235235        del self.tokens[0] 
    236236 
     237class TokenParser: 
     238    """ 
     239    You need to subclass this class and implement the 
     240    top method to parse your template line. When instantiating 
     241    the parser, you pass in the line from the django template 
     242    parser. 
     243 
     244    If your tag needs to know what tag name it was called with, 
     245    you find it in the tagname instance variable of the parser. 
     246    """ 
     247 
     248    def __init__(self, subject): 
     249        self.subject = subject 
     250        self.pointer = 0 
     251        self.backout = [] 
     252        self.tagname = self.tag() 
     253 
     254    def top(self): 
     255        """ 
     256        You need to overload this method to do the actual parsing 
     257        and return the result. 
     258        """ 
     259        raise NotImplemented 
     260 
     261    def more(self): 
     262        """ 
     263        This returns True if there is more stuff in the tag. 
     264        """ 
     265        return self.pointer < len(self.subject) 
     266