Skip to content

Commit

Permalink
✨ feat(i18n): implement pluralization logic (welpo#277)
Browse files Browse the repository at this point in the history
Co-authored-by: welpo <welpo@users.noreply.github.com>
  • Loading branch information
2 people authored and Smtbook committed Feb 29, 2024
1 parent f515c28 commit ca7817e
Show file tree
Hide file tree
Showing 22 changed files with 367 additions and 143 deletions.
33 changes: 24 additions & 9 deletions i18n/ar.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ full_stop = "." # Used at the end of a sentence.
blog = "التدوينات"
archive = "الأرشيف"
tags = "الوسوم"
projects = "مشاريعي" # Change this to "المشاريع" if the site is for an organization.
about = "عني" # Change this to "عنا" or "من نحن" if the site is for an organization.
contact = "تواصل معي" # Change this to "تواصل معنا" if the site is for an organization.
projects = "مشاريعي" #Change this to "المشاريع" if the site is for an organization.
about = "عني" #Change this to "عنا" or "من نحن" if the site is for an organization.
contact = "تواصل معي" #Change this to "تواصل معنا" if the site is for an organization.
privacy = "الخصوصية"
site_statistics = "إحصائيات المدونة"
sitemap = "خريطة المدونة"
Expand All @@ -23,13 +23,18 @@ sitemap = "خريطة المدونة"
search = "بحث"
search_icon_title = "أنقر هنا أو اضغط $SHORTCUT لفتح البحث" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "مسح البحث"
result = "نتيجة" # "1 result"
results = "نتائج" # "3 results" (also used for 0 results).
zero_results = "لم يتم العثور على نتائج" #No search results.
one_results = "تم العثور على نتيجة واحدة" # One search result.
two_results = "تم العثور على نتيجتين" # Two search results.
few_results = "تم العثور على $NUMBER نتائج" # for 3 to 10 search results.
many_results = "تم العثور على $NUMBER نتيجة" # 11 or more search results.

# Navigation.
read_more = "إقرأ المزيد"
post = "تدوينة"
posts = "تدوينات" # Plural of "post".
one_posts = "تدوينة واحدة" #One blog post.
two_posts = "تدوينتين" #Two blog posts.
few_posts = "$NUMBER تدوينات" #3 to 10 blog posts.
many_posts = "$NUMBER تدوينة" #11 or more blog posts.
prev = "السابق" # As in "Previous" page.
next = "التالي" # As in "Next" page.
of = "من" # E.g. Page 1 "of" 3
Expand All @@ -48,8 +53,18 @@ go_to_comments = "انتقل إلى التعليقات"

# Post metadata.
draft = "مسودة"
min_read = "دقيقة متوقعة للقراءة"
words = "كلمة"
zero_min_read = "الوقت المتوقع للقراءة: أقل من دقيقة" #Less than one minute read.
one_min_read = "الوقت المتوقع للقراءة: دقيقة واحدة" #One minute read.
two_min_read = "الوقت المتوقع للقراءة: دقيقتان" #Two minutes read.
few_min_read = "الوقت المتوقع للقراءة: $NUMBER دقائق" #3 to 10 minutes read.
many_min_read = "الوقت المتوقع للقراءة: $NUMBER دقيقة" #11 or more minutes read.

zero_words = "لا توجد كلمات" # No words.
one_words = "كلمة واحدة" # One word.
two_words = "كلمتين" # Two words.
few_words = "$NUMBER كلمات" # 3 to 10 words.
many_words = "$NUMBER كلمة" # 11 or more words.

last_updated_on = "آخر تحديث كان في"
see_changes = "الإطلاع على التغييرات"

Expand Down
17 changes: 11 additions & 6 deletions i18n/ca.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ sitemap = "mapa del lloc"
search = "Cercar"
search_icon_title = "Fes clic o prem $SHORTCUT per obrir la cerca" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Esborrar cerca" # Title of the X icon next to search input.
result = "resultat" # "1 result"
results = "resultats" # "3 results" (also used for 0 results).
zero_results = "No s'han trobat resultats"
one_results = "$NUMBER resultat" # "1 result"
many_results = "$NUMBER resultats" # "3 results"

# Navigation.
read_more = "Llegir més"
post = "entrada"
posts = "entrades" # Plural of "post".
one_posts = "$NUMBER entrada"
many_posts = "$NUMBER entrades"
prev = "Anterior" # As in "Previous" page.
next = "Següent" # As in "Next" page.
of = "de" # E.g. Page 1 "of" 3
Expand All @@ -43,8 +44,12 @@ go_to_comments = "Vés a la secció de comentaris"

# Post metadata.
draft = "ESBORRANY"
min_read = "min de lectura"
words = "paraules"
zero_min_read = "<1 min de lectura"
one_min_read = "$NUMBER min de lectura"
many_min_read = "$NUMBER mins de lectura"
zero_words = "Cap paraula"
one_words = "$NUMBER paraula"
many_words = "$NUMBER paraules"
last_updated_on = "Última actualizació el"
see_changes = "Veure canvis"

Expand Down
17 changes: 11 additions & 6 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ sitemap = "seitenübersicht"
search = "Suchen"
search_icon_title = "Klicken oder $SHORTCUT drücken, um die Suche zu öffnen" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Suche löschen" # Title of the X icon next to search input.
result = "ergebnis" # "1 result"
results = "ergebnisse" # "3 results" (also used for 0 results).
zero_results = "Keine Ergebnisse gefunden"
one_results = "$NUMBER Ergebnis" # "1 result"
many_results = "$NUMBER Ergebnisse" # "3 results"

# Navigation.
read_more = "Weiterlesen"
post = "beitrag"
posts = "beiträge" # Plural of "post".
one_posts = "$NUMBER Beitrag"
many_posts = "$NUMBER Beiträge"
prev = "Vorherig" # As in "Previous" page.
next = "Nächst" # As in "Next" page.
of = "von" # E.g. Page 1 "of" 3
Expand All @@ -47,8 +48,12 @@ go_to_comments = "Zum Kommentarbereich"

# Post metadata.
draft = "ENTWURF"
min_read = "min. lesedauer"
words = "wörter"
zero_min_read = "weniger als 1 Min. Lesezeit"
one_min_read = "$NUMBER Min. Lesezeit"
many_min_read = "$NUMBER Min. Lesezeit"
zero_words = "Keine Wörter"
one_words = "$NUMBER Wort"
many_words = "$NUMBER Wörter"
last_updated_on = "Zuletzt aktualisiert am"
see_changes = "Änderungen anzeigen"

Expand Down
17 changes: 11 additions & 6 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ sitemap = "sitemap"
search = "Search"
search_icon_title = "Click or press $SHORTCUT to open search" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Clear search" # Title of the X icon next to search input.
result = "result" # "1 result"
results = "results" # "3 results" (also used for 0 results).
zero_results = "No results"
one_results = "$NUMBER result" # "1 result"
many_results = "$NUMBER results" # "3 results"

# Navigation.
read_more = "Read more"
post = "post"
posts = "posts" # Plural of "post".
one_posts = "$NUMBER post"
many_posts = "$NUMBER posts" # "3 posts"
prev = "Prev" # As in "Previous" page.
next = "Next" # As in "Next" page.
of = "of" # E.g. Page 1 "of" 3
Expand All @@ -43,8 +44,12 @@ go_to_comments = "Go to the comments section"

# Post metadata.
draft = "DRAFT"
min_read = "min read"
words = "words"
zero_min_read = "<1 min read"
one_min_read = "$NUMBER min read"
many_min_read = "$NUMBER min read"
zero_words = "No words"
one_words = "$NUMBER word"
many_words = "$NUMBER words"
last_updated_on = "Last updated on"
see_changes = "See changes"

Expand Down
17 changes: 11 additions & 6 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ sitemap = "mapa del sitio"
search = "Buscar"
search_icon_title = "Haz clic o usa $SHORTCUT para abrir la búsqueda" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Borrar búsqueda" # Title of the X icon next to search input.
result = "resultado" # "1 result"
results = "resultados" # "3 results" (also used for 0 results).
zero_results = "No hay resultados"
one_results = "$NUMBER resultado"
many_results = "$NUMBER resultados"

# Navigation.
read_more = "Leer más"
post = "entrada"
posts = "entradas" # Plural of "post".
one_posts = "$NUMBER entrada"
many_posts = "$NUMBER entradas"
prev = "Anterior" # As in "Previous" page.
next = "Siguiente" # As in "Next" page.
of = "de" # E.g. Page 1 "of" 3
Expand All @@ -43,8 +44,12 @@ go_to_comments = "Ir a la sección de comentarios"

# Post metadata.
draft = "BORRADOR"
min_read = "min de lectura"
words = "palabras"
zero_min_read = "<1 min de lectura"
one_min_read = "$NUMBER min de lectura"
many_min_read = "$NUMBER mins de lectura"
zero_words = "Cero palabras"
one_words = "$NUMBER palabra"
many_words = "$NUMBER palabras"
last_updated_on = "Última actualización el"
see_changes = "Ver cambios"

Expand Down
17 changes: 11 additions & 6 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ sitemap = "plan du site"
search = "Rechercher"
search_icon_title = "Cliquez ou appuyez sur $SHORTCUT pour ouvrir la recherche" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Effacer la recherche" # Title of the X icon next to search input.
result = "résultat" # "1 result"
results = "résultats" # "3 results" (also used for 0 results).
zero_results = "Aucun résultat trouvé"
one_results = "$NUMBER résultat" # "1 result"
many_results = "$NUMBER résultats" # "3 results"

# Navigation.
read_more = "Lire plus"
post = "article"
posts = "articles" # Plural of "post".
one_posts = "$NUMBER article"
many_posts = "$NUMBER articles"
prev = "Précédent" # As in "Previous" page.
next = "Suivant" # As in "Next" page.
of = "de" # E.g. Page 1 "of" 3
Expand All @@ -47,8 +48,12 @@ go_to_comments = "Aller à la section des commentaires"

# Post metadata.
draft = "BROUILLON"
min_read = "min de lecture"
words = "mots"
zero_min_read = "<1 min de lecture"
one_min_read = "$NUMBER min de lecture"
many_min_read = "$NUMBER min de lecture"
zero_words = "aucun mot"
one_words = "$NUMBER mot"
many_words = "$NUMBER mots"
last_updated_on = "Dernière mise à jour le"
see_changes = "Voir les modifications"

Expand Down
17 changes: 11 additions & 6 deletions i18n/hi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ sitemap = "साइटमैप"
search = "खोजें"
search_icon_title = "$SHORTCUT दबाएँ या क्लिक करें खोज खोलने के लिए" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "खोज साफ करें" # Title of the X icon next to search input.
result = "परिणाम" # "1 result"
results = "परिणाम" # "3 results" (also used for 0 results).
zero_results = "कोई परिणाम नहीं मिला"
one_results = "$NUMBER परिणाम" # "1 result"
many_results = "$NUMBER परिणाम" # "3 results"

# Navigation.
read_more = "और पढ़ें"
post = "पोस्ट"
posts = "पोस्ट्स" # Plural of "post".
one_posts = "$NUMBER पोस्ट"
many_posts = "$NUMBER पोस्ट्स"
prev = "पिछला" # As in "Previous" page.
next = "अगला" # As in "Next" page.
of = "का" # E.g. Page 1 "of" 3
Expand All @@ -45,8 +46,12 @@ go_to_comments = "टिप्पणी अनुभाग में जाए

# Post metadata.
draft = "मसौदा"
min_read = "मिनट पठन समय"
words = "शब्द"
zero_min_read = "कम से कम 1 मिनट पठन समय"
one_min_read = "$NUMBER मिनट पठन समय"
many_min_read = "$NUMBER मिनट पठन समय"
zero_words = "कोई शब्द नहीं"
one_words = "$NUMBER शब्द"
many_words = "$NUMBER शब्द"
last_updated_on = "आखिरी अपडेट"
see_changes = "बदलाव देखें"

Expand Down
17 changes: 11 additions & 6 deletions i18n/it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ sitemap = "mappa del sito"
search = "Cerca"
search_icon_title = "Clicca o premi $SHORTCUT per aprire la ricerca" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Cancella ricerca" # Title of the X icon next to search input.
result = "risultato" # "1 result"
results = "risultati" # "3 result" (also used for 0 results).
zero_results = "Nessun risultato trovato"
one_results = "$NUMBER risultato"
many_results = "$NUMBER risultati"

# Navigation.
read_more = "Leggi di più"
post = "post"
posts = "post" # Plural of "post".
one_posts = "$NUMBER post"
many_posts = "$NUMBER post"
prev = "Precedente" # As in "Previous" page.
next = "Successivo" # As in "Next" page.
of = "di" # E.g. Page 1 "of" 3
Expand All @@ -43,8 +44,12 @@ go_to_comments = "Vai alla sezione commenti"

# Post metadata.
draft = "BOZZA"
min_read = "min di lettura"
words = "parole"
zero_min_read = "<1 min di lettura"
one_min_read = "$NUMBER min di lettura"
many_min_read = "$NUMBER min di lettura"
zero_words = "Nessuna parola"
one_words = "$NUMBER parola"
many_words = "$NUMBER parole"
last_updated_on = "Ultimo aggiornamento il"
see_changes = "Vedi modifiche"

Expand Down
17 changes: 11 additions & 6 deletions i18n/ja.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ sitemap = "サイトマップ"
search = "検索"
search_icon_title = "$SHORTCUTを押すか、クリックして検索を開く" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "検索をクリア" # Title of the X icon next to search input.
result = "結果" # "1 result"
results = "結果" # "3 results" (also used for 0 results).
zero_results = "結果が見つかりません"
one_results = "$NUMBER 結果" # "1 result"
many_results = "$NUMBER 結果" # "3 results"

# Navigation.
read_more = "続きを読む"
post = "投稿"
posts = "投稿一覧" # Plural of "post".
one_posts = "$NUMBER 投稿"
many_posts = "$NUMBER 投稿"
prev = "" # As in "Previous" page.
next = "" # As in "Next" page.
of = "" # E.g. Page 1 "of" 3
Expand All @@ -47,8 +48,12 @@ go_to_comments = "コメントセクションへ"

# Post metadata.
draft = "ドラフト"
min_read = "読了時間(分)"
words = "単語数"
zero_min_read = "1分未満の読了時間"
one_min_read = "$NUMBER 分の読了時間"
many_min_read = "$NUMBER 分の読了時間"
zero_words = "単語数ゼロ"
one_words = "$NUMBER 単語"
many_words = "$NUMBER 単語"
last_updated_on = "最終更新日"
see_changes = "変更を見る"

Expand Down
17 changes: 11 additions & 6 deletions i18n/ko.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ sitemap = "사이트맵"
search = "검색"
search_icon_title = "클릭하거나 $SHORTCUT을 눌러 검색 열기" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "검색 지우기" # Title of the X icon next to search input.
result = "결과" # "1 result"
results = "결과" # "3 results" (also used for 0 results).
zero_results = "결과 없음"
one_results = "$NUMBER 결과" # "1 result"
many_results = "$NUMBER 결과" # "3 results"

# Navigation.
read_more = "더 읽기"
post = "게시물"
posts = "게시물" # Plural of "post".
one_posts = "$NUMBER 게시물"
many_posts = "$NUMBER 게시물"
prev = "이전" # As in "Previous" page.
next = "다음" # As in "Next" page.
of = "" # E.g. Page 1 "of" 3
Expand All @@ -47,8 +48,12 @@ go_to_comments = "댓글 섹션으로"

# Post metadata.
draft = "임시 저장"
min_read = "분 읽기"
words = "단어"
zero_min_read = "1분 미만 읽기"
one_min_read = "$NUMBER 분 읽기"
many_min_read = "$NUMBER 분 읽기"
zero_words = "단어 없음"
one_words = "$NUMBER 단어"
many_words = "$NUMBER 단어"
last_updated_on = "최근 업데이트"
see_changes = "변경사항 보기"

Expand Down
17 changes: 11 additions & 6 deletions i18n/pt-PT.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ sitemap = "mapa do site"
search = "Pesquisar"
search_icon_title = "Clique ou pressione $SHORTCUT para abrir a pesquisa" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Limpar pesquisa" # Title of the X icon next to search input.
result = "resultado" # "1 result"
results = "resultados" # "3 results" (also used for 0 results).
zero_results = "Nenhum resultado encontrado"
one_results = "$NUMBER resultado" # "1 result"
many_results = "$NUMBER resultados" # "3 results"

# Navigation.
read_more = "Ler mais"
post = "publicação"
posts = "publicações" # Plural of "post".
one_posts = "$NUMBER publicação"
many_posts = "$NUMBER publicações"
prev = "Anterior" # As in "Previous" page.
next = "Seguinte" # As in "Next" page.
of = "de" # E.g. Page 1 "of" 3
Expand All @@ -43,8 +44,12 @@ go_to_comments = "Ir para a seção de comentários"

# Post metadata.
draft = "RASCUNHO"
min_read = "min de leitura"
words = "palavras"
zero_min_read = "<1 min de leitura"
one_min_read = "$NUMBER min de leitura"
many_min_read = "$NUMBER mins de leitura"
zero_words = "Nenhuma palavra"
one_words = "$NUMBER palavra"
many_words = "$NUMBER palavras"
last_updated_on = "Última atualização em"
see_changes = "Ver alterações"

Expand Down
Loading

0 comments on commit ca7817e

Please sign in to comment.