From 0c66bac4f3d6464f315353aea3de928c8bb5459f Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Thu, 28 Aug 2008 20:17:31 +0000 Subject: [PATCH] Marked a handful of missed strings for translation. Fixes #8644, #8617, and #8610. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8679 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/sites.py | 2 +- django/contrib/admin/widgets.py | 4 ++-- django/contrib/formtools/wizard.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index e36cfc1c7f..dd35a03656 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -403,7 +403,7 @@ class AdminSite(object): # Sort the models alphabetically within each app. app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name'])) context = { - 'title': _('%s administration' % capfirst(app_label)), + 'title': _('%s administration') % capfirst(app_label), 'app_list': [app_dict], 'root_path': self.root_path, } diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 2bfbc9715d..d5ece3f933 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -112,7 +112,7 @@ class ForeignKeyRawIdWidget(forms.TextInput): # API to determine the ID dynamically. output.append(' ' % \ (related_url, url, name)) - output.append('Lookup' % settings.ADMIN_MEDIA_PREFIX) + output.append('%s' % (settings.ADMIN_MEDIA_PREFIX, _('Lookup'))) if value: output.append(self.label_for_value(value)) return mark_safe(u''.join(output)) @@ -192,7 +192,7 @@ class RelatedFieldWidgetWrapper(forms.Widget): # API to determine the ID dynamically. output.append(u' ' % \ (related_url, name)) - output.append(u'Add Another' % settings.ADMIN_MEDIA_PREFIX) + output.append(u'%s' % (settings.ADMIN_MEDIA_PREFIX, _('Add Another'))) return mark_safe(u''.join(output)) def build_attrs(self, extra_attrs=None, **kwargs): diff --git a/django/contrib/formtools/wizard.py b/django/contrib/formtools/wizard.py index cb64fba537..b075628c49 100644 --- a/django/contrib/formtools/wizard.py +++ b/django/contrib/formtools/wizard.py @@ -12,6 +12,7 @@ from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.hashcompat import md5_constructor +from django.utils.translation import ugettext_lazy as _ from django.contrib.formtools.utils import security_hash class FormWizard(object): @@ -126,7 +127,7 @@ class FormWizard(object): This default implementation simply renders the form for the given step, but subclasses may want to display an error message, etc. """ - return self.render(self.get_form(step), request, step, context={'wizard_error': 'We apologize, but your form has expired. Please continue filling out the form from this page.'}) + return self.render(self.get_form(step), request, step, context={'wizard_error': _('We apologize, but your form has expired. Please continue filling out the form from this page.')}) def render_revalidation_failure(self, request, step, form): """