fix(frontend): localize avatar validation errors
checkAvatarFile returned hard-coded Russian strings, so an English user picking a bad file got "Подойдёт PNG, JPG или WebP." with no translation. Route both messages through the account namespace (validation.avatarType / avatarTooBig) the same way the auth validators take a t function, keeping ru/en key parity enforced by the satisfies clause.
This commit is contained in:
parent
fd0fe59fee
commit
07b3f55bee
5 changed files with 18 additions and 7 deletions
|
|
@ -9,6 +9,10 @@ export const accountEn = {
|
|||
avatar: {
|
||||
change: 'Change avatar',
|
||||
},
|
||||
validation: {
|
||||
avatarType: 'PNG, JPG or WebP please.',
|
||||
avatarTooBig: 'The file is over 5 MB.',
|
||||
},
|
||||
devices: {
|
||||
heading: 'Linked games',
|
||||
linkedAt: 'Linked {{date}}',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue