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

🌐 Translate newly added literals #712

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 10 additions & 10 deletions src/components/EmailVerification/EmailVerificationForm.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export const HappyFlow = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

await userEvent.click(await canvas.findByRole('button', {name: 'Send code'}));
const codeInput = await canvas.findByLabelText('Enter the six-character code');
await userEvent.click(await canvas.findByRole('button', {name: 'Verstuur code'}));
const codeInput = await canvas.findByLabelText('Voer de bevestigingscode in');
expect(codeInput).toBeVisible();
await userEvent.type(codeInput, 'abcd12');
expect(codeInput).toHaveValue('ABCD12'); // automatically convert to uppercase
await userEvent.click(canvas.getByRole('button', {name: 'Verify'}));
await userEvent.click(canvas.getByRole('button', {name: 'Bevestigen'}));
},
};

Expand All @@ -53,7 +53,7 @@ export const ArbitrarySendCodeErrorFlow = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

await userEvent.click(await canvas.findByRole('button', {name: 'Send code'}));
await userEvent.click(await canvas.findByRole('button', {name: 'Verstuur code'}));
expect(await canvas.findByText('No permission to perform this action.')).toBeVisible();
},
};
Expand All @@ -62,11 +62,11 @@ export const InvalidCodeFlow = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

await userEvent.click(await canvas.findByRole('button', {name: 'Send code'}));
const codeInput = await canvas.findByLabelText('Enter the six-character code');
await userEvent.click(await canvas.findByRole('button', {name: 'Verstuur code'}));
const codeInput = await canvas.findByLabelText('Voer de bevestigingscode in');
expect(codeInput).toBeVisible();
await userEvent.type(codeInput, 'FAILME'); // mock returns validation error
await userEvent.click(canvas.getByRole('button', {name: 'Verify'}));
await userEvent.click(canvas.getByRole('button', {name: 'Bevestigen'}));

expect(await canvas.findByText('Not a valid verification code')).toBeVisible();
},
Expand All @@ -76,11 +76,11 @@ export const ArbitraryVerificationErrorFlow = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

await userEvent.click(await canvas.findByRole('button', {name: 'Send code'}));
const codeInput = await canvas.findByLabelText('Enter the six-character code');
await userEvent.click(await canvas.findByRole('button', {name: 'Verstuur code'}));
const codeInput = await canvas.findByLabelText('Voer de bevestigingscode in');
expect(codeInput).toBeVisible();
await userEvent.type(codeInput, 'NOPERM'); // mock returns 403
await userEvent.click(canvas.getByRole('button', {name: 'Verify'}));
await userEvent.click(canvas.getByRole('button', {name: 'Bevestigen'}));

expect(await canvas.findByText('No permission to perform this action.')).toBeVisible();
},
Expand Down
22 changes: 10 additions & 12 deletions src/components/FormStep/FormStep.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ export const EmailVerification = {

const modal = await canvas.findByRole('dialog');
expect(modal).toBeVisible();
await userEvent.click(within(modal).getByRole('button', {name: 'Send code'}));
const codeInput = await within(modal).findByLabelText('Enter the six-character code');
await userEvent.click(within(modal).getByRole('button', {name: 'Verstuur code'}));
const codeInput = await within(modal).findByLabelText('Voer de bevestigingscode in');
expect(codeInput).toBeVisible();

await userEvent.type(codeInput, 'ABCD12');
const submitButton = within(modal).getByRole('button', {name: 'Verify'});
const submitButton = within(modal).getByRole('button', {name: 'Bevestigen'});
await userEvent.click(submitButton);
expect(await within(modal).findByText(/The email address has now been verified/)).toBeVisible();
expect(await within(modal).findByText(/Je e-mailadres is bevestigd/)).toBeVisible();
},
};

Expand Down Expand Up @@ -324,16 +324,14 @@ export const EmailVerificationNotDone = {

const modal = await canvas.findByRole('dialog');
expect(modal).toBeVisible();
await userEvent.click(within(modal).getByRole('button', {name: 'Send code'}));
const codeInput = await within(modal).findByLabelText('Enter the six-character code');
await userEvent.click(within(modal).getByRole('button', {name: 'Verstuur code'}));
const codeInput = await within(modal).findByLabelText('Voer de bevestigingscode in');
expect(codeInput).toBeVisible();

await userEvent.type(codeInput, 'ABCD12');
const submitButton = within(modal).getByRole('button', {name: 'Verify'});
const submitButton = within(modal).getByRole('button', {name: 'Bevestigen'});
await userEvent.click(submitButton);
expect(
await within(modal).findByText(/The email address has now been verified/)
).toBeVisible();
expect(await within(modal).findByText(/Je e-mailadres is bevestigd/)).toBeVisible();
// close modal
await userEvent.click(within(modal).getByRole('button', {name: 'Sluiten'}));
});
Expand Down Expand Up @@ -403,7 +401,7 @@ export const SummaryProgressVisible = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

