Make more strings localizable

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2022-11-26 16:00:54 +01:00
parent 8b4390681b
commit 34aee08a09
8 changed files with 26 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ import type { AxiosError } from 'axios';
const messages = defineMessages({
success: { id: 'registrations.success', defaultMessage: 'Welcome to {siteTitle}!' },
usernameLabel: { id: 'registrations.username.label', defaultMessage: 'Your username' },
usernameHint: { id: 'registrations.username.hint', defaultMessage: 'May only contain A-Z, 0-9, and underscores', },
usernameHint: { id: 'registrations.username.hint', defaultMessage: 'May only contain A-Z, 0-9, and underscores' },
usernameTaken: { id: 'registrations.unprocessable_entity', defaultMessage: 'This username has already been taken.' },
passwordLabel: { id: 'registrations.password.label', defaultMessage: 'Password' },
error: { id: 'registrations.error', defaultMessage: 'Failed to register your account.' },

View File

@@ -23,7 +23,7 @@ describe('<EmailVerification />', () => {
it('successfully submits', async() => {
render(<EmailVerification />);
await userEvent.type(screen.getByLabelText('Email Address'), 'foo@bar.com{enter}');
await userEvent.type(screen.getByLabelText('E-mail address'), 'foo@bar.com{enter}');
await waitFor(() => {
fireEvent.submit(
@@ -50,7 +50,7 @@ describe('<EmailVerification />', () => {
it('renders errors', async() => {
render(<EmailVerification />);
await userEvent.type(screen.getByLabelText('Email Address'), 'foo@bar.com{enter}');
await userEvent.type(screen.getByLabelText('E-mail address'), 'foo@bar.com{enter}');
await waitFor(() => {
fireEvent.submit(