Skip to content
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

[HOLD for payment 2023-09-21] [$500] Request Money/Scan: Validation messages are not translated to Spanish #25865

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 24, 2023 · 40 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 24, 2023

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:

  1. Click plus button, choose Request Money.
  2. Click scan tab, drag an invalid file to the scan tab (too big > 25MB or too small < 240KB), a validation modal will show.
  3. Open a new tab, change the current language to Spanish.
  4. Notice that validation messages are not translated to Spanish.

Expected Result:

Validation messages should be translated to Spanish

Actual Result:

Validation messages are not translated to Spanish

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.57-0

Reproducible in staging?: Y

Reproducible in production?: Y

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

Screen.Recording.2023-08-13.At.11.24.39.mp4
Recording.1315.mp4

Expensify/Expensify Issue URL:

Issue reported by: @hungvu193

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691900667713019

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fbfb6ee98fe603c3
  • Upwork Job ID: 1696537225664692224
  • Last Price Increase: 2023-09-01
  • Automatic offers:
    • aimane-chnaif | Reviewer | 26568326
    • hungvu193 | Contributor | 26568328
    • hungvu193 | Reporter | 26568330
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 24, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@izarutskaya
Copy link
Author

izarutskaya commented Aug 24, 2023

Proposal from @hungvu193

Please re-state the problem that we are trying to solve in this issue.

Request Money/Scan: Validation messages are not translated to Spanish

What is the root cause of that problem?

We're setting the validation message here, instead of translateKey, because of that when the language is changed, it didn't change to Spanish:

const validateReceipt = (file) => {
const {fileExtension} = FileUtils.splitExtensionFromFileName(lodashGet(file, 'name', ''));
if (_.contains(CONST.API_ATTACHMENT_VALIDATIONS.UNALLOWED_EXTENSIONS, fileExtension.toLowerCase())) {
Receipt.setUploadReceiptError(true, Localize.translateLocal('attachmentPicker.wrongFileType'), Localize.translateLocal('attachmentPicker.notAllowedExtension'));
return false;
}
if (lodashGet(file, 'size', 0) > CONST.API_ATTACHMENT_VALIDATIONS.MAX_SIZE) {
Receipt.setUploadReceiptError(true, Localize.translateLocal('attachmentPicker.attachmentTooLarge'), Localize.translateLocal('attachmentPicker.sizeExceeded'));
return false;
}
if (lodashGet(file, 'size', 0) < CONST.API_ATTACHMENT_VALIDATIONS.MIN_SIZE) {
Receipt.setUploadReceiptError(true, Localize.translateLocal('attachmentPicker.attachmentTooSmall'), Localize.translateLocal('attachmentPicker.sizeNotMet'));
return false;
}
return true;
};

What changes do you think we should make in order to solve the problem?

We should use translateKey only, so we need to remove all the Localize.translateLocal from our validateReceipt function. For example:

Receipt.setUploadReceiptError(true,'attachmentPicker.attachmentTooLarge', 'attachmentPicker.sizeExceeded');

After that, we should also update our ConfirmModal here, to make it translate the translateKey:

            <ConfirmModal
                title={attachmentInvalidReasonTitle ? translate(attachmentInvalidReasonTitle) :''}
                onConfirm={Receipt.clearUploadReceiptError}
                onCancel={Receipt.clearUploadReceiptError}
                isVisible={isAttachmentInvalid}
                prompt={attachmentInvalidReason ? translate(attachmentInvalidReason) : ''}
                confirmText={translate('common.close')}
                shouldShowCancelButton={false}
            />

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Aug 29, 2023

Similar to #25704 (comment), seeing as this is low-priority and not necessarily an upgrade to the app's functionality, I am reducing the payscale for this issue to the following:

  • Bug reporting bonus: $250
  • Contributor fix: $500
  • C+ proposal/PR review: $500

Just noting this before I add the labels to accept proposals.

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2023
@stephanieelliott stephanieelliott changed the title Request Money/Scan: Validation messages are not translated to Spanish [$250] Request Money/Scan: Validation messages are not translated to Spanish Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

@stephanieelliott stephanieelliott added the External Added to denote the issue can be worked on by a contributor label Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01fbfb6ee98fe603c3

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)

@ghost
Copy link

ghost commented Aug 29, 2023

Dibs

@himanshuragi456
Copy link
Contributor

I'd like to work

@stephanieelliott
Copy link
Contributor

Hey @AnshuAgarwal24 @himanshuragi456 this is not a "dibs" situation, if you would like to work on this issue please post a proposal per CONTRIBUTING.md

@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2023
@stephanieelliott
Copy link
Contributor

Updating price to match #25704 (comment). Moving to Weekly since this is low priority.

@melvin-bot melvin-bot bot removed the Overdue label Sep 1, 2023
@stephanieelliott stephanieelliott added Weekly KSv2 and removed Daily KSv2 labels Sep 1, 2023
@stephanieelliott stephanieelliott changed the title [$250] Request Money/Scan: Validation messages are not translated to Spanish [$500] Request Money/Scan: Validation messages are not translated to Spanish Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

