Fix issue where the user can not switch the UI language. It's a regression of #4348. Fixes #4975

This commit is contained in:
Aditya Toshniwal 2019-12-05 14:34:44 +05:30 committed by Akshay Joshi
parent 0bd26222d8
commit 75ac259632
4 changed files with 5 additions and 4 deletions

View File

@ -49,6 +49,7 @@ Bug fixes
| `Issue #4964 <https://redmine.postgresql.org/issues/4964>`_ - Fix an issue where length and precision are not removed from table/column dialog.
| `Issue #4965 <https://redmine.postgresql.org/issues/4965>`_ - Fix an issue where the Interval data type is not displayed in the properties dialog of table/column.
| `Issue #4966 <https://redmine.postgresql.org/issues/4966>`_ - Fix 'Could not find the object on the server.' error while refreshing the check constraint.
| `Issue #4975 <https://redmine.postgresql.org/issues/4975>`_ - Fix issue where the user can not switch the UI language. It's a regression of #4348.
| `Issue #4978 <https://redmine.postgresql.org/issues/4978>`_ - Fix pgAdmin4 failed to start issue after upgrading to version 4.15.
| `Issue #4985 <https://redmine.postgresql.org/issues/4985>`_ - Fix an issue where the inherited table name with quotes did not escape correctly.
| `Issue #4991 <https://redmine.postgresql.org/issues/4991>`_ - Fix an issue where context menu is open along with submenu and the focus is not on context menu or submenu.

View File

@ -285,7 +285,7 @@ def create_app(app_name=None):
if user is not None:
user_id = user.id
user_language = Preferences.raw_value(
'miscellaneous', 'user_language', None, user_id
'misc', 'user_language', 'user_language', user_id
)
if user_language is not None:
language = user_language
@ -411,7 +411,7 @@ def create_app(app_name=None):
language = data['language']
# Set the user language preference
misc_preference = Preferences.module('miscellaneous')
misc_preference = Preferences.module('misc')
user_languages = misc_preference.preference(
'user_language'
)

View File

@ -584,7 +584,7 @@ def index():
# Set the language cookie after login, so next time the user will have that
# same option at the login time.
misc_preference = Preferences.module('miscellaneous')
misc_preference = Preferences.module('misc')
user_languages = misc_preference.preference(
'user_language'
)

View File

@ -190,7 +190,7 @@ def save(pid):
# This will execute every time as could not find the better way to know
# that which preference is getting updated.
misc_preference = Preferences.module('miscellaneous')
misc_preference = Preferences.module('misc')
user_languages = misc_preference.preference(
'user_language'
)