fix: issue of translation for TimeAgo.vue (#7951)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com>
This commit is contained in:
@@ -53,16 +53,24 @@ export default {
|
|||||||
const createdTimeDiff = Date.now() - this.createdAtTimestamp * 1000;
|
const createdTimeDiff = Date.now() - this.createdAtTimestamp * 1000;
|
||||||
const isBeforeAMonth = createdTimeDiff > DAY_IN_MILLI_SECONDS * 30;
|
const isBeforeAMonth = createdTimeDiff > DAY_IN_MILLI_SECONDS * 30;
|
||||||
return !isBeforeAMonth
|
return !isBeforeAMonth
|
||||||
? `Created ${this.createdAtTimeAgo}`
|
? `${this.$t('CHAT_LIST.CHAT_TIME_STAMP.CREATED.LATEST')} ${
|
||||||
: `Created at: ${this.dateFormat(this.createdAtTimestamp)}`;
|
this.createdAtTimeAgo
|
||||||
|
}`
|
||||||
|
: `${this.$t(
|
||||||
|
'CHAT_LIST.CHAT_TIME_STAMP.CREATED.OLDEST'
|
||||||
|
)} ${this.dateFormat(this.createdAtTimestamp)}`;
|
||||||
},
|
},
|
||||||
lastActivity() {
|
lastActivity() {
|
||||||
const lastActivityTimeDiff =
|
const lastActivityTimeDiff =
|
||||||
Date.now() - this.lastActivityTimestamp * 1000;
|
Date.now() - this.lastActivityTimestamp * 1000;
|
||||||
const isNotActive = lastActivityTimeDiff > DAY_IN_MILLI_SECONDS * 30;
|
const isNotActive = lastActivityTimeDiff > DAY_IN_MILLI_SECONDS * 30;
|
||||||
return !isNotActive
|
return !isNotActive
|
||||||
? `Last activity ${this.lastActivityAtTimeAgo}`
|
? `${this.$t('CHAT_LIST.CHAT_TIME_STAMP.LAST_ACTIVITY.ACTIVE')} ${
|
||||||
: `Last activity: ${this.dateFormat(this.lastActivityTimestamp)}`;
|
this.lastActivityAtTimeAgo
|
||||||
|
}`
|
||||||
|
: `${this.$t(
|
||||||
|
'CHAT_LIST.CHAT_TIME_STAMP.LAST_ACTIVITY.NOT_ACTIVE'
|
||||||
|
)} ${this.dateFormat(this.lastActivityTimestamp)}`;
|
||||||
},
|
},
|
||||||
tooltipText() {
|
tooltipText() {
|
||||||
return `${this.createdAt}
|
return `${this.createdAt}
|
||||||
|
|||||||
@@ -41,6 +41,16 @@
|
|||||||
"STATUS": "Status",
|
"STATUS": "Status",
|
||||||
"ORDER_BY": "Order by"
|
"ORDER_BY": "Order by"
|
||||||
},
|
},
|
||||||
|
"CHAT_TIME_STAMP": {
|
||||||
|
"CREATED": {
|
||||||
|
"LATEST": "Created",
|
||||||
|
"OLDEST": "Created at:"
|
||||||
|
},
|
||||||
|
"LAST_ACTIVITY": {
|
||||||
|
"NOT_ACTIVE": "Last activity:",
|
||||||
|
"ACTIVE": "Last activity"
|
||||||
|
}
|
||||||
|
},
|
||||||
"CHAT_SORT_FILTER_ITEMS": {
|
"CHAT_SORT_FILTER_ITEMS": {
|
||||||
"latest": {
|
"latest": {
|
||||||
"TEXT": "Last activity"
|
"TEXT": "Last activity"
|
||||||
|
|||||||
Reference in New Issue
Block a user