-
Notifications
You must be signed in to change notification settings - Fork 2
Locale support - base PR #118
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
Locale support - base PR #118
Conversation
|
Again - this looks like an awesome addition. Some of this is new to me, so will do some reading and testing and report back. |
A file is uniquely identified by its filename, locale and platform. Only one platform has ever been observed, so StormLib doesn't seem to expose it via its API - so only the filename and locale is of relevance. A brief mention of it is in the format file here: https://github.com/ladislav-zezula/StormLib/blob/master/doc/The%20MoPaQ%20File%20Format%201.0.txt#L89-L98 The tests I made in conftest.py create an MPQ with different locales for testing (although the tests were added in this PR, the implementation is in #119). Let me know if you would like an MPQ from "the wild" to test with. |
| {0x000, "enUS"}, // Default - English (US) | ||
| {0x404, "zhTW"}, // Chinese (Taiwan) | ||
| {0x405, "csCZ"}, // Czech | ||
| {0x407, "deDE"}, // German | ||
| {0x409, "enUS"}, // English (US) | ||
| {0x40a, "esES"}, // Spanish (Spain) | ||
| {0x40c, "frFR"}, // French | ||
| {0x410, "itIT"}, // Italian | ||
| {0x411, "jaJP"}, // Japanese | ||
| {0x412, "koKR"}, // Korean | ||
| {0x413, "nlNL"}, // Dutch | ||
| {0x415, "plPL"}, // Polish | ||
| {0x416, "ptPT"}, // Portuguese (Portugal) | ||
| {0x419, "ruRU"}, // Russian | ||
| {0x804, "zhCN"}, // Chinese (Simplified) | ||
| {0x809, "enGB"}, // English (UK) | ||
| {0x80A, "esMX"} // Spanish (Mexico) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list might not be exhaustive. Some locales are mentioned here and here, but both those links appear dated. I don't know if WoW or other games post ~2010 introduced more locales or not. I guess the MPQ format itself allows pretty much any locale value, so the question is which ones have been used by Blizzard. It's trivial to add more later as needed, in any case.
Locales are not supported in mpqcli, see #113. This PR, along with several subsequent PRs will add locale support to mpqcli, with one PR per subcommand (split up this way in order to try to make it all more manageable). This PR is the base, which paves the way for the other subsequent PRs.
In this PR:
This PR builds on top of #117, and the functionality in it will be needed for testing that locales work as expected in the subsequent PRs.
Subsequent PRs:
createandaddsubcommandsreadsubcommandextractsubcommandremovesubcommand