public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin][RM4975] Cannot switch UI language
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin][RM4975] Cannot switch UI language
@ 2019-12-05 07:46  Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Aditya Toshniwal @ 2019-12-05 07:46 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Attached is the patch to fix the issue where user language was not changing.
This is a regression of the theme customization patch - #4348

-- 
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM4975.patch (2.0K, 3-RM4975.patch)
  download | inline diff:
diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py
index 8a38c0ad0..293054f28 100644
--- a/web/pgadmin/__init__.py
+++ b/web/pgadmin/__init__.py
@@ -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'
             )
diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py
index 93ab763f7..63753c64e 100644
--- a/web/pgadmin/browser/__init__.py
+++ b/web/pgadmin/browser/__init__.py
@@ -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'
     )
diff --git a/web/pgadmin/preferences/__init__.py b/web/pgadmin/preferences/__init__.py
index 447321713..34c01879b 100644
--- a/web/pgadmin/preferences/__init__.py
+++ b/web/pgadmin/preferences/__init__.py
@@ -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'
     )


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin][RM4975] Cannot switch UI language
@ 2019-12-05 09:05  Akshay Joshi <[email protected]>
  parent: Aditya Toshniwal <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2019-12-05 09:05 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Thu, Dec 5, 2019 at 1:16 PM Aditya Toshniwal <
[email protected]> wrote:

> Hi Hackers,
>
> Attached is the patch to fix the issue where user language was not
> changing.
> This is a regression of the theme customization patch - #4348
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-12-05 09:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 07:46 [pgAdmin][RM4975] Cannot switch UI language Aditya Toshniwal <[email protected]>
2019-12-05 09:05 ` Akshay Joshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox