Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/tooltips.js
Show First 20 Lines • Show All 1,204 Lines • ▼ Show 20 Lines | function showTemplateViewerOnRightClickTooltip() | ||||
return translate("Right-click to view more information."); | return translate("Right-click to view more information."); | ||||
} | } | ||||
function showTemplateViewerOnClickTooltip() | function showTemplateViewerOnClickTooltip() | ||||
{ | { | ||||
// Translation: Appears in a tooltip to indicate that clicking the corresponding GUI element will open the Template Details GUI page. | // Translation: Appears in a tooltip to indicate that clicking the corresponding GUI element will open the Template Details GUI page. | ||||
return translate("Click to view more information."); | return translate("Click to view more information."); | ||||
} | } | ||||
/** | |||||
* Large numbers are shortened. | |||||
Freagarach: Or something alike. | |||||
*/ | |||||
function shortLargeNumbers(num) { | |||||
Not Done Inline ActionsabbreviateLargeNumbers wraitii: `abbreviateLargeNumbers` | |||||
Not Done Inline ActionsWhy num and not number? Silier: Why num and not number?
You dont get anything making it shorter and it is not so long that it… | |||||
Not Done Inline Actions{ to new line Silier: `{` to new line | |||||
if (num >= 1000000) { | |||||
Not Done Inline Actionsalso, one lines, so please remove { } Silier: also, one lines, so please remove { } | |||||
return Math.floor(num / 1000000) + translateWithContext("One letter abbreviation for million", 'M'); | |||||
} | |||||
if (num >= 100000) { | |||||
return Math.floor(num / 1000) + 'k'; | |||||
Not Done Inline ActionsThese ks should be translated too. Freagarach: These `k`s should be translated too. | |||||
Not Done Inline ActionsTranslatewithcontext ? Silier: Translatewithcontext ? | |||||
} | |||||
if (num >= 1000) { | |||||
return (num / 1000).toFixed(1).replace(/\.0$/, '') + 'k'; | |||||
Not Done Inline ActionsSame? Silier: Same? | |||||
} | |||||
return num; | |||||
} |
Wildfire Games · Phabricator
Or something alike.