add localization for settings page
parent
d995c6ed43
commit
3232994fb2
|
|
@ -58,11 +58,11 @@ export default class SettingsPage extends Component {
|
||||||
</Picker>
|
</Picker>
|
||||||
</View>
|
</View>
|
||||||
<AtButton type='secondary' onClick={this.handleAbout.bind(this)}>
|
<AtButton type='secondary' onClick={this.handleAbout.bind(this)}>
|
||||||
关于 EVA Notify
|
{pt.get().settingsPage.aboutText}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
|
|
||||||
<AtButton type='primary' onClick={this.handleQuit.bind(this)}>
|
<AtButton type='primary' onClick={this.handleQuit.bind(this)}>
|
||||||
退出账号
|
{pt.get().settingsPage.quitText}
|
||||||
</AtButton>
|
</AtButton>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
export interface SettingsPageText {
|
||||||
|
aboutText: string;
|
||||||
|
quitText: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const settingsPageZhCn: SettingsPageText = {
|
||||||
|
aboutText: '关于 EVA Notify',
|
||||||
|
quitText: '退出账号',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const settingsPageEnUs: SettingsPageText = {
|
||||||
|
aboutText: 'About EVA Notify',
|
||||||
|
quitText: 'Log Out',
|
||||||
|
};
|
||||||
|
|
@ -2,12 +2,18 @@ import { PageFooterText, pageFooterZhCn, pageFooterEnUs } from './PageFooter';
|
||||||
import { MainPageText, mainPageZhCn, mainPageEnUs } from './MainPage';
|
import { MainPageText, mainPageZhCn, mainPageEnUs } from './MainPage';
|
||||||
import { UserPageText, userPageZhCn, userPageEnUs } from './UserPage';
|
import { UserPageText, userPageZhCn, userPageEnUs } from './UserPage';
|
||||||
import { TabBarText, tabBarEnUs, tabBarZhCn } from './TabBar';
|
import { TabBarText, tabBarEnUs, tabBarZhCn } from './TabBar';
|
||||||
|
import {
|
||||||
|
SettingsPageText,
|
||||||
|
settingsPageEnUs,
|
||||||
|
settingsPageZhCn,
|
||||||
|
} from './SettingsPage';
|
||||||
|
|
||||||
interface TextRecord {
|
interface TextRecord {
|
||||||
pageFooter: PageFooterText;
|
pageFooter: PageFooterText;
|
||||||
mainPage: MainPageText;
|
mainPage: MainPageText;
|
||||||
userPage: UserPageText;
|
userPage: UserPageText;
|
||||||
tabBar: TabBarText;
|
tabBar: TabBarText;
|
||||||
|
settingsPage: SettingsPageText;
|
||||||
}
|
}
|
||||||
|
|
||||||
const textZhCn: TextRecord = {
|
const textZhCn: TextRecord = {
|
||||||
|
|
@ -15,6 +21,7 @@ const textZhCn: TextRecord = {
|
||||||
mainPage: mainPageZhCn,
|
mainPage: mainPageZhCn,
|
||||||
userPage: userPageZhCn,
|
userPage: userPageZhCn,
|
||||||
tabBar: tabBarZhCn,
|
tabBar: tabBarZhCn,
|
||||||
|
settingsPage: settingsPageZhCn,
|
||||||
};
|
};
|
||||||
|
|
||||||
const textEnUs: TextRecord = {
|
const textEnUs: TextRecord = {
|
||||||
|
|
@ -22,6 +29,7 @@ const textEnUs: TextRecord = {
|
||||||
mainPage: mainPageEnUs,
|
mainPage: mainPageEnUs,
|
||||||
userPage: userPageEnUs,
|
userPage: userPageEnUs,
|
||||||
tabBar: tabBarEnUs,
|
tabBar: tabBarEnUs,
|
||||||
|
settingsPage: settingsPageEnUs,
|
||||||
};
|
};
|
||||||
|
|
||||||
// type Lang = 'zh_CN' | 'en_US' | ...;
|
// type Lang = 'zh_CN' | 'en_US' | ...;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue