Looking for Translators - Development Log #402

In this week's devlog Michi talks about the recently deployed changes and how the translation pipeline works!

Avatar Michi

Michi (molp)

Last week Fabian and I fixed a few smaller issues and I deployed them to production. We posted a list of changes in the Discord, but since it is not part of any official maintenance release I thought I should post it here as well:

  • Fixed a bug where the amount of contracts that went into a rating was not updating properly
  • We are now showing the names of fixed storage locations in the MTRA command
  • Revenue from interest is now properly being added to the revenue indicator in FIN
  • Blocklist is now scrollable
  • We fixed a problem with editing loan payout conditions

Besides that, I am still working on making the game translatable. My focus has been on the tours this week and on the time-related components.

Prosperous Universe, as a software project, is quite old by now, especially given it is web project where the whole environment changes and evolves even faster than in other areas. While I was looking for string in the source code that could not be easily extracted for translation I stumbled upon a component that renders all the time relevant strings like durations, countdowns and relative times. We use them all over the place to indicate how long something takes, for example in 3h 2s or 2 days 12h ago.

That component is based on a library that we didn't include via the regular dependency management at the time, but rather copied its source over into our project. I couldn't find out why, but most likely because it wasn't part of the npm ecosystem at the time. After further investigation I noticed that that component could not be translated easily and looked for alternatives. In the end I decided to use a modern framework for that purpose that works well with our dependency management system. It meant that I had to rewrite the countdown, relative time and duration components though.

Maybe it is also time to explain a bit about how the translation pipeline works, and why I talk about making strings translatable and not about actually translating them, yet.

What we don't want to do is hardcode the translation of every string in the game into the source code. Instead, we use a tool that allows us to extract all translatable strings into a separate file. We then process that file with specialized translation tool called weblate. The result of this process is imported back into the source code repository and can then be deployed and used to switch between languages.

Using an intermediary tool like weblate has several advantages: It allows to focus on the translation itself. No need to dig through code while translating. When some progress is made it is possible to automatically deploy these changes to a test server to see the new translations in action. It also allows to have several people work on the translation at the same time and, most importantly, it allows to have translators that don't need to have access to the rest of our tools and code repositories.

Once this is fully implemented we will support English and German as the official languages of the game and make sure all texts are translated. Weblate opens the possibility of having community supported translations! In our other game AirlineSim we have a volunteer team that has translated the game into Dutch, Simplified Chinese, and others. We totally can image something similar for Prosperous Universe.

It is still too early to form these teams, but if you are interested in being part of such a team (for any language, including english), feel free to contact us!

As always: we'd love to hear what you think: join us on Discord or the forums!

Happy trading!