-
Notifications
You must be signed in to change notification settings - Fork 3k
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
LHN - [Comment Deleted] text translated in Spanish after refresh the page #7764
Comments
Triggered auto assignment to @Julesssss ( |
cc: @sobitneupane |
Triggered auto assignment to @SofiedeVreese ( |
Proposal: App/src/libs/actions/Report.js Lines 177 to 187 in a98df64
+ 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: 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; |
Aren't we removing [comment deleted] in #7646 ? |
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. |
Oh. Sorry, I thought it is a regression so I tagged Sobit. |
To reconfirm, this is not a regression and should be pushed externally? |
Regardless it can be made external |
Pushed to Upwork: https://www.upwork.com/jobs/~014083d785aaa36749 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Current assignee @Julesssss is eligible for the Exported assigner, not assigning anyone new. |
@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. |
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 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
[Comment Deleted] alternate text should be translated in LHN
Actual Result:
[Comment Deleted] text translated in Spanish after refresh the page
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.39-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug5455148_1502.mp4
Recording.218.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:
Issue was found when executing: #7552
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: