Currently the tutorial has a bunch of hard-coded English language messages in the file messages.lua. These should ideally be localized.
One possible approach:
- Change kts.PopUpWindow: instead of having
title and body we would have title_key and body_key which refer to localization key names.
- requires changes to
PopUpWindow in lua_ingame.cpp and related code.
- also update the Lua API documentation page.
- A lot of the tutorial messages use "\n" for newline, so we would need to add support for that to the
localization_*.txt files (see code in localization.cpp).
- Update
tutorial/messages.lua accordingly (existing messages will become localization keys).
- Create
tutorial/localization_english.txt, containing the new localization keys, and corresponding messages.
- (Optionally) provide translations in other languages as well.
Currently the tutorial has a bunch of hard-coded English language messages in the file messages.lua. These should ideally be localized.
One possible approach:
titleandbodywe would havetitle_keyandbody_keywhich refer to localization key names.PopUpWindowinlua_ingame.cppand related code.localization_*.txtfiles (see code inlocalization.cpp).tutorial/messages.luaaccordingly (existing messages will become localization keys).tutorial/localization_english.txt, containing the new localization keys, and corresponding messages.