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) => {
13
13
}
14
14
15
15
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 ) ;
19
19
20
20
// Use default messages as fallback
21
21
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
6
6
* Imports a locale when exists from the locales directory
7
7
*
8
8
* @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
10
10
*/
11
11
export const importLocale = async locale => {
12
12
return import ( `../locales/${ locale } .json` ) . then ( f => f . default ) ;
You can’t perform that action at this time.
0 commit comments