Skip to content
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
6 changes: 3 additions & 3 deletions apps/site/i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const loadLocaleDictionary = async (locale: string) => {
}

if (availableLocaleCodes.includes(locale)) {
// Other languages don't really require HMR as they will never be development languages
// so we can load them dynamically
const messages = importLocale(locale);
// Other languages don't really require HMR as they
// will never be development languages so we can load them dynamically
const messages = await importLocale(locale);

// Use default messages as fallback
return deepMerge(defaultMessages, messages);
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/lib/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import localeConfig from '@node-core/website-i18n/config.json' with { type: 'jso
* Imports a locale when exists from the locales directory
*
* @param {string} locale The locale code to import
* @returns {Record<string, any>} The imported locale
* @returns {Promise<Record<string, any>>} The imported locale
*/
export const importLocale = async locale => {
return import(`../locales/${locale}.json`).then(f => f.default);
Expand Down
Loading