tbe icon indicating copy to clipboard operation
tbe copied to clipboard

Improve Level i18n system

Open kaa-ching opened this issue 7 years ago • 9 comments

The current way of i18n for level translations, as implemented in Milestone B:

  1. levels contain only English texts
  2. tbe_levels_i18n.sh extracts the strings and creates a tbe_levels.pot file
  3. this is uploaded to Transifex
  4. the Transifex community translates the strings
  5. we download the various *.po files from Transifex
  6. during build, these PO files are translated to LC_MESSAGES files
  7. these are used by the gettext() to translate the strings

There are several issues with the current mechanism:

  1. 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)
  2. character translation in step 7 fails with QML - see the post-its of level picnic-0 in German: i18n-qml-fail
  3. shipping two different i18n systems feels wrong and bloated.

kaa-ching avatar Sep 24 '16 08:09 kaa-ching

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?

amarsman avatar Sep 25 '16 03:09 amarsman

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 ;-)

kaa-ching avatar Sep 25 '16 18:09 kaa-ching

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.

Wuzzy2 avatar Oct 15 '16 16:10 Wuzzy2

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.

glixx avatar Oct 29 '16 15:10 glixx

yay, thanks for the tip, glixx!

kaa-ching avatar Oct 30 '16 21:10 kaa-ching

It looks like pull request #312 by @glixx generates TS files out of POT files, right?

kaa-ching avatar Nov 03 '16 07:11 kaa-ching

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.

kaa-ching avatar Nov 03 '16 08:11 kaa-ching

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.

glixx avatar Nov 03 '16 19:11 glixx

I've merged #312.

kaa-ching avatar Nov 03 '16 19:11 kaa-ching