Skip to content

Commit 9c14c25

Browse files
committed
refactor: Change locales to json files
1 parent 038f48d commit 9c14c25

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

src/i18n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import i18n from 'i18next';
22
import detector from 'i18next-browser-languagedetector';
33
import { initReactI18next } from 'react-i18next';
4-
import TRANSLATIONS_ZH from 'locales/zhTW';
5-
import TRANSLATIONS_EN from 'locales/en';
4+
import TRANSLATIONS_ZH from 'locales/zhTW.json';
5+
import TRANSLATIONS_EN from 'locales/en.json';
66

77
const resources = {
88
en: {

src/locales/en.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"common": {
3+
"source": "Source: "
4+
},
5+
"meta": {
6+
"slogan": "Knowing your health status",
7+
"source": "Dr. Wang"
8+
}
9+
}

src/locales/en.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/locales/zhTW.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"common": {
3+
"source": "Source: "
4+
},
5+
"meta": {
6+
"slogan": "計算你的健康指標",
7+
"source": "王介立醫師"
8+
}
9+
}

src/locales/zhTW.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)