Opened 6 years ago

Closed 7 months ago

#3307 closed defect (wontfix)

Translate botnames in the GUI of every client or replays

Reported by: elexis Owned by:
Priority: If Time Permits Milestone:
Component: UI – Miscellaneous Keywords:
Cc: Patch:

Description (last modified by elexis)

Currently the botnames are translated by the host and broadcasted to the other clients. This means if a chinese player hosts, everyone has chinese botnames.

The correct way to translate botnames would be to save the english name and the roman number in gamesetup.js to g_GameAttributes and then translate playernames everywhere in the GUI in case its a bot.

Notice that we can't simply translate in the simulation code, since that would make the gamestates out of sync.

Sometimes the name is accessed by the player assignments, sometimes by the Player component, sometimes by the simulation state. We have to identify all places in the GUI where a playername is used and translate it just in time.

Originally reported in ticket:3253#comment:5.

Change History (8)

comment:1 by elexis, 6 years ago

Summary: Translate botnames correctlyTranslate botnames in the GUI of every client

It would also be a bit hindering to the chat if the AI players have different names for different clients (in particular autocomplete doesn't work then). Attack-requests will have to be considered too.

comment:2 by elexis, 6 years ago

Priority: Should HaveIf Time Permits

comment:3 by elexis, 6 years ago

In 17382:

Don't translate botnames in multiplayer games (so names are in english instead of the language of the host). Refs #3307

comment:4 by elexis, 4 years ago

translate("%(playerName)s %(romanNumber)s") still translated in MP games

comment:5 by elexis, 4 years ago

Description: modified (diff)

I'm not sure anymore whether displaying a different playername for every client is a good idea, because the names will be referenced in the players chat!

However the same change will be needed if we want to display a different name from the simulation (f.e. include the rating in the name without saving the rating in the name) or if we want to call escapeText everywhere.

comment:6 by Itms, 2 years ago

Component: UI & SimulationUI – Miscellaneous

comment:7 by elexis, 21 months ago

Milestone: Backlog
Summary: Translate botnames in the GUI of every clientTranslate botnames in the GUI of every client or replays

Translating the botnames in the GUI of networked clients would have the effect that client1 doesn't know which player client2 is talking about. (In the worst but unlikely case, the translations could even swap playernames).

If anything it could be performed for replays. (This would have the lesser problem that players sharing the replay will refer to different playernames, but thats already the case with other translated strings, so it should be feasible for replays.)

comment:8 by stanislas69, 7 months ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.