-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix peripherals started before strings are loaded #12518
Conversation
Why is this? Is something caching it? If the labels are translated when they are displayed this won't matter as they will get the correct one once the strings are loaded. |
The labels are cached, but translating at runtime would work too. |
Updated with @tamland's suggestion |
It's worth noting that initializing peripherals in stage 3 was what originally happened in #11824. I can't say if the move to stage 2 has other negative side effects besides strings breaking. |
stage 3 is for components that require ui. this looks more like a work around but does not address the root cause. |
A bunch of stuff happens between stages 2 and 3, and peripherals could depend on any number of it. I don't know the reason peripherals were originally brought up near stage 3, but restoring this behavior seems like the least intrusive change. |
Will CEC be fixed maybe? |
@garbear still a long way to go with our globals, isn't? could you place a comment in the code with this info? |
This was causing game.controller.default to have empty labels in the controller window.
@FernetMenta added a comment, is that what you had in mind? |
ok, thanks |
Jenkins build this please |
Still a really bad idea though. Unless you register callback for all these things, it breaks language switching and updating. If string translation is simply kept to the gui layer (and not cached a second time), it just works. |
True, language switching will still be broken. Although in this case it's just add-on strings. I'll address this in a future PR. My main argument is that Peripherals doesn't need to be brought up so early, and indeed the change has already broken some stuff in the past, including causing a segfault in tests. Once this change is in I'll start to decouple peripherals from the GUI. Jenkins build this please |
This fixes the following error:
How Has This Been Tested?
The labels show up now.
Types of change