Add Thai language support and graceful Lua file loading - #400
Conversation
- Add Thai (ภาษาไทย) as a selectable language in interface settings - Add full Thai translations for all UI strings in th-TH.ron - Add NotoSansThai MSDF font atlas (8192×512px, 467 glyphs) for correct Thai script rendering - Register NotoSansThai as a fallback font in the font loader - Change Lua library loading to skip missing files instead of panicking, allowing the client to run with incomplete game data (e.g. without kRO-specific luafiles514) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Hi! And thank you for the PR! We only ship in the git source the base latin script font map. All other font maps are available in our font release: https://github.com/vE5li/korangar/releases/tag/v0.0.1-font-map-files We already did create a font map for Thai too! (NotoSansThai.zip) |
Font maps are distributed separately via GitHub releases, not shipped in the repository source. See: https://github.com/vE5li/korangar/releases/tag/v0.0.1-font-map-files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for the heads up! I've removed the font files from the PR — the code changes now only include the localization and font loader registration. Users can grab the NotoSansThai font map from the release page. |
|
@comdevx can you squash the two commits? Merging them like this would clutter up the git state |
| let Ok(data) = game_file_loader.get(file) else { | ||
| continue; | ||
| }; | ||
|
|
||
| state.load(&data).exec()?; |
There was a problem hiding this comment.
I was unsure about this change but I think it's fair.
However, we want to at lest log an error to the console (using print_debug)
Summary
th-TH.ron)load_from_game_filesto skip missing Lua files instead of panicking — allows the client to start with incomplete game data (e.g. without kRO-specificluafiles514) while gracefully falling back to empty tablesChanges
src/state/localization/mod.rsThaivariant toLanguageenum with locale codeth-THand display nameภาษาไทยsrc/settings/interface.rsLanguage::Thaito the language selectorsrc/lib.rsNotoSansThaias a fallback fontarchive/data/languages/th-TH.ronarchive/data/font/NotoSansThai.*src/world/library/mod.rsTest plan
luafiles514in game data