Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#3304 closed defect (fixed)

[PATCH] 'The Developer Overlay was opened.' is translated in the wrong place

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

If you open the developers overlay with Alt+D, then your computer translates this message and sends it via the ingame chat.

However it should be translated after it was received, so that everyone can read this message in the language that is currently set.

On unix you can open two instances of 0ad, change the language setting in one and host a multiplayer game to reproduce the issue.

Attachments (2)

fixes_for_issue_3304.patch (1.8 KB ) - added by Sergey Kushnirenko 8 years ago.
fixes_for_issue_3304_v2.patch (2.1 KB ) - added by Sergey Kushnirenko 8 years ago.

Download all attachments as: .zip

Change History (8)

by Sergey Kushnirenko, 8 years ago

Attachment: fixes_for_issue_3304.patch added

comment:1 by Sergey Kushnirenko, 8 years ago

Keywords: review patch added
Milestone: BacklogAlpha 20
Summary: 'The Developer Overlay was opened.' is translated in the wrong place[PATCH] 'The Developer Overlay was opened.' is translated in the wrong place

by Sergey Kushnirenko, 8 years ago

comment:2 by elexis, 8 years ago

Keywords: review removed
  • The strings to be translated are extracted by the extractor. It checks all files for translate, markForTranslation and related calls. It can only work in case the argument of these calls is a string, not an expression like "x" + "y".
  • Dont' reinvent but reuse methods (submitChatDirectly)
  • "/translate" instead of "/raw" would fit better
  • Instead of using such an implementation, better send a simulation command of type aichat

comment:3 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 17789:

Translate the developer-overlay notification at the receiving end, fixes #3304.

comment:4 by elexis, 8 years ago

Keywords: simple removed

comment:5 by elexis, 7 years ago

r17789 doesn't work with observers opening the developer overlay, as they can't send simulation commands. This issue becomes more prevalent if we want to add more GUI messages, for example when changing the perspective to another player. So we have to use the regular chat network message instead of a simulation command, hence /translate in conjunction with markForTranslation if we want to translate clientside in all cases, not too far from your approach.

comment:6 by elexis, 7 years ago

In 20055:

Display untranslated developer overlay chat message if an observer opens it (rather than no message at all) following rP17789.

Remove a TODO from rP18441 (message boxes should never be closed automatically because they require a user decision).

Differential Revision: https://code.wildfiregames.com/D830
Refs #3304

Note: See TracTickets for help on using tickets.