Skip to content

Commit

Permalink
chore: revert changed localization test suite (payloadcms#7089)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrodMFlesch authored Jul 10, 2024
1 parent 74105d8 commit 51cd594
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const LocaleProvider: React.FC<{ children?: React.ReactNode }> = ({ child

void initializeLocale()
}, [defaultLocale, getPreference, handleLocaleChange, localeFromParams, localization, user])
console.log({ locale })

return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>
}

Expand Down
23 changes: 22 additions & 1 deletion test/localization/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,28 @@ export default buildConfigWithDefaults({
localization: {
defaultLocale,
fallback: true,
locales: [defaultLocale, spanishLocale, portugueseLocale, 'ar'],
locales: [
{
code: defaultLocale,
label: 'English',
rtl: false,
},
{
code: spanishLocale,
label: 'Spanish',
rtl: false,
},
{
code: portugueseLocale,
fallbackLocale: spanishLocale,
label: 'Portuguese',
},
{
code: 'ar',
label: 'Arabic',
rtl: true,
},
],
},
onInit: async (payload) => {
const collection = localizedPostsSlug
Expand Down

0 comments on commit 51cd594

Please sign in to comment.