weatherfactory / cultistsimulator-visible

Read-only preview builds of Cultist Simulator for the convenience of modders and the curious.
https://weatherfactory.biz/cultist-simulator/
37 stars 5 forks source link

Edge case with missing culture file for set language #157

Closed Genroa closed 2 years ago

Genroa commented 2 years ago

Hello, here's a non-breaking bug that I noticed.

I use the FR localization mod, so my culture was FR. I disabled it aswell as all other mods to test stuff, and noticed the Player.log was spammed with this message:

Can't find culture with id fr. Reverting to the default culture: sorry for the ethnocentrism!

My guess is that when the mod was disabled, the selected language wasn't modified (makes sense) But each time it tries to display a UI text and cannot find the culture, it will use the EN default, but not reset the selected language. This results in hundreds of lines of log identical to this one. So, a possible improvement: maybe the game could reset the selected language to EN if it happens to miss the culture the settings refer to? It's just a suggestion, and obviously a very low priority thing.

alexiskennedy commented 2 years ago

maybe the game could reset the selected language to EN if it happens to miss the culture the settings refer to?

This sounds like a sensible suggestion.