Skip to content

Translation toolkit for ToME4

Otowa Kotori requested to merge otowakotori/tome-addon-dev:i18n into master

Prototype of builtin translation toolkit for ToME4. It is designed to replace the old i18n_tools native lua script interface.

How to use:

  • This addon will add "Translation Tool" menu in debug menu, in this menu
    • Change working locale will change your working locale
    • Create translation addon is used to create a template addon to test your translation project.
    • Extract text index must be executed before the two following operation, it will extract game text in your game file. You should rerun this operation whenever game code (excluding locale) changes.
    • Rearrange translation files will help you arrange translation file in your translation working folder, it will create empty translation files, as well as arrange, deduplicate and detect conflict translations in your files.
    • Check translation files just do the conflict detection work
    • Release translation as addon can be used to copy your translation file to an addon.
  • Working dir is {engine.homepath}/user-i18n/
  • Additional file to help rearrange translation files
    • _tdef_append.lua is used to mark text that does not appear in game as _t string but should be translated.
      • For example, northwest is a combination of "north" and "west" in game, but it may appear as an independent word in your language.
      • Also, magestaff that does not appear as _t. It's the key for key-value staff flavor defination in game, and we may not want to change this for compatibility.
      • This is still subject to interface changes, currently, you can get a up-to-date _tdef_append.lua in https://pastebin.com/tJS5SCt6
  • _t_append.lua can be used to add translations into your project. It can be also used for migration from the old framework.
  • _not_merged.lua is, strings that don't appear in current game, being evicted and stored here. Current work: Documents (Important!) More tests Additional features on request

Merge request reports

Loading