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

chore: cleanup locale switching test #400

Merged
merged 1 commit into from
Nov 11, 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
1 change: 1 addition & 0 deletions src/core/i18n/resources/en/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const messages = {
},
},
},
cta: 'Submit',
screenTitle: 'Dummy form',
},
errorBoundary: {
Expand Down
1 change: 1 addition & 0 deletions src/core/i18n/resources/fr/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export const messages: MessagesTypes = {
},
},
},
cta: 'Valider',
screenTitle: 'Dummy form',
},
errorBoundary: {
Expand Down
12 changes: 1 addition & 11 deletions src/features/dummyForm/DummyFormExample.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/* eslint-disable react/jsx-props-no-spreading */

import { zodResolver } from '@hookform/resolvers/zod';
import { useRef } from 'react';
import type { SubmitHandler } from 'react-hook-form';
import { Controller, useForm } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import type { TextInput } from 'react-native';

import { changeLanguage } from '$core/i18n';
import {
DummyFormSchema,
type DummyFormSchemaType,
Expand All @@ -34,13 +31,6 @@ export const DummyFormExample = () => {

return (
<>
<Button.Text
testID="home-formattingCta"
onPress={async () => changeLanguage('en')}
>
Set locale to FR
</Button.Text>

<Box pb="spacing_16">
<Controller
control={control}
Expand Down Expand Up @@ -117,7 +107,7 @@ export const DummyFormExample = () => {
testID="dummyForm-submitCta"
onPress={handleSubmit(onSubmit) as (arg: unknown) => Promise<unknown>}
>
Submit
{t('miscScreens.dummyForm.cta')}
</Button.Text>
</>
);
Expand Down
Loading