Skip to content

Commit e9e0621

Browse files
authored
docs: Fix plurality of other gender (#2145)
If a person’s gender is unknown, the plural version is used to reference them. That also affects verbs.
1 parent 2ccc147 commit e9e0621

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/src/pages/docs/usage/extraction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ t(
145145

146146
```tsx
147147
// Select values
148-
t('{gender, select, female {She} male {He} other {They}} is online.', {
148+
t('{gender, select, female {She is} male {He is} other {They are}} online.', {
149149
gender: 'female'
150150
});
151151
```

docs/src/pages/docs/usage/translations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ To match a specific number, `next-intl` additionally supports the special `=valu
289289
To map identifiers to human readable labels, you can use the `select` argument that works similar to the `switch` statement in JavaScript:
290290

291291
```tsx filename="en.json"
292-
"message": "{gender, select, female {She} male {He} other {They}} is online."
292+
"message": "{gender, select, female {She is} male {He is} other {They are}} online."
293293
```
294294

295295
```js

packages/use-intl/src/core/createTranslator.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ describe('type safety', () => {
353353

354354
it('validates selects', () => {
355355
const t = translateMessage(
356-
'{gender, select, female {She} male {He} other {They}} is online.'
356+
'{gender, select, female {She is} male {He is} other {They are}} online.'
357357
);
358358

359359
t('msg', {gender: 'female'});
@@ -515,7 +515,7 @@ describe('type safety', () => {
515515
ordinalMessage:
516516
"It's your {year, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} birthday!",
517517
selectMessage:
518-
'{gender, select, female {She} male {He} other {They}} is online.',
518+
'{gender, select, female {She is} male {He is} other {They are}} online.',
519519
escapedParam:
520520
"Escape curly braces with single quotes (e.g. '{name'})",
521521
simpleRichText:

packages/use-intl/src/react/useTranslations.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ it('supports pluralisation via tags like "zero" and "one" if the locale supports
190190

191191
it('handles selects', () => {
192192
renderMessage(
193-
'{gender, select, male {He} female {She} other {They}} is online.',
193+
'{gender, select, male {He is} female {She is} other {They are}} online.',
194194
{gender: 'female'}
195195
);
196196
screen.getByText('She is online.');

rfcs/001-message-extraction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ t(
145145
**Select values**
146146

147147
```tsx
148-
t('{gender, select, female {She} male {He} other {They}} is online.', {
148+
t('{gender, select, female {She is} male {He is} other {They are}} online.', {
149149
gender: 'female'
150150
});
151151
```

0 commit comments

Comments
 (0)