Skip to content

Commit 01712e1

Browse files
committed
fixup!
1 parent 7437d21 commit 01712e1

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

apps/site/next.dynamic.page.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { join } from 'node:path';
22

3-
import { allLocaleCodes, availableLocaleCodes } from '@node-core/website-i18n';
4-
import { defaultLocale } from '@node-core/website-i18n';
3+
import {
4+
allLocaleCodes,
5+
defaultLocale,
6+
availableLocaleCodes,
7+
} from '@node-core/website-i18n';
58
import { notFound, redirect } from 'next/navigation';
69
import { setRequestLocale } from 'next-intl/server';
710

apps/site/tests/e2e/general-behavior.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ const verifyTranslation = async (page: Page, locale: Locale | string) => {
4343
// Load locale data if string code provided (e.g., 'es', 'fr')
4444
const localeData: Locale =
4545
typeof locale === 'string'
46-
? await import(`@node-core/website-i18n/locales/${locale}.json`)
46+
? (
47+
await import(`@node-core/website-i18n/locales/${locale}.json`, {
48+
with: { type: 'json' },
49+
})
50+
).default
4751
: locale;
4852

4953
// Get navigation links and expected translations

packages/i18n/src/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import localeConfig from './config.json' with { type: 'json' };
77
* This is used for allowing us to redirect the user to any
88
* of the available locales that we have enabled on the website
99
*
10-
* @returns {Array<import('./types').LocaleConfig>}
10+
* @type {Array<import('./types').LocaleConfig>}
1111
*/
1212
export const availableLocales = localeConfig.filter(locale => locale.enabled);
1313

0 commit comments

Comments
 (0)