From what I gather the problem is that the variable i18n.language_code is never updated after it's intilialised to QLocale.system().name(). I think this could be fixed with adding the one-line:
self.language_code = language_code
after 24§i18n.py in the method i18n.set_language(language_code, localedir=localedir)
This follows from my tracking the method calls of the button:
Clicking the "Help" button is detected in Editor.change_mode 1577§logic.py which calls Editor.show_help().
Editor.show_help() which opens the URL obtains the address (at 1380§logic.py) with i18n.language_code[:2].
i18n.language_code is initialized to QLocale.system().name().
This process should have an intersection with the logic that changes the program language. Updating the system language is performed by calling i18n.set_language in the method Editor.restore_session in 955§logic.py which is passed setting.session["locale"]. However, this method does not update the variable i18n.language_code.
What were you trying to do?
Access the "Help"-button
What steps did you take to trigger the issue?
I changed the language of Mu-editor to English which is my system language (relevant SO), restarted the app, clicked the "Help" button on the Tool.
What did you expect to happen?
I expected the "Help" button to direct me to a help page matching my chosen language
What actually happened?
The button opened the URL "https://codewith.mu/sv/help/1.2" which is the Swedish help url.
Operating System Version
Windows 10
Mu Version
1.2.0
Other Info
From what I gather the problem is that the variable
i18n.language_code
is never updated after it's intilialised toQLocale.system().name()
. I think this could be fixed with adding the one-line:self.language_code = language_code
after 24§i18n.py in the method
i18n.set_language(language_code, localedir=localedir)
This follows from my tracking the method calls of the button:
Editor.change_mode
1577§logic.py which callsEditor.show_help()
.Editor.show_help()
which opens the URL obtains the address (at 1380§logic.py) withi18n.language_code[:2]
.i18n.language_code
is initialized toQLocale.system().name()
.This process should have an intersection with the logic that changes the program language. Updating the system language is performed by calling
i18n.set_language
in the methodEditor.restore_session
in 955§logic.py which is passedsetting.session["locale"]
. However, this method does not update the variablei18n.language_code
.Editor Log
No response