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

docs: add documentation about pluralization #7236

Merged
merged 1 commit into from
Apr 24, 2022
Merged

docs: add documentation about pluralization #7236

merged 1 commit into from
Apr 24, 2022

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

There are probably very few people that fully understand how the plural forms work. Let's write some basic explanation.

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Apr 24, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 24, 2022
@netlify
Copy link

netlify bot commented Apr 24, 2022

[V2]

Name Link
🔨 Latest commit d94d680
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6264c073ec76800009567574
😎 Deploy Preview https://deploy-preview-7236--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 67
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-7236--docusaurus-2.netlify.app/

@Josh-Cena Josh-Cena merged commit 743738d into main Apr 24, 2022
@Josh-Cena Josh-Cena deleted the jc/doc-plural branch April 24, 2022 03:23
Comment on lines +285 to +291
const message = selectMessage(
items.length,
translate(
{message: 'One item|{count} items'},
{count: items.length},
),
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, this is what we have in our code but that looks a bit weird to me, as we translate everything and only then select

At the same time we have to pass a static message config to translate() otherwise it wouldn't be extracted

Maybe we'd need like react-intl a new method like defineMessage() that permits static extraction but without directly translating 🤷‍♂️

Not a big deal, we can keep it this way for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants