File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ const loadLocaleDictionary = async (locale: string) => {
1313 }
1414
1515 if ( availableLocaleCodes . includes ( locale ) ) {
16- // Other languages don't really require HMR as they will never be development languages
17- // so we can load them dynamically
18- const messages = importLocale ( locale ) ;
16+ // Other languages don't really require HMR as they
17+ // will never be development languages so we can load them dynamically
18+ const messages = await importLocale ( locale ) ;
1919
2020 // Use default messages as fallback
2121 return deepMerge ( defaultMessages , messages ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import localeConfig from '@node-core/website-i18n/config.json' with { type: 'jso
66 * Imports a locale when exists from the locales directory
77 *
88 * @param {string } locale The locale code to import
9- * @returns {Record<string, any> } The imported locale
9+ * @returns {Promise< Record<string, any> > } The imported locale
1010 */
1111export const importLocale = async locale => {
1212 return import ( `../locales/${ locale } .json` ) . then ( f => f . default ) ;
You can’t perform that action at this time.
0 commit comments