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

Add localization support for server messages #2616

Closed
wants to merge 4 commits into from

Conversation

def-
Copy link
Member

@def- def- commented Aug 20, 2020

by translating them on client-side.

Texts containing %s/%d are hard this way, replaced some, didn't localize some others. But I guess even incomplete this is better than nothing.

The reason not to do it serverside is because you might have to translate to different language for each player.

by translating them on client-side.

Texts containing %s/%d are hard this way, replaced some, didn't localize
some others. But I guess even incomplete this is better than nothing.

The reason not to do it serverside is because you might have to
translate to different language for each player.
@fokkonaut
Copy link
Contributor

Should be done serverside. Server should pop up a voting window when joining a server asking to translate to your language based on IP Address, hitting F3 accepts. Otherwise language should be choosable by /language en/de/ru/tr/idk

@Learath2
Copy link
Member

That sounds like a whole lot of trouble for minimal gain (e.g. vanilla getting translated lines)

@def-
Copy link
Member Author

def- commented Aug 20, 2020

Oh no, I thought about this too simply. It doesn't actually work for replacing parts of texts and doing so will be quite hacky.

Should we go through all the translation texts to find one that matches substrings? Otherwise I guess this really has to be done server-side, but then it's too much work for me to do it quickly.

@bonobo-craft
Copy link
Contributor

bonobo-craft commented Aug 20, 2020

Consider using terms not English strings as keys. Like game.mod.infcroya.class.biologist.title

Rationale behind this is more common in game industry is that English strings will be changed too (typos, renames and so on) but you will have to use old strings as keys forever. This way it's working in some localisation libraries and localisation SaaS like poeditor.com.

@def-
Copy link
Member Author

def- commented Aug 20, 2020

Yes, that's clearly better, but I'm not planning to clean up the entire code base in this change :)

Still missing:

- scripts/languages needs to create ~~ instead of == if the file is in
  server
- lots of strings with Console()->Print(...) left to Localize

I'm not sure if I like this PR so much anymore. Thoughts?
@def-
Copy link
Member Author

def- commented Aug 20, 2020

Fix up the server translation support

Still missing:

  • scripts/languages needs to create ~~ instead of == if the file is in
    server
  • lots of strings with Console()->Print(...) left to Localize

I'm not sure if I like this PR so much anymore. Thoughts?


Server does not allow voting to move players to spectators
== Server erlaubt keine Abstimmungen um Spiler zu Beobachtern zu verschieben
~~ Server erlaubt keine Abstimmungen um Spiler zu Beobachtern zu verschieben
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spiler xd

@heinrich5991
Copy link
Member

I might take a look at it to do it without sacrificing the ability to change English strings.

@def- def- closed this Aug 25, 2020
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 this pull request may close these issues.

None yet

5 participants