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 42102e40f44..83a08699c22 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 d41396a9fdf..4616b16d3d7 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 a83cf063a0d..6adfaed548a 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 9ac8fddc01e..de442986ff5 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 222d22481b1..98869cfa5c8 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 3af1ceff3e7..43440b27748 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 %}