feat: implement plurals for stats (#783)

* implement plurals for stats

* renamed variables

* modified according to 18n guide
This commit is contained in:
Jasper Platenburg 2022-12-20 14:29:10 +01:00 committed by GitHub
parent a23de50bb8
commit 3b41976866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 51 additions and 27 deletions

View file

@ -116,15 +116,15 @@ const UserBanner = () => {
<div className="amount-text-container"> <div className="amount-text-container">
<div className="status-text memos-text"> <div className="status-text memos-text">
<span className="amount-text">{memoAmount}</span> <span className="amount-text">{memoAmount}</span>
<span className="type-text">{t("amount-text.memo")}</span> <span className="type-text">{t("amount-text.memo", { count: memoAmount })}</span>
</div> </div>
<div className="status-text tags-text"> <div className="status-text tags-text">
<span className="amount-text">{tags.length}</span> <span className="amount-text">{tags.length}</span>
<span className="type-text">{t("amount-text.tag")}</span> <span className="type-text">{t("amount-text.tag", { count: tags.length })}</span>
</div> </div>
<div className="status-text duration-text"> <div className="status-text duration-text">
<span className="amount-text">{createdDays}</span> <span className="amount-text">{createdDays}</span>
<span className="type-text">{t("amount-text.day")}</span> <span className="type-text">{t("amount-text.day", { count: createdDays })}</span>
</div> </div>
</div> </div>
</> </>

View file

@ -191,9 +191,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMOS", "memo_one": "MEMO",
"tag": "TAGS", "memo_other": "MEMOS",
"day": "TAGE" "tag_one": "TAG",
"tag_other": "TAGS",
"day_one": "TAG",
"day_other": "TAGE"
}, },
"message": { "message": {
"no-memos": "Keine Memos 🌃", "no-memos": "Keine Memos 🌃",

View file

@ -191,9 +191,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMO", "memo_one": "MEMO",
"tag": "TAG", "memo_other": "MEMOS",
"day": "DAY" "tag_one": "TAG",
"tag_other": "TAGS",
"day_one": "DAY",
"day_other": "DAYS"
}, },
"message": { "message": {
"no-memos": "no memos 🌃", "no-memos": "no memos 🌃",

View file

@ -191,9 +191,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "NOTAS", "memo_one": "NOTA",
"tag": "TAGS", "memo_other": "NOTAS",
"day": "DÍAS" "tag_one": "ETIQUETA",
"tag_other": "ETIQUETAS",
"day_one": "DÍA",
"day_other": "DÍAS"
}, },
"message": { "message": {
"no-memos": "no hay notas 🌃", "no-memos": "no hay notas 🌃",

View file

@ -186,9 +186,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMO", "memo_one": "MEMO",
"tag": "ÉTIQUETTE", "memo_other": "MEMOS",
"day": "JOUR" "tag_one": "ÉTIQUETTE",
"tag_other": "ÉTIQUETTES",
"day_one": "JOUR",
"day_other": "JOURS"
}, },
"message": { "message": {
"no-memos": "pas de mémos 🌃", "no-memos": "pas de mémos 🌃",

View file

@ -185,9 +185,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMO", "memo_one": "MEMO",
"tag": "LABEL", "memo_other": "MEMOS",
"day": "DAG" "tag_one": "LABEL",
"tag_other": "LABELS",
"day_one": "DAG",
"day_other": "DAGEN"
}, },
"message": { "message": {
"no-memos": "geen memos 🌃", "no-memos": "geen memos 🌃",

View file

@ -191,9 +191,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "ANTECKNING", "memo_one": "ANTECKNING",
"tag": "TAGG", "memo_other": "ANTECKNINGAR",
"day": "DAG" "tag_one": "TAGG",
"tag_other": "TAGGAR",
"day_one": "DAG",
"day_other": "DAGAR"
}, },
"message": { "message": {
"no-memos": "inga anteckningar 🌃", "no-memos": "inga anteckningar 🌃",

View file

@ -185,9 +185,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMO", "memo_one": "MEMO",
"tag": "THẺ", "memo_other": "MEMO",
"day": "NGÀY" "tag_one": "THẺ",
"tag_other": "THẺ",
"day_one": "NGÀY",
"day_other": "NGÀY"
}, },
"message": { "message": {
"no-memos": "Không có memo nào 🌃", "no-memos": "Không có memo nào 🌃",

View file

@ -191,9 +191,12 @@
} }
}, },
"amount-text": { "amount-text": {
"memo": "MEMO", "memo_one": "MEMO",
"tag": "TAG", "memo_other": "MEMOS",
"day": "DAY" "tag_one": "TAG",
"tag_other": "TAGS",
"day_one": "DAY",
"day_other": "DAYS"
}, },
"message": { "message": {
"no-memos": "没有 Memo 了 🌃", "no-memos": "没有 Memo 了 🌃",