Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2106 -- Made collapse-block JavaScript translatable. Thanks, r…

…amiro

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 29f55c8dbb298bcaa5af0b3949cd1a1c39620b8d 1 parent 2abfd5d
@adrianholovaty adrianholovaty authored
View
8 django/contrib/admin/media/js/admin/CollapsedFieldsets.js
@@ -31,7 +31,7 @@ var CollapsedFieldsets = {
collapse_link.id = 'fieldsetcollapser' + i;
collapse_link.onclick = new Function('CollapsedFieldsets.show('+i+'); return false;');
collapse_link.href = '#';
- collapse_link.innerHTML = 'Show';
+ collapse_link.innerHTML = gettext('Show');
var h2 = fs.getElementsByTagName('h2')[0];
h2.appendChild(document.createTextNode(' ('));
h2.appendChild(collapse_link);
@@ -60,7 +60,7 @@ var CollapsedFieldsets = {
// Toggle the "Show" link to a "Hide" link
var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index);
collapse_link.onclick = new Function('CollapsedFieldsets.hide('+fieldset_index+'); return false;');
- collapse_link.innerHTML = 'Hide';
+ collapse_link.innerHTML = gettext('Hide');
},
hide: function(fieldset_index) {
var fs = document.getElementsByTagName('fieldset')[fieldset_index];
@@ -69,9 +69,9 @@ var CollapsedFieldsets = {
// Toggle the "Hide" link to a "Show" link
var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index);
collapse_link.onclick = new Function('CollapsedFieldsets.show('+fieldset_index+'); return false;');
- collapse_link.innerHTML = 'Show';
+ collapse_link.innerHTML = gettext('Show');
},
-
+
uncollapse_all: function() {
var fieldsets = document.getElementsByTagName('fieldset');
for (var i=0; i<fieldsets.length; i++) {
View
2  django/contrib/auth/views.py
@@ -36,7 +36,7 @@ def logout(request, next_page=None, template_name='registration/logged_out.html'
try:
del request.session[SESSION_KEY]
except KeyError:
- return render_to_response(template_name, {'title': 'Logged out'}, context_instance=RequestContext(request))
+ return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
else:
# Redirect to this page until the session has been cleared.
return HttpResponseRedirect(next_page or request.path)
Please sign in to comment.
Something went wrong with that request. Please try again.