Python 3 compatibility fix - iteritems() is deprecated.

pull/3/head
Murtuza Zabuawala 2016-05-10 17:01:11 +01:00 committed by Dave Page
parent a5bb65c468
commit ce043fbe07
1 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@ function(_, S, pgAdmin) {
return pgBrowser.messages;
var messages = pgBrowser.messages = {
'SERVER_LOST': '{{ _('Connection to the server has been lost!') }}',
'SERVER_LOST': '{{ _('Connection to the server has been lost.') }}',
'CLICK_FOR_DETAILED_MSG': '%s<br><br>' + '{{ _('Click here for details.')|safe }}',
'GENERAL_CATEGORY': '{{ _("General")|safe }}',
'SQL_TAB': '{{ _('SQL') }}',
@ -27,8 +27,10 @@ function(_, S, pgAdmin) {
'NOTE_CTRL_LABEL': "{{ _("Note") }}",
};
{% for key, val in current_app.messages.iteritems() %}messages['{{ key|safe }}'] = '{{ val|safe }}';
{% endfor %}
{% for key in current_app.messages.keys() %}
messages['{{ key|safe }}'] = '{{ current_app.messages[key]|safe }}';
{% endfor %}
return pgBrowser.messages;