Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Or stock number in yellow color (maybe better seeable, maybe little darker yellow like golden) aha yellow seems fine to me
Review:
(01:41:43) elexis: that \n should be in the sprintf string
(01:42:13) elexis: type should be resourceType so that translators know what its about
(01:42:17) elexis: can do when committing, yes
(01:42:33) elexis: and stock -> resourceCount
(01:43:18) elexis: order of sprintf arguments should correspond to the order of occurrences in the string
(01:43:49) elexis: weird ternary whitespace
(01:46:10) elexis: I'd suggest to not translate the \n and split that code
(01:46:30) elexis: thoug htranslating it is nice
(01:50:10) elexis: also Stock -> stock
(01:51:48) elexis: ah you added the \n there since it's conditional
(01:52:13) elexis: then translators can't relocate it well, so it can be non-translated too
function formatTributeTooltip(playerID, resourceCode, amount) { let tooltip = sprintf(translate("Tribute %(resourceAmount)s %(resourceType)s to %(playerName)s. Shift-click to tribute %(greaterAmount)s."), { "resourceAmount": amount, "resourceType": resourceNameWithinSentence(resourceCode), "playerName": colorizePlayernameByID(playerID), "greaterAmount": amount < 500 ? 500 : amount + 500 }); if (g_IsObserver || (GetSimState().players[g_ViewedPlayer].hasSharedLos && g_Players[playerID].isMutualAlly[g_ViewedPlayer])) tooltip += "\n" + sprintf(translate("Current stock: %(resourceCount)s %(resourceType)s"), { "resourceType": resourceNameWithinSentence(resourceCode), "resourceCount": Math.round(GetSimState().players[playerID].resourceCounts[resourceCode]) }) return tooltip; }
The only thing that hinders me committing this is that the tooltip is not updated when doing a batch tribute. It appears that the donation wasn't received and the player might assume that the ally still has too few res.
binaries/data/mods/public/gui/session/menu.js | ||
---|---|---|
1288 | Maybe "Your %(resourceType)s Stock:..." is enough. So "-own". |