modpack icon indicating copy to clipboard operation
modpack copied to clipboard

Translation support

Open LegendaryGuard opened this issue 2 years ago • 6 comments
trafficstars

I think it's a suggestion that might be worth trying. Stuff like that could be translated: https://github.com/MarioSMB/modpack/blob/master/mod/common/notifications.qh#L17

More info about the translation features that xonotic-data.pk3dir contains:

The way translation files are generated require that anything inside _() must be a literal. xgettext expects strings to be inside _() in the .qc and .qh files.

It will require transifex to connect to the repository.

LegendaryGuard avatar Jun 22 '23 23:06 LegendaryGuard

I forked this repo and have a branch that made some bit more strings to be translatable. That is (currently) almost for my own need, for my community server.

And yes, it’s okay to do it now — I just have Xon+SMB translation for Chinese here. They are applied to my community server, almost perfectly.

That infrastructure is very special, but proves this idea’s possiblity.

edit: fix broken link

NaitLee avatar Aug 05 '23 17:08 NaitLee

It's true that the repository uses Xonotic as submodule, so in this part, it complicates things a bit.

Btw, there's a repository as example to add a transifex bot. I wonder if it can be useful to translate the strings of the repository.

Nice to know there are strategies to get the modpack with translation support! 👍 The process of getting Xonotic codebase with the script could combine the .po files of the modpack and the submodule ones if Xonotic codebase is successfully downloaded.

I'll test the files from your shared links when I'm available.

LegendaryGuard avatar Aug 05 '23 19:08 LegendaryGuard

I have successfully created a general infrastructure (scripts) for localization in my branch (notice this section) and integrated transifex (you can see bot commits).

My "team" is at here for you to join and try out: https://explore.transifex.com/naitlee-soft/test-smbmod/ Current setting is when a language progress is > 50% then it's committed directly to that branch.

Don't forget to try to build SMB code of that branch (which have more strings wrapped in _()) to try out localizations (pk3 built at the same time).

If everything's ok, you decide what to do with all of these... :)

NaitLee avatar Jan 18 '24 16:01 NaitLee

Interesting. Great job! I would like to merge your repository in the main one. I wonder if transifex could link to the main repository (here). Anyway, something like that is ok for me.

LegendaryGuard avatar Jan 25 '24 17:01 LegendaryGuard

Oh wow, I am genuinely surprised to see such attention brought to this mod, the work you've done is impressive!

I'd be more than happy to see your efforts merged into the main branch, with one note to make; there are a few server-side strings that have been translated, these won't work properly in translation.
Things like centerprint() calls in server code would need to be changed to Send_Notification, which is the mechanism for sending translatable messages to the client side. The tougher of these will be the radio messages, as they are rather complicated in nature.

If needed I don't mind rewriting those lines as notifications as the system can be a bit hard to work with, just let me know - apologies for not making them translatable to begin with, I must admit I never imagined anyone translating this project!

MarioSMB avatar Jan 26 '24 01:01 MarioSMB

Before merging we need to consider that, who to manage a Transifex team for this mod.
I have my “team” managing my branch. Once its merged to main (or better a testing branch managed by you) you will need to create and configure your own transifex team & project. (won't be too complicated tho)

About the server-side strings... as said earlier “they are for my own need” :)
I hosts a smb server primarily for domestic players and have set server-side language to Chinese, for not overwhelming players.
(and current Chinese translations for these strings also have English side notes)

It’s definitely better for them to be client-side strings.

NaitLee avatar Jan 26 '24 07:01 NaitLee