tbe
tbe copied to clipboard
Improve Level i18n system
The current way of i18n for level translations, as implemented in Milestone B:
- levels contain only English texts
-
tbe_levels_i18n.sh
extracts the strings and creates atbe_levels.pot
file - this is uploaded to Transifex
- the Transifex community translates the strings
- we download the various
*.po
files from Transifex - during build, these PO files are translated to
LC_MESSAGES
files - these are used by the
gettext()
to translate the strings
There are several issues with the current mechanism:
- step 7 above requires working gettext support on all platforms (partial issue on MacOSX) (partial issue on Windows) (real issue on Win64 with Visual Studio)
- character translation in step 7 fails with QML - see the post-its of level picnic-0 in German:
- shipping two different i18n systems feels wrong and bloated.
Totally agree with this ticket, the introduction of this "feature" causes that currently a macOS build is tightly coupled to a specific macOS release. We need to get rid of gettext, I assume you want to keep Transifex support? Does Transifex support the Qt way of working?
Yes, Transifex supports the QT translation mechanism as well - it's in use for translating the strings in the main application.
My suggestion would be to write small tools that read the level XML (based on CleanLevels.cpp in the i18n directory?) and generate the tbe_levels_en.ts file - this will the base file for Transifex. Note that we'll also have to teach Transifex the existing translations for levels, otherwise a lot of work might go to waste... Not sure how to do that.
By the way, in case you want to check it out, here's the link to Transifex: https://www.transifex.com/Magic/thebutterflyeffect/ you can use your github login as a login mechanism. The dutch translation can use some help ;-)
My opinion as a translator: Neutral. Whether it's the Qt I18N system or Gettext or a mixture of both, I don't care, I can work with either. Both are very good and mature translation systems IMO, so I don't really care which of those two you choose, as long it is working at the end. That having said, do whatever you think is neccessary for the project.
If you want to use TS files only, then you should open POT/PO file in Linguist and save as TS file. So convertation is easy.
yay, thanks for the tip, glixx!
It looks like pull request #312 by @glixx generates TS files out of POT files, right?
Just to make clear: I'm all in favour of fixing this, but I'm only going to do that after I've completed the big change to QML. So expect second half of November.
Yes, I propose to use lconvert for converting POT file into TS file. So you don't need special tool to generate the tbe_levels_en.ts file.
I've merged #312.