From 752a43e24516cdc1341b0baeec5fae21ef796b62 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Mon, 23 Jan 2012 16:17:47 +0000 Subject: [PATCH] Reverted [17378] until a public API is available for application labels. This will allow to solve the i18n of such labels in a more holistic way without the need to introduce temporary, undocumented mechanisms to translate them. Refs #3591, #10436 git-svn-id: http://code.djangoproject.com/svn/django/trunk@17389 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/sites.py | 6 +++--- django/contrib/admin/templates/admin/app_index.html | 2 +- .../admin/templates/admin/auth/user/change_password.html | 4 ++-- django/contrib/admin/templates/admin/change_form.html | 4 ++-- django/contrib/admin/templates/admin/change_list.html | 4 ++-- .../contrib/admin/templates/admin/delete_confirmation.html | 2 +- .../admin/templates/admin/delete_selected_confirmation.html | 4 ++-- django/contrib/admin/templates/admin/index.html | 4 ++-- django/contrib/admin/templates/admin/object_history.html | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index 42102e40f4..83a08699c2 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -358,7 +358,7 @@ class AdminSite(object): app_dict[app_label]['models'].append(model_dict) else: app_dict[app_label] = { - 'name': app_label, + 'name': app_label.title(), 'app_url': reverse('admin:app_list', kwargs={'app_label': app_label}, current_app=self.name), 'has_module_perms': has_module_perms, 'models': [model_dict], @@ -415,7 +415,7 @@ class AdminSite(object): # something to display, add in the necessary meta # information. app_dict = { - 'name': app_label, + 'name': app_label.title(), 'app_url': '', 'has_module_perms': has_module_perms, 'models': [model_dict], @@ -425,7 +425,7 @@ class AdminSite(object): # Sort the models alphabetically within each app. app_dict['models'].sort(key=lambda x: x['name']) context = { - 'title': _('%(app_label)s administration') % {'app_label': capfirst(_(app_label))}, + 'title': _('%s administration') % capfirst(app_label), 'app_list': [app_dict], } context.update(extra_context or {}) diff --git a/django/contrib/admin/templates/admin/app_index.html b/django/contrib/admin/templates/admin/app_index.html index d41396a9fd..4616b16d3d 100644 --- a/django/contrib/admin/templates/admin/app_index.html +++ b/django/contrib/admin/templates/admin/app_index.html @@ -8,7 +8,7 @@ {% trans 'Home' %} › {% for app in app_list %} -{% trans app.name|title %} +{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %} {% endfor %} {% endblock %} diff --git a/django/contrib/admin/templates/admin/auth/user/change_password.html b/django/contrib/admin/templates/admin/auth/user/change_password.html index a83cf063a0..6adfaed548 100644 --- a/django/contrib/admin/templates/admin/auth/user/change_password.html +++ b/django/contrib/admin/templates/admin/auth/user/change_password.html @@ -13,8 +13,8 @@ {% block breadcrumbs %} diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index 9ac8fddc01..de442986ff 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -19,8 +19,8 @@ {% block breadcrumbs %} {% endblock %} diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index 222d22481b..98869cfa5c 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -41,8 +41,8 @@ {% block breadcrumbs %} {% endblock %} {% endif %} diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html index 3af1ceff3e..43440b2774 100644 --- a/django/contrib/admin/templates/admin/delete_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_confirmation.html @@ -6,7 +6,7 @@ {% block breadcrumbs %}