Open fnicollet opened 1 year ago
@fnicollet
We don't have parameters PGADMIN_DEFAULT_LANGUAGE and DEFAULT_SERVER_LANGUAGE. I am considering this as a feature request.
Yep, it's just (bad) information i found online, as the strings of the login page are currently hard-coded, this is more of a feature request
Thanks
We may have to infer the preferred language on the login page from the browsers preferred languages, and then allow overriding of that with the combo box. If the user has previously selected a language from the combo, then we can default to that from the cookie (which I'm assuming we set).
As I am also asked to set default language for web interface (as in independant of user request), I would find useful to have some configuration variable (such as DEFAULT_SERVER_LANGUAGE or PGADMIN_DEFAULT_LANGUAGE) we could use in function get_locale in web/pgadmin/init.py. In my case, we use the deb package from the repository then use templating engine to generate config_local.py and customize the instance. But to set default language as asked, we resort to overwriting init.py which is not a so good idea (debsums reminds us of that).
Thanks
As I am also asked to set default language for web interface (as in independant of user request), I would find useful to have some configuration variable (such as DEFAULT_SERVER_LANGUAGE or PGADMIN_DEFAULT_LANGUAGE) we could use in function get_locale in web/pgadmin/init.py. In my case, we use the deb package from the repository then use templating engine to generate config_local.py and customize the instance. But to set default language as asked, we resort to overwriting init.py which is not a so good idea (debsums reminds us of that).
Thanks
DEFAULT_LANGUAGE
can be used as a new config var.
Describe the bug
When running pgAdmin4 in server mode, the login page is always in english
To Reproduce
Steps to reproduce the behavior:
Expected behavior
In my docker-compose.yml file, I tried setting the environment variable:
I also tried adding to the "config_system.py" the following line:
I tried removing all the other languages, except french in the config_system.py file:
The list contains only one option, but the rest of the UI is still in English:
I use the latest "dpage/pgadmin4" docker image
Additional context
I think that once you are connected, the language of the UI can be changed, but I would like to change the language of the default landing page as well.
It seems that those strings are hardcoded in the source code: https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/templates/security/login_user.html#L23
So it might be more of a feature request ?
Thanks, Fabien