#4146 closed defect (fixed)
[PATCH] Selected language setting isn't accepted if user.cfg doesn't exist
Reported by: | elexis | Owned by: | mimo |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 22 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
If the user.cfg
file doesn't exist, changing the language doesn't work (even applying it without restarting the game doesn't use the new setting).
If one changes something in the options menu, the file is created, hiding the bug.
Attachments (2)
Change History (14)
by , 8 years ago
Attachment: | setlanguage.patch added |
---|
comment:1 by , 8 years ago
Keywords: | rfc patch added |
---|---|
Summary: | Selected language setting isn't accepted if user.cfg doesn't exist → [PATCH] Selected language setting isn't accepted if user.cfg doesn't exist |
comment:2 by , 8 years ago
Keywords: | rfc removed |
---|
comment:3 by , 7 years ago
Keywords: | simple added |
---|---|
Priority: | Should Have → Must Have |
comment:4 by , 7 years ago
Problem is that WriteValueToFile tries to reload the config file and gets error: 'Cannot find config file "config/user.cfg" - ignoring', so we should save file even file not found. Also we didn't notice it with other variables, because usual options call the WriteFile (which doesn't call the Reload), not WriteValueToFile.
comment:5 by , 7 years ago
Keywords: | rfc added |
---|---|
Milestone: | Backlog → Alpha 22 |
follow-up: 9 comment:8 by , 7 years ago
Component: | UI & Simulation → Core engine |
---|
(Don't forget to bump the year at the top of the file next time. That is also true for that other patch of him that was uploaded recently.)
comment:9 by , 7 years ago
Replying to elexis:
(Don't forget to bump the year at the top of the file next time. That is also true for that other patch of him that was uploaded recently.)
Yeah, thanks, I'm taking all engine in the mind to prevent bugs, but forgot about years.
comment:10 by , 7 years ago
Was this problem on Windows or Linux? Because with the Alpha XXI (Ulysses) version I can change language on Windows 8.1 but not on Ubuntu 16.04 (same PC, I have a dual-boot system).
follow-up: 12 comment:11 by , 7 years ago
All OS. It's not fixed for alpha 21 yet, only alpha 22. In alpha 21, open the options dialog, change a random setting, save, then it saves the language too.
comment:12 by , 7 years ago
Replying to elexis:
All OS. It's not fixed for alpha 21 yet, only alpha 22. In alpha 21, open the options dialog, change a random setting, save, then it saves the language too.
Ah, ok. Thank you very much.
Thanks for taking care of the issue :)
The bug actually comes from the engine function
SaveLocale
so it would be nicer to make changes there.However, by taking a look at the code I don't see what could fail. It would be interesting to understand why
g_ConfigDB.WriteValueToFile
fails in the engine while all calls to this function in the gamesetup and the prelobby don't cause issues (maybe they do but we didn't notice).