Changing language at run-time doesn't update the Mining Tab language #119

Closed
opened 1 year ago by duke · 5 comments
duke commented 1 year ago
Owner

It seems that because the Mining tab is different than all others (added at run-time via C++ instead of XML GUI files) it doesn't get retranslated when the language is changed at run-time

It seems that because the Mining tab is different than all others (added at run-time via C++ instead of XML GUI files) it doesn't get retranslated when the language is changed at run-time
duke commented 1 year ago
Poster
Owner

In theory the retranslateUi() function should deal with this correctly, but it might only be working upon UI elements known at compile time, and not those that are added at run-time

In theory the `retranslateUi()` function should deal with this correctly, but it might only be working upon UI elements known at compile time, and not those that are added at run-time
duke commented 1 year ago
Poster
Owner

One kind of work-around is this: Change language, shut down and restart. The mining tab will be translated. This allows using a different language than the OS default.

One kind of work-around is this: Change language, shut down and restart. The mining tab will be translated. This allows using a different language than the OS default.
duke commented 1 year ago
Poster
Owner

OK, I finally came up with a fix to this. Currently on the dev branch the tabText of the Mining tab and the Start/Stop Mining buttons will correctly retranslate when the language is changed at run-time. Still need to work on the rest of the widgets.

OK, I finally came up with a fix to this. Currently on the dev branch the tabText of the Mining tab and the Start/Stop Mining buttons will correctly retranslate when the language is changed at run-time. Still need to work on the rest of the widgets.
duke commented 1 year ago
Poster
Owner

With the latest code, things partially work. Somehow the tabText "Mining" and the comboBox of how many threads to use work correctly. You can change the language at run-time many times and they will update. For some weird reason, all the rest of the translations will only update once, if you try to change the language at run-time multiple times, they stop updating. Very weird.

With the latest code, things partially work. Somehow the tabText "Mining" and the comboBox of how many threads to use work correctly. You can change the language at run-time many times and they will update. For some weird reason, all the rest of the translations will only update *once*, if you try to change the language at run-time multiple times, they stop updating. Very weird.
duke commented 1 year ago
Poster
Owner

This now seems to work correctly, I think linguist had not been run or something. Closing this for now

This now seems to work correctly, I think linguist had not been run or something. Closing this for now
duke closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.