add common text

yhy
FrozenArcher 2024-03-12 12:48:58 +08:00
parent eea622b657
commit 2e2629fe0a
2 changed files with 21 additions and 0 deletions

View File

@ -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');
},
};

View File

@ -15,8 +15,10 @@ import {
ticketDetailEnUs,
ticketDetailZhCn,
} from './TicketDetail';
import { CommonText, commonTextZhCn } from './common';
interface TextRecord {
common: CommonText;
pageFooter: PageFooterText;
mainPage: MainPageText;
userPage: UserPageText;
@ -33,6 +35,7 @@ interface TextRecord {
}
const textZhCn: TextRecord = {
common: commonTextZhCn,
pageFooter: pageFooterZhCn,
mainPage: mainPageZhCn,
userPage: userPageZhCn,
@ -49,6 +52,7 @@ const textZhCn: TextRecord = {
};
const textEnUs: TextRecord = {
common: commonTextZhCn,
pageFooter: pageFooterEnUs,
mainPage: mainPageEnUs,
userPage: userPageEnUs,