Fix pluralization of an error message
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
c2141a1b04
commit
f94e424caf
2 changed files with 11 additions and 3 deletions
|
@ -5588,10 +5588,18 @@
|
|||
},
|
||||
"icu:ProfileEditor--username--check-character-min": {
|
||||
"messageformat": "Usernames must have at least {min, number} characters.",
|
||||
"description": "Shown if user has attempted to enter a username with too few characters - currently min is 3"
|
||||
"description": "(Deleted 2024/06/13) Shown if user has attempted to enter a username with too few characters - currently min is 3"
|
||||
},
|
||||
"icu:ProfileEditor--username--check-character-max": {
|
||||
"messageformat": "Usernames must have at most {max, number} characters.",
|
||||
"description": "(Deleted 2024/06/13) Shown if user has attempted to enter a username with too many characters - currently min is 25"
|
||||
},
|
||||
"icu:ProfileEditor--username--check-character-min-plural": {
|
||||
"messageformat": "Usernames must have at least {min, plural, one {# character} other {# characters}}.",
|
||||
"description": "Shown if user has attempted to enter a username with too few characters - currently min is 3"
|
||||
},
|
||||
"icu:ProfileEditor--username--check-character-max-plural": {
|
||||
"messageformat": "Usernames must have at most {max, plural, one {# character} other {# characters}}.",
|
||||
"description": "Shown if user has attempted to enter a username with too many characters - currently min is 25"
|
||||
},
|
||||
"icu:ProfileEditor--username--check-discriminator-min": {
|
||||
|
|
|
@ -179,12 +179,12 @@ export function EditUsernameModalBody({
|
|||
return undefined;
|
||||
}
|
||||
if (error === UsernameReservationError.NotEnoughCharacters) {
|
||||
return i18n('icu:ProfileEditor--username--check-character-min', {
|
||||
return i18n('icu:ProfileEditor--username--check-character-min-plural', {
|
||||
min: minNickname,
|
||||
});
|
||||
}
|
||||
if (error === UsernameReservationError.TooManyCharacters) {
|
||||
return i18n('icu:ProfileEditor--username--check-character-max', {
|
||||
return i18n('icu:ProfileEditor--username--check-character-max-plural', {
|
||||
max: maxNickname,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue