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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions website/docs/docusaurus-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 marked this conversation as resolved.
Show resolved Hide resolved

:::

## Hooks {#hooks}

### `useDocusaurusContext` {#useDocusaurusContext}
Expand Down