Squash merge feat/expo-app: app-expo, .cursor, workflows, package.json, .husky; remove app-android, app-ios, react-app
This commit is contained in:
58
app-expo/src/i18n/resources/index.ts
Normal file
58
app-expo/src/i18n/resources/index.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import appEn from '../locales/en/app.json';
|
||||
import authEn from '../locales/en/auth.json';
|
||||
import commonEn from '../locales/en/common.json';
|
||||
import conversationEn from '../locales/en/conversation.json';
|
||||
import exploreEn from '../locales/en/explore.json';
|
||||
import homeEn from '../locales/en/home.json';
|
||||
import memoirEn from '../locales/en/memoir.json';
|
||||
import profileEn from '../locales/en/profile.json';
|
||||
import appZh from '../locales/zh/app.json';
|
||||
import authZh from '../locales/zh/auth.json';
|
||||
import commonZh from '../locales/zh/common.json';
|
||||
import conversationZh from '../locales/zh/conversation.json';
|
||||
import exploreZh from '../locales/zh/explore.json';
|
||||
import homeZh from '../locales/zh/home.json';
|
||||
import memoirZh from '../locales/zh/memoir.json';
|
||||
import profileZh from '../locales/zh/profile.json';
|
||||
|
||||
export const supportedLanguages = ['zh', 'en'] as const;
|
||||
|
||||
export type AppLanguage = (typeof supportedLanguages)[number];
|
||||
|
||||
export const fallbackLanguage: AppLanguage = 'zh';
|
||||
|
||||
export const namespaces = [
|
||||
'app',
|
||||
'auth',
|
||||
'common',
|
||||
'conversation',
|
||||
'home',
|
||||
'explore',
|
||||
'memoir',
|
||||
'profile',
|
||||
] as const;
|
||||
|
||||
export const defaultNS = 'common' as const;
|
||||
|
||||
export const resources = {
|
||||
zh: {
|
||||
app: appZh,
|
||||
auth: authZh,
|
||||
common: commonZh,
|
||||
conversation: conversationZh,
|
||||
home: homeZh,
|
||||
explore: exploreZh,
|
||||
memoir: memoirZh,
|
||||
profile: profileZh,
|
||||
},
|
||||
en: {
|
||||
app: appEn,
|
||||
auth: authEn,
|
||||
common: commonEn,
|
||||
conversation: conversationEn,
|
||||
home: homeEn,
|
||||
explore: exploreEn,
|
||||
memoir: memoirEn,
|
||||
profile: profileEn,
|
||||
},
|
||||
} as const;
|
||||
Reference in New Issue
Block a user