expect(await canvas.findByText(/Step 1 of 1/)).toBeVisible();
expect(await canvas.findByText(/Stap 1 van 1/)).toBeVisible();
},
};

Expand All @@ -416,6 +414,6 @@ export const SummaryProgressNotVisible = {
play: async ({canvasElement}) => {
const canvas = within(canvasElement);

expect(canvas.queryByText(/Step 1 of 1/)).toBeNull();
expect(canvas.queryByText(/Stap 1 van 1/)).toBeNull();
},
};
36 changes: 18 additions & 18 deletions src/i18n/compiled/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"1+Q55M": [
{
"type": 0,
"value": "You are verifying the email address "
"value": "Om door te gaan moet je jouw e-mailadres "
},
{
"children": [
Expand All @@ -72,7 +72,7 @@
},
{
"type": 0,
"value": ". First, we need to send you a verification code on this email address. Then, you need to enter the code to confirm it."
"value": " bevestigen. We sturen je eerst een bevestigingscode naar dit e-mailadres. Vervolgens moet je deze bevestigingscode hier invoeren."
}
],
"1hdvgS": [
Expand Down Expand Up @@ -132,7 +132,7 @@
"4tPKAs": [
{
"type": 0,
"value": "Verify"
"value": "Bevestigen"
}
],
"5uh2hS": [
Expand Down Expand Up @@ -498,7 +498,7 @@
"Dvt0Fv": [
{
"type": 0,
"value": "The email address has now been verified. You can close this window and continue with the rest of the form."
"value": "Je e-mailadres is bevestigd. Je kan dit bericht sluiten en doorgaan met de rest van het formulier."
}
],
"DxbUkA": [
Expand Down Expand Up @@ -580,19 +580,19 @@
"EZ7myd": [
{
"type": 0,
"value": "Email address verification"
"value": "E-mailadres bevestigen"
}
],
"FDy8nr": [
{
"type": 0,
"value": "The verification code may only contain letters (A-Z) and numbers (0-9)."
"value": "De bevestigingscode bestaat uit hoofdletters (A-Z) en getallen (0-9)."
}
],
"FrFeZj": [
{
"type": 0,
"value": "You haven't entered an email address yet."
"value": "Je hebt nog geen e-mailadres ingevuld."
}
],
"GbPef0": [
Expand Down Expand Up @@ -1034,7 +1034,7 @@
"R7k4JC": [
{
"type": 0,
"value": "Enter the six-character code"
"value": "Voer de bevestigingscode in"
}
],
"RJ+0F/": [
Expand Down Expand Up @@ -1372,7 +1372,7 @@
"c0Ry9H": [
{
"type": 0,
"value": "The verification code must contain exactly six characters."
"value": "De bevestigingscode moet precies zes tekens lang zijn."
}
],
"cBsrax": [
Expand Down Expand Up @@ -1514,15 +1514,15 @@
"ijV760": [
{
"type": 0,
"value": "Step "
"value": "Stap "
},
{
"type": 1,
"value": "current"
},
{
"type": 0,
"value": " of "
"value": " van "
},
{
"type": 1,
Expand All @@ -1538,7 +1538,7 @@
"ixMIBJ": [
{
"type": 0,
"value": "What would you like to do?"
"value": "Wat wil je doen?"
}
],
"jAZped": [
Expand Down Expand Up @@ -1702,7 +1702,7 @@
"lQY+Zm": [
{
"type": 0,
"value": "Enter the verification code"
"value": "Een bevestigingscode invullen"
}
],
"lVNV/d": [
Expand All @@ -1720,7 +1720,7 @@
"lmWBQT": [
{
"type": 0,
"value": "The code is exactly six characters long and consists of only uppercase letters and numbers."
"value": "De bevestigingscode is precies zes tekens lang en bestaat uit hoofdletters en getallen."
}
],
"lq29t6": [
Expand Down Expand Up @@ -1762,7 +1762,7 @@
"n1vyJM": [
{
"type": 0,
"value": "Introduction"
"value": "Introductie"
}
],
"nLymjB": [
Expand Down Expand Up @@ -1976,7 +1976,7 @@
"qyWfE+": [
{
"type": 0,
"value": "Receive a verification code"
"value": "Een bevestigingscode ontvangen"
}
],
"r1L6Zj": [
Expand All @@ -1994,7 +1994,7 @@
"riuSfc": [
{
"type": 0,
"value": "Send code"
"value": "Verstuur code"
}
],
"sSmY1N": [
Expand Down Expand Up @@ -2052,7 +2052,7 @@
"tMO7aH": [
{
"type": 0,
"value": "Continue ➜"
"value": "Doorgaan ➜"
}
],
"tohkCS": [
Expand Down
Loading