feat: allow translation

This commit is contained in:
Shivam Mishra
2023-10-10 19:21:39 +05:30
parent 603c45a907
commit 8db377d29b
2 changed files with 18 additions and 3 deletions
@@ -50,13 +50,23 @@ export default {
if (this.attachments.length > 1) {
if (firstFileName) {
return `${firstFileName} and ${this.attachments.length - 1} more`;
return this.$t(
'CONVERSATION.REPLY_TO_ATTACHMENT.FILE_PLUS_MULTIPLE',
{
first: firstFileName,
count: (this.attachments.length - 1).toLocaleString(),
}
);
}
return `${this.attachments.length} files`;
return this.$t('CONVERSATION.REPLY_TO_ATTACHMENT.COUNT', {
count: this.attachments.length.toLocaleString(),
});
}
return firstFileName ?? 'Attachment';
return (
firstFileName ?? this.$t('CONVERSATION.REPLY_TO_ATTACHMENT.ATTACHMENT')
);
},
},
};
@@ -47,6 +47,11 @@
"RATING_TITLE": "Rating",
"FEEDBACK_TITLE": "Feedback",
"REPLY_MESSAGE_NOT_FOUND": "Not available, click to scroll to the message",
"REPLY_TO_ATTACHMENT": {
"FILE_PLUS_MULTIPLE": "%{first} and %{count} others",
"COUNT": "%{count} files",
"ATTACHMENT": "Attachment"
},
"CARD": {
"SHOW_LABELS": "Show labels",
"HIDE_LABELS": "Hide labels"