- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
langs/i18n: Fix warning regression in i18n #8497
Conversation
Fix this by 1. Making sure that only numerical values are treated as plural counts 2. Making sure that `i18n.pluralFormNotFoundError` is not logged as a warning if `other` resolved. Note that 2. isn't a new problem, but became visible because of the plural improvements in Hugo `0.83.0`. Fixes gohugoio#8492
This should generate a warning because the result will be wrong:
|
I feel like we are perpetuating a problem with i18n files in the wild where the i18n/fr.toml # Items without pluralization rules.
about = "about in French"
help = "help in French"
contact_us = "contact us in French"
# Items with pluralization rules.
[day]
one = "jour
other = "jours" |
I don't agree.
If you still feel that this is a problem needing a fix, open up another issue. |
Will do. Thanks. |
Ok, this is now really an unsatisfying situation!
I guess the underlying problem is a lack of formal specification how "simple" translations without pluralization forms are to be defined. Just falling back to cardinal form
Now my question: Will the mentioned simple "without pluralization rules" definition form stay the official/recommended way to define translations without pluralization rules in Hugo? (This would be my preference I guess 🙂 ) |
Hugo [v0.83.1](https://github.com/gohugoio/hugo/releases/tag/v0.83.1) reverted things changed in v0.83, so themefisher#147 is a non-solution now. I've changed i18n files to use the [simple/old translation formalism](gohugoio/hugo#8497 (comment)) which [hopefully stays the recommended to define translations without pluralization rules way in Hugo](gohugoio/hugo#8497 (comment))
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #8492