diff --git a/vj4/locale/en.yaml b/vj4/locale/en.yaml index fadff53a..2dfe53fb 100644 --- a/vj4/locale/en.yaml +++ b/vj4/locale/en.yaml @@ -38,3 +38,4 @@ domain_edit: Domain Edit domain_role: Domain Role domain_user: Domain User domain_permission: Domain Permission +timeago_locale: en diff --git a/vj4/locale/zh_CN.yaml b/vj4/locale/zh_CN.yaml index 2326169a..2b5ddf83 100644 --- a/vj4/locale/zh_CN.yaml +++ b/vj4/locale/zh_CN.yaml @@ -436,3 +436,4 @@ View training: 查看训练 Have ALL PERMISSIONS in this domain: 在此域中拥有全部权限 Select User: 选择用户 Submitted: 已递交 +timeago_locale: zh_CN diff --git a/vj4/locale/zh_TW.yaml b/vj4/locale/zh_TW.yaml index 248c8926..e0ab9afb 100644 --- a/vj4/locale/zh_TW.yaml +++ b/vj4/locale/zh_TW.yaml @@ -416,3 +416,4 @@ Create contests: 創建比賽 Attend contests: 參加比賽 View training: 檢視訓練 Have ALL PERMISSIONS in this domain: 在此域中擁有全部許可權 +timeago_locale: zh_CN diff --git a/vj4/ui/components/messagepad/MessagePadDialogueContentContainer.js b/vj4/ui/components/messagepad/MessagePadDialogueContentContainer.js index e7b2a514..0cc85e4b 100644 --- a/vj4/ui/components/messagepad/MessagePadDialogueContentContainer.js +++ b/vj4/ui/components/messagepad/MessagePadDialogueContentContainer.js @@ -7,6 +7,8 @@ import moment from 'moment'; import 'jquery-scroll-lock'; import 'jquery.easing'; +import i18n from '../../utils/i18n'; + const mapStateToProps = (state) => ({ activeId: state.activeId, item: state.activeId !== null @@ -32,7 +34,7 @@ export default class MessagePadDialogueContentContainer extends React.PureCompon >
{reply.content}
)); diff --git a/vj4/ui/components/scratchpad/ScratchpadRecordsRowContainer.js b/vj4/ui/components/scratchpad/ScratchpadRecordsRowContainer.js index 23cd4e59..85f387b7 100644 --- a/vj4/ui/components/scratchpad/ScratchpadRecordsRowContainer.js +++ b/vj4/ui/components/scratchpad/ScratchpadRecordsRowContainer.js @@ -75,7 +75,7 @@ export default class ScratchpadRecordsRowContainer extends React.PureComponent { diff --git a/vj4/ui/components/time/time.page.js b/vj4/ui/components/time/time.page.js index 48576dc9..9e33ac03 100644 --- a/vj4/ui/components/time/time.page.js +++ b/vj4/ui/components/time/time.page.js @@ -1,7 +1,9 @@ import { AutoloadPage } from '../../misc/PageLoader'; import libTimeago from 'timeago.js'; +import i18n from '../../utils/i18n'; const timeago = libTimeago(); +timeago.setLocale(i18n('timeago_locale')); function runRelativeTime($container) { for (const element of $container.find('span.time[data-timestamp]')) {