#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)
Change History (19)
by , 9 years ago
comment:1 by , 9 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 18 |
Summary: | Use nested repeat tags in the summary screen xml → [PATCH]Use nested repeat tags in the summary screen xml |
follow-up: 3 comment:2 by , 9 years ago
Keywords: | review removed |
---|
by , 9 years ago
Attachment: | 2952.2.diff added |
---|
comment:3 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
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 , 9 years ago
Keywords: | review added |
---|
by , 9 years ago
Attachment: | 2952.3.diff added |
---|
by , 9 years ago
Attachment: | 2952.4.diff added |
---|
by , 9 years ago
Attachment: | 2952.5.diff added |
---|
follow-up: 7 comment:6 by , 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!
comment:7 by , 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")
inpanelsData
and then directly write things likeheaderGUI.caption = headings[h].caption;
.Sorry for the oversight!
follow-up: 9 comment:8 by , 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 , 9 years ago
Attachment: | 2952.6.diff added |
---|
comment:9 by , 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 , 9 years ago
Attachment: | 2952.7.diff added |
---|
by , 9 years ago
Attachment: | 2952.8.diff added |
---|
comment:11 by , 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!
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.