-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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(theme-classic): should use plurals for category items description #9851
fix(theme-classic): should use plurals for category items description #9851
Conversation
Hi @baradusov! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Yes it should support plural forms.
Unfortunately other languages will have to be fixed too because the string does not contain all plural forms, but that's not your responsibility to fix, and other languages should keep working as is (ie render as before a possibly wrong label)
BTW if you speak Russian, it would be a good opportunity to check the existing translations, notably this one missing plural forms:
"theme.blog.post.readingTime.plurals": "{readingTime} мин. чтения",
translate( | ||
{ | ||
message: '{count} items', | ||
id: 'theme.docs.DocCard.categoryDescription', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a .plurals
suffix to this id?
We usually have this convention to quickly identify strings that support plural rules.
Also need to rename all existing keys in docusaurus-theme-translations
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the review
i pushed the changes you requested
@slorber I checked all russian translations and everything seems okay to me
|
Thanks 👍
Actually it's better to use 3 times the plural forms even though they are the same string. If you don't there will be a warning saying plural forms are missing, helping us actually catch that we may have forgotten them. |
Pre-flight checklist
Motivation
When enabling russian language doc cards showing source string for default description. I made a fix to use appropriate plural form of the description.
Test Plan
Before:
After:
Test links
Deploy preview: https://deploy-preview-9851--docusaurus-2.netlify.app/
Related issues/PRs