You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LHN - [Comment Deleted] text translated in Spanish after refresh the page #7764
changed the title [-]LHN - [Delete Attachment] text translated in Spanish after refresh the page[/-][+]LHN - [Comment Deleted] text translated in Spanish after refresh the page[/+]on Feb 15, 2022
+ let isLastMessageDeleted = false;
let lastMessageText = null;
if (report.reportActionCount > 0) {
// We are removing any html tags from the message html since we cannot access the text version of any comments as
// the report only has the raw reportActionList and not the processed version returned by Report_GetHistory
// We convert the line-breaks in html to space ' ' before striping the tags
lastMessageText = lastActionMessage
.replace(/((<br[^>]*>)+)/gi, ' ')
.replace(/(<([^>]+)>)/gi, '') || `[${Localize.translateLocal('common.deletedCommentMessage')}]`;
lastMessageText = ReportUtils.formatReportLastMessageText(lastMessageText);
+ isLastMessageDeleted = !lastActionMessage && true
}
and use it in src/libs/OptionsListUtils.js in the following way:
Activity
MelvinBot commentedon Feb 15, 2022
Triggered auto assignment to @Julesssss (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.[-]LHN - [Delete Attachment] text translated in Spanish after refresh the page[/-][+]LHN - [Comment Deleted] text translated in Spanish after refresh the page[/+]parasharrajat commentedon Feb 16, 2022
cc: @sobitneupane
MelvinBot commentedon Feb 16, 2022
Triggered auto assignment to @SofiedeVreese (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.sobitneupane commentedon Feb 16, 2022
Proposal:
Return isLastMessageDeleted from
getSimplifiedReportObject()in src/libs/actions/Report.jsApp/src/libs/actions/Report.js
Lines 177 to 187 in a98df64
and use it in src/libs/OptionsListUtils.js in the following way:
App/src/libs/OptionsListUtils.js
Lines 229 to 231 in a98df64
let lastMessageTextFromReport = ReportUtils.isReportMessageAttachment(lodashGet(report, 'lastMessageText', '')) ? `[${Localize.translateLocal('common.attachment')}]` : Str.htmlDecode(lodashGet(report, 'lastMessageText', '')); + lastMessageTextFromReport = lodashGet(report, 'isLastMessageDeleted', false) + ? `[${Localize.translateLocal('common.deletedCommentMessage')}]` + : lastMessageTextFromReport;thesahindia commentedon Feb 16, 2022
Aren't we removing [comment deleted] in #7646 ?
cc: @parasharrajat @Julesssss
Julesssss commentedon Feb 16, 2022
Yes, good spot.
It's not certain that we'll prioritize that improvement internally though. I think we should just make this fix anyway for now.
parasharrajat commentedon Feb 16, 2022
Oh. Sorry, I thought it is a regression so I tagged Sobit.
SofiedeVreese commentedon Feb 16, 2022
To reconfirm, this is not a regression and should be pushed externally?
Julesssss commentedon Feb 17, 2022
Regardless it can be made external
SofiedeVreese commentedon Feb 18, 2022
Pushed to Upwork: https://www.upwork.com/jobs/~014083d785aaa36749
MelvinBot commentedon Feb 18, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
Exported)MelvinBot commentedon Feb 18, 2022
Current assignee @Julesssss is eligible for the Exported assigner, not assigning anyone new.
rushatgabhane commentedon Feb 21, 2022
@Julesssss there's already a PR out which makes this issue redundant, and it's like 99% done.
I suggest that we wait for #7711 to merge.
Julesssss commentedon Feb 21, 2022
I did see that but it didn't seem too close to completion previously. But yeah, as this still hasn't been assigned lets close it