add common text
parent
eea622b657
commit
2e2629fe0a
|
|
@ -0,0 +1,17 @@
|
||||||
|
import { Moment } from 'moment';
|
||||||
|
|
||||||
|
export interface CommonText {
|
||||||
|
createdAtText(time: Moment): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const commonTextZhCn: CommonText = {
|
||||||
|
createdAtText(time: Moment): string {
|
||||||
|
return '创建于 ' + time.format('YYYY-MM-DD HH:mm');
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const commonTextEnUs: CommonText = {
|
||||||
|
createdAtText(time: Moment): string {
|
||||||
|
return 'Created at ' + time.format('YYYY-MM-DD HH:mm');
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -15,8 +15,10 @@ import {
|
||||||
ticketDetailEnUs,
|
ticketDetailEnUs,
|
||||||
ticketDetailZhCn,
|
ticketDetailZhCn,
|
||||||
} from './TicketDetail';
|
} from './TicketDetail';
|
||||||
|
import { CommonText, commonTextZhCn } from './common';
|
||||||
|
|
||||||
interface TextRecord {
|
interface TextRecord {
|
||||||
|
common: CommonText;
|
||||||
pageFooter: PageFooterText;
|
pageFooter: PageFooterText;
|
||||||
mainPage: MainPageText;
|
mainPage: MainPageText;
|
||||||
userPage: UserPageText;
|
userPage: UserPageText;
|
||||||
|
|
@ -33,6 +35,7 @@ interface TextRecord {
|
||||||
}
|
}
|
||||||
|
|
||||||
const textZhCn: TextRecord = {
|
const textZhCn: TextRecord = {
|
||||||
|
common: commonTextZhCn,
|
||||||
pageFooter: pageFooterZhCn,
|
pageFooter: pageFooterZhCn,
|
||||||
mainPage: mainPageZhCn,
|
mainPage: mainPageZhCn,
|
||||||
userPage: userPageZhCn,
|
userPage: userPageZhCn,
|
||||||
|
|
@ -49,6 +52,7 @@ const textZhCn: TextRecord = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const textEnUs: TextRecord = {
|
const textEnUs: TextRecord = {
|
||||||
|
common: commonTextZhCn,
|
||||||
pageFooter: pageFooterEnUs,
|
pageFooter: pageFooterEnUs,
|
||||||
mainPage: mainPageEnUs,
|
mainPage: mainPageEnUs,
|
||||||
userPage: userPageEnUs,
|
userPage: userPageEnUs,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue