fix: names ending in "X" or "S" (#612)

* Update stats-card.js

* Update stats-card.js
This commit is contained in:
Nathan Chu
2020-11-04 13:03:14 -05:00
committed by GitHub
parent 9ca5039e55
commit 6e82cfb32d
+1 -1
View File
@@ -77,7 +77,7 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
theme,
});
const apostrophe = ["x", "s"].includes(name.slice(-1)) ? "" : "s";
const apostrophe = ["x", "s"].includes(name.slice(-1).toLocaleLowerCase()) ? "" : "s";
const i18n = new I18n({
locale,
translations: statCardLocales({ name, apostrophe }),