Mindustry: Localization Checklist

Created on 14 Dec 2017  路  9Comments  路  Source: Anuken/Mindustry

This will be a separate checklist for setting up localization.

LibGDX I18Bundle documentation: Link

  • [x] Add I18Bundle variable to Control/Vars class, set up appropriate way to fetch text easily
  • [x] Set up assets directory for text files
  • [x] Create basic test bundle and get 'fetching' working
  • [x] Make I18Bundle work with all UI
  • [x] Make I18Bundle work with all block descriptions and extended descriptions
  • [x] Make I18Bundle work with map names (?)
  • [x] Remove "short descriptions", if possible, and replace them with something else
  • [x] Transcribe all ingame text to I18Bundle strings
  • [x] Translate to French (contact Omicron translation team)
  • [x] Translate to Russian (already found a translator who is willing, or I can even do it myself)
  • [x] Translate to German
help wanted

Most helpful comment

Storing the text and fetching it isn't the hard part; the hard part is making it load the right text bundle for the locale, and having it fallback when necessary.
Advantages:

  • simpler format, no quotes, easy to edit
  • automatically format strings you pass in with specific arguments
  • automatically load the right bundle for the locale of the user
  • automatically fall back to the right bundles when the optimal one is not found
  • works across all platforms, including HTML5 (a lot of standard Java stuff doesn't work there, so that's a big deal)
  • probably faster to load and use than JSON, as the format is much simpler

If I use JSON, I'll have to re-implement all of these features, probably for each platform, too. The formats aren't _too_ different; can't you do something like remove all quotes and replace : with =, using the appropriate tools in your editor?

All 9 comments

...can't we just use JSON? What are the advantages or benefits in using I18Bundle instead of JSON? I've already gone through about half of the total game text and put it in JSON, and was thinking we'd be able to import the JSON as an object in the files that the game has text in, and then reference them wherever it is needed.

Storing the text and fetching it isn't the hard part; the hard part is making it load the right text bundle for the locale, and having it fallback when necessary.
Advantages:

  • simpler format, no quotes, easy to edit
  • automatically format strings you pass in with specific arguments
  • automatically load the right bundle for the locale of the user
  • automatically fall back to the right bundles when the optimal one is not found
  • works across all platforms, including HTML5 (a lot of standard Java stuff doesn't work there, so that's a big deal)
  • probably faster to load and use than JSON, as the format is much simpler

If I use JSON, I'll have to re-implement all of these features, probably for each platform, too. The formats aren't _too_ different; can't you do something like remove all quotes and replace : with =, using the appropriate tools in your editor?

Ah, gotcha. I'll work on porting all the gametext i stored onto the JSON into I18Bundle. Starting pull request when done.

Also, one thing: on Desktop (atleast as far as i know), the text in the main menu are sprites, so we should probably make new sprites for them corresponding to the languages we translate the game into...

I just want to note that there is likely an automatic JSON to l18Bundle converter out there somewhere that you could use.

...I wish I had known that... earlier... 馃槖
(jk thx epower, ill try it out and see what i can find)

If you give me the files, I can probably write a script that can convert them very quickly. The l18Bundle format is very simple.

I want translate Korean in this game.

@cloud9350 It might be best if you join the Discord server for this, as it's easier to ask questions there, and I have the instructions and files already posted.

Hey guys, I see the app on the play store doesn't have a full French translation. I have made one myself. Should I add a fr-FR folder in fastlane/metadata/android/ mimicking the russian folder?

Was this page helpful?
0 / 5 - 0 ratings