Skip to content

Commit bdf3a74

Browse files
authored
Merge pull request #7552 from sobitneupane/sn_bug-attachment-translation
2 parents 0b58649 + 8ff224d commit bdf3a74

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/libs/OptionsListUtils.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,13 @@ function createOption(personalDetailList, report, {
226226
: {};
227227

228228
const lastActorDetails = report ? _.find(personalDetailList, {login: report.lastActorEmail}) : null;
229-
const lastMessageText = report
230-
? (hasMultipleParticipants && lastActorDetails
231-
? `${lastActorDetails.displayName}: `
232-
: '')
233-
+ Str.htmlDecode(report.lastMessageText)
229+
const lastMessageTextFromReport = ReportUtils.isReportMessageAttachment(lodashGet(report, 'lastMessageText', ''))
230+
? `[${Localize.translateLocal('common.attachment')}]`
231+
: Str.htmlDecode(lodashGet(report, 'lastMessageText', ''));
232+
let lastMessageText = report && hasMultipleParticipants && lastActorDetails
233+
? `${lastActorDetails.displayName}: `
234234
: '';
235+
lastMessageText += report ? lastMessageTextFromReport : '';
235236

236237
const tooltipText = ReportUtils.getReportParticipantsTitle(lodashGet(report, ['participants'], []));
237238

0 commit comments

Comments
 (0)