add en_US structure for plain-text
parent
34c3753d2c
commit
c63b7fcca8
|
|
@ -75,3 +75,52 @@ export const mainPageZhCn: MainPageText = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const mainPageEnUs: MainPageText = {
|
||||||
|
mainTitleLine: '您好,这里是E志者协会',
|
||||||
|
subTitleLine: '维修请至【东三-204】实验室',
|
||||||
|
cardTitle: {
|
||||||
|
dutyInfo: '204值班情况',
|
||||||
|
stepInfo: '维修步骤',
|
||||||
|
tipsInfo: '注意事项',
|
||||||
|
},
|
||||||
|
expandTitle: {
|
||||||
|
stepInfo: '查看维修步骤',
|
||||||
|
tipsInfo: '查看注意事项',
|
||||||
|
},
|
||||||
|
stepList: [
|
||||||
|
{ title: '线上填写工单' },
|
||||||
|
{ title: '去`东三-204`实验室维修电脑' },
|
||||||
|
{ title: '等待电脑维修' },
|
||||||
|
{ title: '维修结束,取回电脑' },
|
||||||
|
],
|
||||||
|
tipsList: [
|
||||||
|
{ title: '戴尔、Surface、外星人、苹果电脑不能拆机哦~' },
|
||||||
|
{ title: '数据无价,请随时做好数据备份哦~' },
|
||||||
|
{ title: '204也是实验室,请遵守实验室纪律,请勿饮食~' },
|
||||||
|
{ title: '我们是志愿服务,不收任何礼物哦~' },
|
||||||
|
],
|
||||||
|
dutyCard: {
|
||||||
|
offDuty: {
|
||||||
|
title: '未值班',
|
||||||
|
reason: s => '值班停止原因:' + s,
|
||||||
|
recoverTime: t => '恢复值班时间:' + t,
|
||||||
|
},
|
||||||
|
inDuty: {
|
||||||
|
title: '值班中',
|
||||||
|
currentDutyText: c => {
|
||||||
|
switch (c) {
|
||||||
|
case 'off':
|
||||||
|
return '当前未值班';
|
||||||
|
case '1':
|
||||||
|
return '第一班 13:30-16:00';
|
||||||
|
case '2':
|
||||||
|
return '第二班 16:00-18:00';
|
||||||
|
case '3':
|
||||||
|
return '第三班 18:00-20:30';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
inDutyCnt: n => '当前值班人数:' + n,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,7 @@ export interface PageFooterText {
|
||||||
export const pageFooterZhCn: PageFooterText = {
|
export const pageFooterZhCn: PageFooterText = {
|
||||||
dividerText: 'EVA Notify',
|
dividerText: 'EVA Notify',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const pageFooterEnUs: PageFooterText = {
|
||||||
|
dividerText: 'EVA Notify',
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -39,3 +39,24 @@ export const userPageZhCn: UserPageText = {
|
||||||
note: '有什么想说的都可以告诉亦可哦!',
|
note: '有什么想说的都可以告诉亦可哦!',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const userPageEnUs: UserPageText = {
|
||||||
|
mainTitleLine: '您好,这里是E志者协会',
|
||||||
|
subTitleLine: '维修请至【东三-204】实验室',
|
||||||
|
ticketColumn: {
|
||||||
|
title: '我的工单',
|
||||||
|
note: '在这里查看历史工单!',
|
||||||
|
},
|
||||||
|
infoColumn: {
|
||||||
|
title: '我的信息',
|
||||||
|
note: '能帮助亦可更好地找到你哦!',
|
||||||
|
},
|
||||||
|
settingsColumn: {
|
||||||
|
title: 'Settings',
|
||||||
|
note: '在这里配置小程序',
|
||||||
|
},
|
||||||
|
reportColumn: {
|
||||||
|
title: '意见反馈',
|
||||||
|
note: '有什么想说的都可以告诉亦可哦!',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { PageFooterText, pageFooterZhCn } from './PageFooter';
|
import { PageFooterText, pageFooterZhCn, pageFooterEnUs } from './PageFooter';
|
||||||
import { MainPageText, mainPageZhCn } from './MainPage';
|
import { MainPageText, mainPageZhCn, mainPageEnUs } from './MainPage';
|
||||||
import { UserPageText, userPageZhCn } from './UserPage';
|
import { UserPageText, userPageZhCn, userPageEnUs } from './UserPage';
|
||||||
|
|
||||||
interface TextRecord {
|
interface TextRecord {
|
||||||
pageFooter: PageFooterText;
|
pageFooter: PageFooterText;
|
||||||
|
|
@ -14,15 +14,23 @@ const textZhCn: TextRecord = {
|
||||||
userPage: userPageZhCn,
|
userPage: userPageZhCn,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const textEnUs: TextRecord = {
|
||||||
|
pageFooter: pageFooterEnUs,
|
||||||
|
mainPage: mainPageEnUs,
|
||||||
|
userPage: userPageEnUs,
|
||||||
|
};
|
||||||
|
|
||||||
// type Lang = 'zh_CN' | 'en_US' | ...;
|
// type Lang = 'zh_CN' | 'en_US' | ...;
|
||||||
type Lang = 'zh_CN';
|
type Lang = 'zh_CN' | 'en_US';
|
||||||
|
|
||||||
class PlainText {
|
class PlainText {
|
||||||
private readonly textZhCn: TextRecord;
|
private readonly textZhCn: TextRecord;
|
||||||
|
private readonly textEnUs: TextRecord;
|
||||||
private lang: Lang;
|
private lang: Lang;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.textZhCn = textZhCn;
|
this.textZhCn = textZhCn;
|
||||||
|
this.textEnUs = textEnUs;
|
||||||
this.lang = 'zh_CN';
|
this.lang = 'zh_CN';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,6 +41,8 @@ class PlainText {
|
||||||
get(): TextRecord {
|
get(): TextRecord {
|
||||||
if (this.lang == 'zh_CN') {
|
if (this.lang == 'zh_CN') {
|
||||||
return this.textZhCn;
|
return this.textZhCn;
|
||||||
|
} else if (this.lang == 'en_US') {
|
||||||
|
return this.textEnUs;
|
||||||
}
|
}
|
||||||
return this.textZhCn;
|
return this.textZhCn;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue