Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2952 closed task (fixed)

[PATCH] Use nested repeat tags in the summary screen xml

Reported by: leper Owned by: trompetin17
Priority: Should Have Milestone: Alpha 18
Component: UI & Simulation Keywords:
Cc: Patch:

Description

r16034 added nested repeat tags (see the repeat GUI object documentation for an example). The summary screen (binaries/data/mods/public/gui/summary.xml is using similar object names because that support was missing previously.

Those objects can now be changed to have multiple nested repeats to make the xml file a lot more readable. The summary.js file will need some changes so that the names are properly constructed.

Attachments (8)

2952.diff (56.0 KB ) - added by trompetin17 9 years ago.
2952.2.diff (119.8 KB ) - added by trompetin17 9 years ago.
2952.3.diff (120.7 KB ) - added by trompetin17 9 years ago.
2952.4.diff (120.7 KB ) - added by trompetin17 9 years ago.
2952.5.diff (121.1 KB ) - added by trompetin17 9 years ago.
2952.6.diff (121.5 KB ) - added by trompetin17 9 years ago.
2952.7.diff (121.5 KB ) - added by trompetin17 9 years ago.
2952.8.diff (121.2 KB ) - added by trompetin17 9 years ago.

Download all attachments as: .zip

Change History (19)

by trompetin17, 9 years ago

Attachment: 2952.diff added

comment:1 by trompetin17, 9 years ago

Keywords: review patch added
Milestone: BacklogAlpha 18
Summary: Use nested repeat tags in the summary screen xml[PATCH]Use nested repeat tags in the summary screen xml

comment:2 by leper, 9 years ago

Keywords: review removed

There are still countless duplicate elements (teamBox, etc) that should be moved and sized by the js and use one object with a few others below it.

by trompetin17, 9 years ago

Attachment: 2952.2.diff added

in reply to:  2 comment:3 by trompetin17, 9 years ago

Owner: set to trompetin17
Status: newassigned

Done, this new patch only use one panel container, I added two js helpers.

Let me know what do you think about it.

tested with:

  • No team
  • All teams
  • One without team
  • Compared with the old one

Replying to leper:

There are still countless duplicate elements (teamBox, etc) that should be moved and sized by the js and use one object with a few others below it.

comment:4 by Stan, 9 years ago

Keywords: review added

by trompetin17, 9 years ago

Attachment: 2952.3.diff added

by trompetin17, 9 years ago

Attachment: 2952.4.diff added

by trompetin17, 9 years ago

Attachment: 2952.5.diff added

comment:5 by trompetin17, 9 years ago

Fixed itms :)

comment:6 by Itms, 9 years ago

Hello trompetin, I am sorry but there is one problem I had not thought of: you call translate(headings[h].caption);, which won't work.

The message extraction will not detect the strings in panelsData as translatable data. So you have to write things like "caption": translate("Player name") in panelsData and then directly write things like headerGUI.caption = headings[h].caption;.

Sorry for the oversight!

in reply to:  6 comment:7 by trompetin17, 9 years ago

I tested in my local enviroment, and it is translate, could we chat about it on IRC when you have time please? Replying to Itms:

Hello trompetin, I am sorry but there is one problem I had not thought of: you call translate(headings[h].caption);, which won't work.

The message extraction will not detect the strings in panelsData as translatable data. So you have to write things like "caption": translate("Player name") in panelsData and then directly write things like headerGUI.caption = headings[h].caption;.

Sorry for the oversight!

comment:8 by Itms, 9 years ago

I can't connect right now, I'll be there in an hour or so. You should read wiki:Internationalization in the meantime, to understand the problem.

by trompetin17, 9 years ago

Attachment: 2952.6.diff added

in reply to:  8 comment:9 by trompetin17, 9 years ago

Don´t worry, leper help me about it :), now I guess I got it, I updated the patch

Replying to Itms:

I can't connect right now, I'll be there in an hour or so. You should read wiki:Internationalization in the meantime, to understand the problem.

by trompetin17, 9 years ago

Attachment: 2952.7.diff added

by trompetin17, 9 years ago

Attachment: 2952.8.diff added

comment:10 by Itms, 9 years ago

Resolution: fixed
Status: assignedclosed

In 16240:

Big cleanup of the summary page internals, making use of nested tags in the xml and organizing the logic in a more flexible way.

Patch by trompetin17, fixes #2952.

comment:11 by Itms, 9 years ago

Keywords: simple gui patch review removed
Summary: [PATCH]Use nested repeat tags in the summary screen xml[PATCH] Use nested repeat tags in the summary screen xml

Thanks a lot for this great patch!

Note: See TracTickets for help on using tickets.