UI: Added new locale-aware and configurable number formatting (#354)

This commit is contained in:
Snarling
2023-02-11 13:18:50 -05:00
committed by GitHub
parent 1f5546b721
commit b4074328ec
1231 changed files with 4233 additions and 11958 deletions
+7 -7
View File
@@ -2,7 +2,7 @@ import React from "react";
import { Reviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
import { CONSTANTS } from "../Constants";
import { LocationName } from "../Enums";
import { numeralWrapper } from "../ui/numeralFormat";
import { formatExp } from "../ui/formatNumber";
import { dialogBoxCreate } from "../ui/React/DialogBox";
import { Money } from "../ui/React/Money";
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
@@ -122,12 +122,12 @@ export class ClassWork extends Work {
you spent a total of <Money money={-this.earnings.money} />. <br />
<br />
You earned a total of: <br />
{numeralWrapper.formatExp(this.earnings.hackExp)} hacking exp <br />
{numeralWrapper.formatExp(this.earnings.strExp)} strength exp <br />
{numeralWrapper.formatExp(this.earnings.defExp)} defense exp <br />
{numeralWrapper.formatExp(this.earnings.dexExp)} dexterity exp <br />
{numeralWrapper.formatExp(this.earnings.agiExp)} agility exp <br />
{numeralWrapper.formatExp(this.earnings.chaExp)} charisma exp
{formatExp(this.earnings.hackExp)} hacking exp <br />
{formatExp(this.earnings.strExp)} strength exp <br />
{formatExp(this.earnings.defExp)} defense exp <br />
{formatExp(this.earnings.dexExp)} dexterity exp <br />
{formatExp(this.earnings.agiExp)} agility exp <br />
{formatExp(this.earnings.chaExp)} charisma exp
<br />
</>,
);