FlyDangerous icon indicating copy to clipboard operation
FlyDangerous copied to clipboard

Translation system

Open bekopharm opened this issue 2 years ago • 9 comments

I'd like to provide a community translation for German because I'm in a local group of E:D players and apparently many do simply not speak English so they have not much interest in FD.

I see that many strings seem to be hard-coded in JSON files so I'm asking for a translation system where such JSON files can be extended - or better - referenced and looked up in some sort of translation file. I've no idea what Unity has to offer for such tasks but a generic system, like PO files, would allow non developers to implement community translations because various editors for such files exist and are well documented.

Thoughts?

bekopharm avatar Oct 13 '21 10:10 bekopharm

Looks like localization is something supported in unity, https://docs.unity3d.com/Packages/[email protected]/manual/index.html

jukibom avatar Oct 13 '21 11:10 jukibom

Import and export localization data to XLIFF, CSV and Google Sheets.

XLIFF is good. CSV is okay-ish I guess. If nothing else. Strong feelings against Google Sheets :upside_down_face:

bekopharm avatar Oct 13 '21 12:10 bekopharm

XLIFF makes the most sense anyway, it'll all be in git

jukibom avatar Oct 13 '21 12:10 jukibom

XLIFF makes the most sense anyway, it'll all be in git

I'm not familiar with XLIFF, also I'm wary of the idea of doing it "all in git", does it make it possible to work with PO files or in some web-based service, like Transifex?

Tallefer avatar Oct 13 '21 13:10 Tallefer

Sure, just download the file from github, do what you gotta do and commit it to git. Or in the absolute worst case email it to me and I'll do it ;P

jukibom avatar Oct 13 '21 13:10 jukibom

I did some research and apparently XLIFF doesn't support plurals as of version 1.2 (the current standard), which is a big red flag for me. To be honest, I didn't look at XLIFF 2.0+ details because it seems to be not supported by anything (yet?). If you want to know what's with the plurals issue, you are certainly welcome to dive into that rabbit hole :D Here: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html

Here's a bit more info on features that are used as workarounds by Apple (IIRC): https://unicode-org.github.io/icu/userguide/format_parse/messages/

And just to illustrate, here's just a quick googled SO thread about the same problem (albeit it's a bit old, but some edits are relatively fresh): https://stackoverflow.com/questions/26179269/xcode-6-localization-of-plurals-genders-with-xliff

On the other hand, this tool seem to handle both XLIFF and Gettext and a bunch of other formats, so if you really need some features of XLIFF then go for it :) https://toolkit.translatehouse.org/ https://github.com/translate/translate

Tallefer avatar Oct 14 '21 00:10 Tallefer

good lord.

to be honest though, it's not a particularly text-heavy game - is that really a big problem?

jukibom avatar Oct 14 '21 08:10 jukibom

That's why I leave it up to you, since I'm a kind of a perfectionist and a bit too much emotionally invested than necessary after seeing that even such projects as GIMP don't use Gettext features properly. %)

Two easy obvious ways: use more icons, less text (you did that, at least in some menus); or/and deliberately use less complex and more "hand-crafted" text constructions with less in-line variables (I guess most devs tend to do that reflectively after their first encounters with i18n :D )

And of course feel free to disregard all of that and use whatever is more comfortable for you at the moment, I'm fine with that :)

Tallefer avatar Oct 14 '21 14:10 Tallefer

As we're starting to consider loading hints and tutorial text, I'm bumping this up in priority. There's an ENORMOUS amount of text in the game already.

jukibom avatar Jul 03 '23 13:07 jukibom