-
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
[$1000] LHN Attachment taking some time to translate into Spanish #19449
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
I have reproduced this, but could only do so on OSX desktop app (not on OSX Chrome). |
Job added to Upwork: https://www.upwork.com/jobs/~015d09625bb565179a |
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Triggered auto assignment to @yuwenmemon ( |
This comment was marked as outdated.
This comment was marked as outdated.
ProposalPlease re-state the problem that we are trying to solve in this issue.LHN Attachment taking some to to translate into Spanish What is the root cause of that problem?We are checking the preview message of attachment here: Lines 261 to 266 in a995c4d
If the current last message is attachment then update the last message with the translate message. Now let take a look at function ReportUtils.isReportMessageAttachment :App/src/libs/isReportMessageAttachment.js Lines 10 to 16 in a995c4d
In this case, the last text message is "Uploading attachment..." which make isReportMessageAttachment return false, that's why we still saw the english message even when we changed language to Spanish.
What changes do you think we should make in order to solve the problem?We should update the const UPLOADING_ATTACHMENT = "Uploading attachment...";
export default function isReportMessageAttachment({text, html}) {
if (!text || !html) {
return false;
}
const regex = new RegExp(` ${CONST.ATTACHMENT_SOURCE_ATTRIBUTE}="(.*)"`, 'i');
return (text === CONST.ATTACHMENT_MESSAGE_TEXT || text === UPLOADING_ATTACHMENT) && !!html.match(regex);
} What alternative solutions did you explore? (Optional)More ever, we also create a new function call: |
ProposalPlease re-state the problem that we are trying to solve in this issue.LHN Attachment taking some to to translate into Spanish What is the root cause of that problem?There are two problems
But when we build optimistic data we do not include html field, we only include text: App/src/libs/actions/Report.js Lines 214 to 219 in a995c4d
So automatically attachment's optimistic data is not going to pass isReportMessageAttachment function
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.After uploading an attachment while in Spanish, the lastMessage shows [Attachment] until the OpenReport action is fired again. What is the root cause of that problem?Since the upload process is taking some time to finish, we initially add on the report the HTML After the attachment is uploaded, it is being switched to the actual HTML code, which can then be processed by our Regex and identify the Attachment, translating it successfully. The issue is that the report is not updating after the attachment is uploaded, which causes it to show the hardCoded text What changes do you think we should make in order to solve the problem?While the above proposals are close to the issue, their solution is not gonna work, since the My suggested solution is to actually reconnect to the Report once the Attachment is uploaded, and therefore translate the text immediately. On the following code, we should add a line to run the
Also, while the attachment is uploading, we show the [Attachment] text. We should probably change that and show 'Uploading..' or something. EDIT TO ADD VIDEO (First website is Production, Second is my Dev): Screen.Recording.2023-05-24.at.12.02.48.AM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.LHN Attachment taking some to to translate into Spanish. What is the root cause of that problem?When we're uploading an attachment, the last message HTML will be Line 1212 in 5cb2b74
It will fail the check in App/src/libs/isReportMessageAttachment.js Line 16 in 5cb2b74
So the report last message will show the Line 263 in 5cb2b74
I think there's a deeper problem to this. There're 2 types of text message:
We're conflating the above 2 types, and try to check hardcoded text (like if the text matches
There's already another bug related to this, which is if you change the language to What changes do you think we should make in order to solve the problem?A better way to show the correct message for attachment-related system messages will be to separate the 2 types of text messages. We should introduce a new Then when ww show the attachment-related system messages in the LHN or the report messages, we'll check if the message has the What alternative solutions did you explore? (Optional)NA |
@eVoloshchak We have four proposals here for your review! |
Escalated the bump to Slack |
I agree with @tienifr on this one, our current implementation isn't ideal. We should have a separate
🎀👀🎀 C+ reviewed! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
We do, Melvin! We're just waiting on @yuwenmemon to review and confirm the proposal, then assign if appropriate |
Going to close this and move the convo into #22937 as that is the bug we still need to fix |
@conorpendergrast @eVoloshchak The regression #22937 was fixed somewhere else and no payment involved there. I had updated in the issue 3 weeks ago but missed this one. I think we can reopen this issue and handle payment as usual. |
@conorpendergrast Can you take a look above ^? |
@conorpendergrast @thienlnam gentle bump on the above comment, thanks! |
Sorry, reopening to take a look at this! |
@conorpendergrast, @eVoloshchak, @thienlnam, @tienifr Huh... This is 4 days overdue. Who can take care of this? |
@tienifr hey, thanks for the prompts here and I'm sorry for the delay. Can you confirm what you're seeing as to pay? I don't think that there was C or C+ work done here, and the bug reporter has already been paid. Thank you! |
@conorpendergrast There was a PR merged here to solve this issue, then a regression occured but already fixed somewhere else. So @eVoloshchak and I are eligible for compensation. The reason why only the bug reporter has been paid is that at that time we closed the issue but then reopened to handle general cases. |
@conorpendergrast, @eVoloshchak, @thienlnam, @tienifr Eep! 4 days overdue now. Issues have feelings too... |
@tienifr ok, it sounds like I'll need to send an offer for payment to you and @eVoloshchak for $500 each ($1000 * 50% for a regression). Do you agree that's correct? |
Assuming that's the case, payouts due:
|
@conorpendergrast, @eVoloshchak, @thienlnam, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@eVoloshchak please accept the offer! |
Last bump to accept the offer please |
@conorpendergrast, no need for Upwork, I just requested the payment via NewDot |
Ah, sorry, I forgot to check that! All done, closing |
$500 payment approved for @Santhosh-Sellavel based on this comment. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Attachment should be translated into Spanish after sending it to user
Actual Result:
LHN Attachment taking some to to translate into Spanish
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.17.0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
2023-05-18.19-01-57.mp4
Recording.2789.mp4
Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79 (already paid)
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684419239615069
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: