Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation support #54

Open
LegendaryGuard opened this issue Jun 22, 2023 · 6 comments · May be fixed by #55
Open

Translation support #54

LegendaryGuard opened this issue Jun 22, 2023 · 6 comments · May be fixed by #55

Comments

@LegendaryGuard
Copy link
Collaborator

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.

@NaitLee
Copy link

NaitLee commented Aug 5, 2023

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

@LegendaryGuard
Copy link
Collaborator Author

LegendaryGuard commented Aug 5, 2023

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.

@NaitLee
Copy link

NaitLee commented Jan 18, 2024

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... :)

@LegendaryGuard
Copy link
Collaborator Author

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.

@MarioSMB
Copy link
Owner

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!

@NaitLee
Copy link

NaitLee commented Jan 26, 2024

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 NaitLee linked a pull request Feb 8, 2024 that will close this issue
@LegendaryGuard LegendaryGuard linked a pull request May 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants