Skip to content
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

Call set_language even when LOCALIZE is off #66460

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

perryprog
Copy link
Contributor

Summary

None

Purpose of change

Fix #65640.

Describe the solution

Make sure set_language gets called even if localization is disabled, as that calls out to reload_names, and Names::get has a failsafe of "Tom" for when it doesn't have any names to generate from.

Describe alternatives you've considered

Leave in this feature as a mod. Cataclysm: Tom Days Ahead.

Testing

Compiled with localization off and started created a world without being told it should be called "Tom".

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Translation I18n <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Jun 25, 2023
@perryprog
Copy link
Contributor Author

Test failure unrelated.

This was causing a frankly hilarious bug that would cause Name::get to return
"Tom" no matter what search flags were passed whenever localization was
disabled. This meant that EVERYTHING was Tom. Have you been to Tom Town yet? No?
That's because it's also called Tom Tom. Can't remember that person's name? It's
Tom. Their last name? Also Tom. Committing some identity theft but stuck on
"Mother's maiden name"? I'll give you a hint: it's Tom.

This commit should fix this disastrous issue by making sure set_language, which
is what loads the names file initially, gets called even when localization is
disabled.
@perryprog perryprog force-pushed the tom-tom-tom-tom-tom-tom branch from 02448fe to 21e1ec7 Compare June 26, 2023 16:44
@dseguin dseguin merged commit eee86cb into CleverRaven:master Jun 29, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiling with LOCALIZE=0 results in all random names being "Tom"
2 participants