Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix plural translations by importing missing locale-data #1186

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

zatteo
Copy link
Contributor

@zatteo zatteo commented Mar 8, 2024

Previously, I did not understand why plural translations did not work on iOS. They were returning the key instead of the pluralized translation. I duplicated the translations to support the JSON v3 fallback but it still did not work properly. They were always returning the singular key.

Here, I found that the root of the issue was the missing locale-data import needed by 'intl' and 'intl-pluralrules' polyfill.

So plural translations works and I removed the duplicate translations.

### 🐛 Bug Fixes

* Fix plural translations on backup notification

Checklist

Before merging this PR, the following things must have been done if relevant:

  • Tested on iOS
  • Tested on Android
  • Test coverage
  • README and documentation

Previously, I did not understand why plural translations did not work on iOS. They were returning the key instead of the pluralized translation. I duplicated the translations to support the JSON v3 fallback but it still did not work properly. They were always returning the singular key.

Here, I found that the root of the issue was the missing locale-data import needed by 'intl' and 'intl-pluralrules' polyfill.

So plural translations works and I removed the duplicate translations.
@zatteo zatteo requested review from acezard and Ldoppea as code owners March 8, 2024 16:23
@zatteo
Copy link
Contributor Author

zatteo commented Mar 8, 2024

Related for information : i18next/i18next#2155

@zatteo zatteo merged commit 83d0eb2 into master Mar 19, 2024
1 check passed
@zatteo zatteo deleted the fix/translations-issues branch March 19, 2024 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants