Skip to content

Commit

Permalink
Fix tests for chinese
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeTappert committed Jul 10, 2024
1 parent b7b7c26 commit f2dfcc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/localization/battle-stat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ describe("Test for BattleStat Localization", () => {
it("Test getBattleStatLevelChangeDescription() in 简体中文", async () => {
i18next.changeLanguage("zh-CN");
battleStatLevelUnits.forEach(unit => {
// In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix.
unit.key = unit.key.replace("one", "other");
testBattleStatLevelChangeDescription(unit.levels, unit.up, zhCnBattleStat[unit.key], unit.changedStats);
});
});
Expand All @@ -186,6 +188,8 @@ describe("Test for BattleStat Localization", () => {
it("Test getBattleStatLevelChangeDescription() in 繁體中文", async () => {
i18next.changeLanguage("zh-TW");
battleStatLevelUnits.forEach(unit => {
// In i18next, the pluralization rules are language-specific, and Chinese only supports the _other suffix.
unit.key = unit.key.replace("one", "other");
testBattleStatLevelChangeDescription(unit.levels, unit.up, zhTwBattleStat[unit.key], unit.changedStats);
});
});
Expand Down

0 comments on commit f2dfcc5

Please sign in to comment.