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

i18n: Convert POSIX/Win32 locale table file into a map #4705

Merged
merged 2 commits into from Jan 19, 2020

Conversation

@shikadiqueen
Copy link
Member

shikadiqueen commented Jan 14, 2020

This removes the need for the separate file and the giant if chain by using a std::map instead.

@shikadiqueen

This comment has been minimized.

Copy link
Member Author

shikadiqueen commented Jan 14, 2020

Forgot to mention this code is completely untested at the moment since I can't get translations to work at all on Wine for some reason (with or without the patch).

Furthermore, the code in wesnoth_setlocale makes an interesting assumption with regards to the length of the key portion of the POSIX locale id. There's a few entries that expect the key to be longer than 2 characters, but also map them to "C". I'm not sure what to do about this yet or what the correct behaviour ought to be. I need to do some research in that regard.

This removes the need for the separate file and the giant if chain by
using a std::map instead.
@shikadiqueen shikadiqueen self-assigned this Jan 19, 2020
This solves an issue I pointed out in PR #4705 where language codes
longer than 2 characters would get misidentified during the conversion
to Windows locale names.
@shikadiqueen shikadiqueen force-pushed the shikadiqueen:refactor/win32locales branch from 019190f to d1a58d8 Jan 19, 2020
@shikadiqueen shikadiqueen merged commit df3b022 into wesnoth:master Jan 19, 2020
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.