mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[PR #678] [MERGED] I18n plural forms #1379
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1379
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/678
Author: @bmoczulski
Created: 3/21/2023
Status: ✅ Merged
Merged: 3/25/2023
Merged by: @binwiederhier
Base:
main← Head:i18n-plural-forms📝 Commits (2)
338cab1i18n: Introduce plural forms for reservations, emails, messages80b0a94i18n-pl: Provide translations for plural forms of reservations. emails, messages📊 Changes
3 files changed (+19 additions, -7 deletions)
View changed files
📝
web/public/static/langs/en.json(+6 -3)📝
web/public/static/langs/pl.json(+10 -1)📝
web/src/components/UpgradeDialog.js(+3 -3)📄 Description
While working on Polish translations I noticed that some labels can't be translated correctly due lack of plural forms. In Polish there are two plural forms of nouns - one for cadrinality 2-4 mod 10 (except 12-14) and the another for everything else > 1. Other languages have different rules for plurals, sometimes even more complex. Considering that both react-i18next and Weblate fully support translation of plural forms I propose to change the affected entries by adding
{count: n}to relevantt()calls and_one/_othersuffix for English translation. This will make both systems aware of plurality of these labels. Weblate will show a form with all required plural variants in a given language and react-i18next will look for appropriate suffixes based oncountand language.This is my firs PR here so let me take the opportunity to congratulate you on creating this awesome utility. I'm currently evaluating ntfy in my monitoring deployment and I have to admit I'm impressed by the plethora of features and comprehensive documentation. Well done! The very least I can do in return is to provide some translations in my mother tongue.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.