11'use client' ;
22
3+ < < << << < HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
34<< < < << < HEAD
45< < < << < < HEAD
56import { useParams } from 'next/navigation' ;
@@ -14,6 +15,10 @@ import {
1415import { useParams } from 'next/navigation' ;
1516> >>> >>> 305 eba5 ( prettier )
1617import type {
18+ = === ===
19+ import {
20+ Locale ,
21+ > >>> >>> faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
1722 PydanticComponentMatcher ,
1823 PydanticFormApiProvider ,
1924 PydanticFormCustomDataProvider ,
@@ -25,6 +30,7 @@ import {
2530 PydanticFormFieldType ,
2631} from 'pydantic-forms' ;
2732
33+ < < << << < HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
2834<< < < << < HEAD
2935< < < << < < HEAD
3036import { TextArea } from '@/fields' ;
@@ -38,11 +44,17 @@ import {
3844 handleInvalidLocale ,
3945 useGetTranslationMessages ,
4046} from '@/app/[locale]/useGetTranslationMessages' ;
47+ = === ===
48+ >>> >>> > faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
4149import { TextArea } from '@/fields' ;
4250> >>> >>> 305 eba5 ( prettier )
4351
52+ << < < << < HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
4453> >>> >>> 6 b4540b ( Cleanup )
4554import styles from '../page.module.css' ;
55+ = === ===
56+ import styles from './page.module.css' ;
57+ > >>> >>> faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
4658
4759<< < < << < HEAD
4860export default function Home ( {
@@ -54,10 +66,13 @@ export default function Home({
5466 const locale = params ?. locale as string ; // Get locale from URL params
5567= === ===
5668export default function Home ( ) {
69+ < < << << < HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
5770 const { locale } = useParams ( ) ;
5871 const validLocale = handleInvalidLocale ( locale ) ;
5972> >>> >>> 6 b4540b ( Cleanup )
6073
74+ === = ===
75+ >>> > >>> faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
6176 const pydanticFormApiProvider : PydanticFormApiProvider = async ( {
6277 requestBody,
6378 } ) => {
@@ -126,15 +141,26 @@ export default function Home() {
126141 ] ;
127142 } ;
128143
144+ < < << << < HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
129145<< < < << < HEAD
130146 // const translations = getMessages(locale);
131147 // console.log('NEW translations', translations);
132148
133149= === ===
134150>>> >>> > 6b4540b (Cleanup)
151+ =======
152+ const customTranslations = {
153+ renderForm : {
154+ loading : 'The form is loading. Please wait.' ,
155+ } ,
156+ } ;
157+
158+ const locale = Locale.enGB;
159+
160+ >>> >>> > faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
135161 return (
136162 < div className = { styles . page } >
137- < h1 style = { { marginBottom : '20px' } } > Pydantic Form ( { locale } ) </ h1 >
163+ < h1 style = { { marginBottom : '20px' } } > Pydantic Form </ h1 >
138164
139165 < PydanticForm
140166 id = "theForm"
@@ -149,6 +175,7 @@ export default function Home() {
149175 labelProvider : pydanticLabelProvider ,
150176 customDataProvider : pydanticCustomDataProvider ,
151177 componentMatcher : componentMatcher ,
178+ < << << << HEAD :frontend / apps / example / src / app / [ locale ] / page . tsx
152179<< < < << < HEAD
153180< < < << < < HEAD
154181< < < << < < HEAD
@@ -164,6 +191,10 @@ export default function Home() {
164191 translations : useGetTranslationMessages ( validLocale ) , //Comment this line for default translations
165192 locale : validLocale ,
166193> >>> >>> 305 eba5 ( prettier )
194+ = === ===
195+ customTranslations : customTranslations ,
196+ locale : locale ,
197+ > >>> >>> faa8b5a ( Resolved comments ) :frontend / apps / example / src / app / page . tsx
167198 } }
168199 />
169200 </ div >
0 commit comments