-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate alternate text to Spanish #7552
Changes from 2 commits
cf9d0af
64dab20
6188268
8ff224d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,6 +221,7 @@ function createOption(personalDetailList, report, { | |
const personalDetail = personalDetailList[0]; | ||
const hasDraftComment = hasReportDraftComment(report); | ||
const hasOutstandingIOU = lodashGet(report, 'hasOutstandingIOU', false); | ||
const isLastMessageAttachment = report ? ReportUtils.isReportMessageAttachment(report.lastMessageText) : false; | ||
const iouReport = hasOutstandingIOU | ||
? lodashGet(iouReports, `${ONYXKEYS.COLLECTION.REPORT_IOUS}${report.iouReportID}`, {}) | ||
: {}; | ||
|
@@ -230,7 +231,7 @@ function createOption(personalDetailList, report, { | |
? (hasMultipleParticipants && lastActorDetails | ||
? `${lastActorDetails.displayName}: ` | ||
: '') | ||
+ Str.htmlDecode(report.lastMessageText) | ||
+ (isLastMessageAttachment ? `[${Localize.translateLocal('common.attachment')}]` : Str.htmlDecode(report.lastMessageText)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we please simplify this ternary? lets not nest it multi levels. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be okay. Any suggestion? const lastMessageTextFromReport = isLastMessageAttachment ? `[${Localize.translateLocal('common.attachment')}]` : Str.htmlDecode(report.lastMessageText);
const lastMessageText = report
? (hasMultipleParticipants && lastActorDetails
? `${lastActorDetails.displayName}: `
: '')
+ (lastMessageTextFromReport)
: ''; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's break the concatenation into the next line.
|
||
: ''; | ||
|
||
const tooltipText = ReportUtils.getReportParticipantsTitle(lodashGet(report, ['participants'], [])); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.