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 link to pluralization docs #8543

Merged
merged 3 commits into from Jan 20, 2023
Merged

Conversation

homotechsual
Copy link
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Unsure on placement on this within the doc.

@netlify
Copy link

netlify bot commented Jan 11, 2023

[V2]

Name Link
🔨 Latest commit 708f98b
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/63ca8c6af18a1100089d70dc
😎 Deploy Preview https://deploy-preview-8543--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

github-actions bot commented Jan 11, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 76 🟢 97 🟢 92 🟢 100 🟢 90 Report
/docs/installation 🟠 64 🟢 100 🟢 92 🟢 100 🟢 90 Report

@Josh-Cena Josh-Cena changed the title docs(content): add link to pluralization docs docs: add link to pluralization docs Jan 17, 2023
Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

I suggest de-noting this as a single sentence like:

The <Translate> component supports interpolation. You can also implement string pluralization through some custom code.

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Jan 17, 2023
@@ -334,6 +334,12 @@ You can even omit the children prop and specify a translation string in your `co

:::

:::info

Your custom uses of `<Translate />` are also capable of handling [string pluralization](./i18n/i18n-tutorial.mdx#pluralization)
Copy link
Collaborator

@slorber slorber Jan 19, 2023

Choose a reason for hiding this comment

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

Suggested change
Your custom uses of `<Translate />` are also capable of handling [string pluralization](./i18n/i18n-tutorial.mdx#pluralization)
The `<Translate>` component supports [interpolation](#interpolate) and [pluralization](./i18n/i18n-tutorial.mdx#pluralization).

edit: nop, bad suggestion

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmmm, do we really support pluralization when using <Translate>? Afaik we don't.

Also we probably need to apply selectMessage() before translating the content 😅 otherwise we translate string parts that we don't even use.

Choose a reason for hiding this comment

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

Thank you

@slorber slorber merged commit c2352a3 into facebook:main Jan 20, 2023
This was referenced Oct 19, 2023
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.

None yet

5 participants