Upwork job price has been updated to $500

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 5, 2023
@melvin-bot melvin-bot bot changed the title [$500] Request Money/Scan: Validation messages are not translated to Spanish [HOLD for payment 2023-09-21] [$500] Request Money/Scan: Validation messages are not translated to Spanish Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.69-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-09-21. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@aimane-chnaif] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@stephanieelliott] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sakluger
Copy link
Contributor

Hey team, I was assigned Android - IOU - Validation message not shown when file above 25mb for Smart Recipe was selected #27389 which Applause created after testing this issue's linked PR. Basically, we're not showing any validation when scanning a receipt file over 25MB.

According to the PR description, the >25MB validation should have been included in the PR. Can anyone help explain why we still deployed that PR to staging and Prod even after QA found an issue?

@aimane-chnaif
Copy link
Contributor

@sakluger there's no file size validation on native (iOS/android). Our PR fixes web based platforms only, never touched native code.

@sakluger
Copy link
Contributor

I see, so we never had this validation on mobile, thanks for clarifying. I assume we want to prevent attachments >25mb on all platforms, even if we didn't implement it before.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 21, 2023
@stephanieelliott
Copy link
Contributor

stephanieelliott commented Sep 22, 2023

Hey @aimane-chnaif can you complete the BZ checklist please?

Summarizing payment on this issue:

  • Issue reporter: @hungvu193 $250, paid via Upwork
  • Contributor: @hungvu193 $750 ($500 C + $250 bonus), paid via Upwork
  • Contributor+: @aimane-chnaif $750 ($500 C+ + $250 bonus) will pay via Upwork (held on BZ checkllist)

Upwork job is here, 50% bonus is included on final payout

@hungvu193
Copy link
Contributor

hungvu193 commented Sep 22, 2023

Hey @aimane-chnaif can you complete the BZ checklist please?

Summarizing payment on this issue:

  • Issue reporter: @hungvu193 $50, paid via Upwork

  • Contributor: @hungvu193 $750 ($500 C + $250 bonus), paid via Upwork

  • Contributor+: @aimane-chnaif $750 ($500 C+ + $250 bonus) will pay via Upwork (held on BZ checkllist)

Upwork job is here, 50% bonus is included on final payout

I believe reporting bonus will be 250$ according the above comment #25865 (comment)

@aimane-chnaif
Copy link
Contributor

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

This is super minor localization issue and kind of "update dynamically" issue which was closed recently as not bug.
No regression test is needed.

@melvin-bot melvin-bot bot added the Overdue label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

@hungvu193, @stephanieelliott, @stitesExpensify, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!

@stitesExpensify
Copy link
Contributor

Are we all done here?

@melvin-bot melvin-bot bot removed the Overdue label Sep 26, 2023
@hungvu193
Copy link
Contributor

Hey @aimane-chnaif can you complete the BZ checklist please?
Summarizing payment on this issue:

  • Issue reporter: @hungvu193 $50, paid via Upwork
  • Contributor: @hungvu193 $750 ($500 C + $250 bonus), paid via Upwork
  • Contributor+: @aimane-chnaif $750 ($500 C+ + $250 bonus) will pay via Upwork (held on BZ checkllist)

Upwork job is here, 50% bonus is included on final payout

I believe reporting bonus will be 250$ according the above comment #25865 (comment)

waiting for @stephanieelliott to adjust the reporting bonus to 250$ and urgency bonus.

@melvin-bot melvin-bot bot added the Overdue label Sep 28, 2023
@stephanieelliott
Copy link
Contributor

OK, issued remaining payments to match the updated the payment summary:

@hungvu193
Copy link
Contributor

OK, issued remaining payments to match the updated the payment summary:

@stephanieelliott I think you forgot to add urgency bonus for me. It should be 450$ in total (250$ for urgency bonus and 200$ for the reporting bonus).

@hungvu193
Copy link
Contributor

little bump here @stephanieelliott

@stephanieelliott
Copy link
Contributor

Sorry for leaving ya hanging on this, @hungvu193!

OK so let's try this one more time:

  • Reporting bonus: $250 [already paid]
  • Contributor: $500 job + $250 bonus - $500 already paid = $250 till owed.

Does this make sense? LMK and I'll issue the remaining payment as a bonus in the existing job.

@hungvu193
Copy link
Contributor

Sorry for leaving ya hanging on this, @hungvu193!

OK so let's try this one more time:

  • Reporting bonus: $250 [already paid]

  • Contributor: $500 job + $250 bonus - $500 already paid = $250 till owed.

Does this make sense? LMK and I'll issue the remaining payment as a bonus in the existing job.

Thank you. That makes sense :+1

@hungvu193
Copy link
Contributor

Sorry @stephanieelliott , little bump here

@stephanieelliott
Copy link
Contributor

Issued $250 bonus to you @hungvu193! We should be squared up now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants