fix: handle apostrophes for names ending in x (#4343)
* fix: handle apostrophes for names ending in x * review --------- Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
co-authored by
Alexandr
parent
b0b14091e7
commit
ea6ef1124d
+1
-3
@@ -254,9 +254,7 @@ const renderStatsCard = (stats, options = {}) => {
|
||||
theme,
|
||||
});
|
||||
|
||||
const apostrophe = ["x", "s"].includes(name.slice(-1).toLocaleLowerCase())
|
||||
? ""
|
||||
: "s";
|
||||
const apostrophe = /s$/i.test(name.trim()) ? "" : "s";
|
||||
const i18n = new I18n({
|
||||
locale,
|
||||
translations: statCardLocales({ name, apostrophe }),
|
||||
|
||||
Reference in New Issue
Block a user