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="status-text memos-text">
<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 className="status-text tags-text">
<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 className="status-text duration-text">
<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>
</>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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