Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/summary/layout.js
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | "resources": { | ||||
], | ], | ||||
"teamCounterFn": calculateResourcesTeam | "teamCounterFn": calculateResourcesTeam | ||||
}, | }, | ||||
"market": { | "market": { | ||||
"caption": translate("Market"), | "caption": translate("Market"), | ||||
"headings": [ | "headings": [ | ||||
{ "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | { "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | ||||
{ "identifier": "tradeIncome", "caption": translate("Trade income"), "yStart": 16, "width": 100 }, | { "identifier": "tradeIncome", "caption": translate("Trade income"), "yStart": 16, "width": 100 }, | ||||
{ "identifier": "barterEfficency", "caption": translate("Barter efficiency"), "yStart": 16, "width": 100 }, | { "identifier": "barterEfficency", "caption": translate("Barter efficiency"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
...g_ResourceData.GetResources().map(res => { | ...g_ResourceData.GetResources().map(res => { | ||||
return { | return { | ||||
"identifier": res.code, | "identifier": res.code, | ||||
"caption": | "caption": | ||||
// Translation: use %(resourceWithinSentence)s if needed | // Translation: use %(resourceWithinSentence)s if needed | ||||
sprintf(translate("%(resourceFirstWord)s exchanged"), { | sprintf(translate("%(resourceFirstWord)s exchanged"), { | ||||
"resourceFirstWord": resourceNameFirstWord(res.code), | "resourceFirstWord": resourceNameFirstWord(res.code), | ||||
"resourceWithinSentence": resourceNameWithinSentence(res.code) | "resourceWithinSentence": resourceNameWithinSentence(res.code) | ||||
Show All 15 Lines | "market": { | ||||
], | ], | ||||
"teamCounterFn": calculateMarketTeam | "teamCounterFn": calculateMarketTeam | ||||
}, | }, | ||||
"misc": { | "misc": { | ||||
"caption": translate("Miscellaneous"), | "caption": translate("Miscellaneous"), | ||||
"headings": [ | "headings": [ | ||||
{ "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | { "identifier": "playername", "caption": translate("Player name"), "yStart": 26, "width": 200 }, | ||||
{ "identifier": "killDeath", "caption": translate("Kill / Death ratio"), "yStart": 16, "width": 100, "format": "DECIMAL2" }, | { "identifier": "killDeath", "caption": translate("Kill / Death ratio"), "yStart": 16, "width": 100, "format": "DECIMAL2" }, | ||||
{ "identifier": "mapControlPeak", "caption": translate("Map control (peak)"), "yStart": 16, "width": 100 }, | { "identifier": "mapControlPeak", "caption": translate("Map control (peak)"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
{ "identifier": "mapControl", "caption": translate("Map control (finish)"), "yStart": 16, "width": 100 }, | { "identifier": "mapControl", "caption": translate("Map control (finish)"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
{ "identifier": "mapExploration", "caption": translate("Map exploration"), "yStart": 16, "width": 100 }, | { "identifier": "mapExploration", "caption": translate("Map exploration"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
{ "identifier": "vegetarianRatio", "caption": translate("Vegetarian ratio"), "yStart": 16, "width": 100 }, | { "identifier": "vegetarianRatio", "caption": translate("Vegetarian ratio"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
{ "identifier": "feminization", "caption": translate("Feminization"), "yStart": 16, "width": 100 }, | { "identifier": "feminization", "caption": translate("Feminization"), "yStart": 16, "width": 100, "format": "PERCENTAGE" }, | ||||
{ | { | ||||
"identifier": "bribes", | "identifier": "bribes", | ||||
"caption": translate("Bribes"), | "caption": translate("Bribes"), | ||||
"headerCaption": sprintf(translate("Bribes\n(%(succeeded)s / %(failed)s)"), | "headerCaption": sprintf(translate("Bribes\n(%(succeeded)s / %(failed)s)"), | ||||
{ | { | ||||
"succeeded": getColoredTypeTranslation("succeeded"), | "succeeded": getColoredTypeTranslation("succeeded"), | ||||
"failed": getColoredTypeTranslation("failed") | "failed": getColoredTypeTranslation("failed") | ||||
}), | }), | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator