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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamehost translates the name of computer players in its locale #5991

Open
SimonHeimberg opened this issue Jul 4, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@SimonHeimberg
Copy link
Contributor

SimonHeimberg commented Jul 4, 2023

Describe the bug
The gamehost translates the player name of computer players. This name is transmitted to the clients.

馃憤 This makes sense because then all players talk about the same players (with the same name and numbers).
馃憥 But this does not make sense because this mixes languages when host and client do not have the same locale.
bad case for 馃憥 : Your host has Arabic (or any other language with special letters) configured as language. You join from a computer showing English. Now you see Arabic letters as player name for computer players. Doing diplomacy like this is quite confusing. As developer: The host has set a player name with non-ascii letters, which is not allowed as typed player names.

To reproduce
Steps to reproduce the behaviour:

  1. Start widelands with arabic language setting (LANG=ar widelands in a shell or ...)

  2. Type p for a local network game

  3. Prepare a game to host (select a map)

  4. Start another instance of widelands with normal language setting (can be on the same computer)

  5. Type p for a local network game

  6. Choose the game on the left and confirm with OK (or double click)

  7. Go Back on the first game instance (the Arabic one)

  8. Start the game

  9. Go to the second game instance (the english one)

  10. Open the diplomacy dialogue

  11. It shows Latin and Arabic letters 馃槻

Expected behavior
Not sure what is best to happen. Translating results in text with mixed language if it is done on the host. If it is done on the client it results in different player names (plus different numbers in case of name conflicts in some locales).
Maybe not translating computer player names ("Computer 1" for all languages)?

Version:

  • OS: Debian, flatpak
  • Widelands Version: "v1.1"

Additional context
The gamehost sets the name here:
src/network/gamehost.cc

no problem, as long as random maps do not work for network games (in case this is the dialogue for editing only, no problem probably anyway):
src/editor/ui_menus/main_menu_random_map.cc

@SimonHeimberg SimonHeimberg added the bug Something isn't working label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant