Skip to content

Commit

Permalink
Merge pull request #4133 from dklymenk/3743-3293-return-LHN-label-for…
Browse files Browse the repository at this point in the history
…-deleted-messages

Revert "Merge pull request #4085 from Expensify/chirag-revert-3979"
  • Loading branch information
chiragsalian authored Nov 16, 2021
2 parents 9541bb1 + 54d1781 commit 8ca2cbb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default {
notifications: 'Notifications',
na: 'N/A',
noResultsFound: 'No results found',
deletedCommentMessage: 'Comment deleted',
timePrefix: 'It\'s',
conjunctionFor: 'for',
todayAt: 'Today at',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default {
notifications: 'Notificaciones',
na: 'N/A',
noResultsFound: 'No se han encontrado resultados',
deletedCommentMessage: 'Comentario borrado',
timePrefix: 'Son las',
conjunctionFor: 'para',
todayAt: 'Hoy a las',
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function getSimplifiedReportObject(report) {
// We convert the line-breaks in html to space ' ' before striping the tags
const lastMessageText = lastActionMessage
.replace(/((<br[^>]*>)+)/gi, ' ')
.replace(/(<([^>]+)>)/gi, '');
.replace(/(<([^>]+)>)/gi, '') || `[${translateLocal('common.deletedCommentMessage')}]`;
const reportName = lodashGet(report, ['reportNameValuePairs', 'type']) === 'chat'
? getChatReportName(report, chatType)
: report.reportName;
Expand Down Expand Up @@ -529,7 +529,7 @@ function updateReportActionMessage(reportID, sequenceNumber, message) {
// If this is the most recent message, update the lastMessageText in the report object as well
if (sequenceNumber === reportMaxSequenceNumbers[reportID]) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {
lastMessageText: message.text,
lastMessageText: message.text || `[${translateLocal('common.deletedCommentMessage')}]`,
});
}
}
Expand Down

0 comments on commit 8ca2cbb

Please sign in to comment.