Skip to content

Commit f69f6e1

Browse files
committed
refactor(i18n): use sub repo instead
1 parent 972c7f3 commit f69f6e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/config/app.common.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ export const config: Config = {
1010
name: 'English',
1111
value: 'en-US',
1212
// uncomment that will load locale file(file name format: en-US.json) via ajax
13-
messages: require('../../assets/locales/en-US.json'),
13+
messages: require('../../assets/locales/json/en-US.json'),
1414
},
1515
{
1616
name: '简体中文',
1717
value: 'zh-CN',
18-
messages: require('../../assets/locales/zh-CN.json'),
18+
messages: require('../../assets/locales/json/zh-CN.json'),
1919
},
2020
],
2121
};

src/service/locales.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function initLocales(currentLocale?: string, callback?: () => void) {
4242
initIntl(locales);
4343
} else {
4444
// load messages from remote file if the messages not specified in service/locales.tsx
45-
ajax.get(`locales/${currentLocale}.json`).then(messages => {
45+
ajax.get(`locales/json/${currentLocale}.json`).then(messages => {
4646
initIntl({
4747
[currentLocale]: messages,
4848
});

0 commit comments

Comments
 (0)