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

[WAITING ON CHECKLIST] [$1000] Web - missing translations on additional details page in wallet enablement flow #29712

Closed
kbecciv opened this issue Oct 16, 2023 · 45 comments
Assignees
Labels
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

@kbecciv
Copy link

kbecciv commented Oct 16, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.84.9
Reproducible in staging?: n/a
Reproducible in production?: n/a
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
Expensify/Expensify Issue URL:
Issue reported by: @kevinksullivan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697480656854849

Action Performed:

  1. User A: login, navigate to Settings > Wallet
  2. User A: add personal bank account
  3. User B: login, select Request money
  4. User B: enter User A as the person you're requesting from
  5. User A: Navigate to IOU from User B
  6. User A: select Pay with Expensify

Expected Result:

There should be translations for every field.

  • Zip code: código postal
  • Personal address: Dirección personal

Actual Result:

Personal address and zip code both show "MISSING TRANSLATION" on expensify.com emails, to call out that we are missing a translation (#27759 for more details)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01df8c2e9cdd1c685b
  • Upwork Job ID: 1714058361895460864
  • Last Price Increase: 2024-01-23
  • Automatic offers:
    • 0xmiroslav | Reviewer | 27267086
    • tienifr | Contributor | 27267089
    • situchan | Contributor | 28118287
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 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

@ishpaul777
Copy link
Contributor

ishpaul777 commented Oct 16, 2023

Proposal

Problem

"MISSING TRANSLATION" shown in the wallet upgrade flow

Root Cause

We are traslating the error message 2 times first when we are setting the error message here and second when we are displaying the error message here.
So for the second time we are getting "Missing Translation" instead of error message as the phrase key (actual error message) is not present in the translation file. This was not noticable before #27759 as we were just returning the phrase key when translation is not present. But after #27759 we are returning "Missing Translation" when translation is not present to accounts logged in with Expensify email address.

This issue is only reproducable for accounts with expensify email, was earlier reported here - https://expensify.slack.com/archives/C049HHMV9SM/p1696940644742429

cc - @mountiny

Changes Suggested

We should not translate the errorText in TextInput and send the translation key only. We should identify and fix all other FormHelpMessage and TextInputs, where we are passing the translated text instead of keys.

@kevinksullivan
Copy link
Contributor

@kevinksullivan kevinksullivan changed the title Web - "MISSING TRANSLATION" shown in the wallet upgrade flow Web - missing translations on additional details page in wallet enablement flow Oct 16, 2023
@kevinksullivan
Copy link
Contributor

Updated the OP. the problem is that we are missing translations, and not that MISSING TRANSLATION is shown on expensify accounts.

@kevinksullivan kevinksullivan added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title Web - missing translations on additional details page in wallet enablement flow [$500] Web - missing translations on additional details page in wallet enablement flow Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@mountiny
Copy link
Contributor

@kevinksullivan as @ishpaul777 mentioned, the problem is that we provide already translated text to the translate method again, we should make sure we are not passing this through the translation twice

@tienifr
Copy link
Contributor

tienifr commented Oct 17, 2023

Proposal

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

Personal address and zip code both show "MISSING TRANSLATION" on expensify.com emails, to call out that we are missing a translation (#27759 for more details)

What is the root cause of that problem?

The errorText of TextInput is supposed to accept:

  1. Translation key, which internally TextInput will translate here
  2. Translated message/server error message: In this case we should pass the isTranslated: true so TextInput won't attempt to translate it again thanks to this logic

But in here, we're passing translated message to errorText, without the isTranslated: true

So inside TextInput it will try to translate it again, which results in the MISSING TRANSLATION because it cannot find any key matching that translated message.

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

We need to fix properly for 2 types of errors:

  1. For server error message like in ErrorUtils.getLatestErrorMessage here, which is not a translation key, and we cannot predict what error message will be returned so we need to show it as is. For this case we should pass isTranslated: true to make sure it doesn't show MISSING TRANSLATION
  2. For translatable message like in here, we can either remove the props.translate and pass the translation key only, or we can pass isTranslated: true as well (only if there's any reason we need to translate outside of the TextInput component.

We need to find all occurrences of the above 2 cases in the codebase and fix as below

What alternative solutions did you explore? (Optional)

NA

@0xmiros
Copy link
Contributor

0xmiros commented Oct 17, 2023

We need to find all occurrences of the above 2 cases in the codebase and fix as below

@tienifr can you find all occurrences where this issue happens?

@mountiny
Copy link
Contributor

@tienifr @0xmiroslav This has popped up in couple of flows in the app, for example here too #28907 Could we please fix all these occurences here and try to fix this as generically as possible for Form component? thanks!

@tienifr
Copy link
Contributor

tienifr commented Oct 18, 2023

@tienifr can you find all occurrences where this issue happens?

@0xmiroslav Here're the places:

  • All 4 errorText= in src/pages/ReimbursementAccount/AddressForm.js
  • All 4 errorText= in src/pages/ReimbursementAccount/IdentityForm.js
  • errorText in src/pages/settings/Profile/Contacts/ValidateCodeForm/BaseValidateCodeForm.js
  • errorText in src/pages/settings/Security/TwoFactorAuth/TwoFactorAuthForm/BaseTwoFactorAuthForm.js
  • errorText in src/pages/settings/Wallet/ActivatePhysicalCardPage.js
  • errorText in src/pages/signin/LoginForm/BaseLoginForm.js
  • errorText in src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js

And a few other places. We need to double check pretty much every place where we use errorText in the app, we can do that as part of the PR process.

@0xmiros
Copy link
Contributor

0xmiros commented Oct 18, 2023

@tienifr's proposal looks good to me.
🎀 👀 🎀 C+ reviewed

And a few other places. We need to double check pretty much every place where we use errorText in the app

Please start on it to save time

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @0xmiroslav 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@marcaaron
Copy link
Contributor

honestly i don't understand how this is a new issue and not a regression caused by that PR but 🤷‍♂️

@mountiny
Copy link
Contributor

@marcaaron I can take it over if you prefer.

I dont think its a regression because that PR just surfaced this bad practice which should be fixed imho.

@marcaaron
Copy link
Contributor

It looks like a bug. I thought all the server errors show MISSING TRANSLATION? Why do we want this? 😂

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

@jliexpensify, @marcaaron, @situchan, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot removed the Overdue label Feb 7, 2024
@jliexpensify
Copy link
Contributor

Not overdue, @tienifr is working on the PR

@melvin-bot melvin-bot bot added the Overdue label Feb 9, 2024
@situchan
Copy link
Contributor

situchan commented Feb 9, 2024

Not overdue

@melvin-bot melvin-bot bot removed the Overdue label Feb 9, 2024
@mallenexpensify
Copy link
Contributor

PR was merged yesterday!!!

@melvin-bot melvin-bot bot added Overdue Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Overdue Daily KSv2 labels Feb 12, 2024
@melvin-bot melvin-bot bot changed the title [$1000] Web - missing translations on additional details page in wallet enablement flow [HOLD for payment 2024-02-20] [$1000] Web - missing translations on additional details page in wallet enablement flow Feb 13, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 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 2024-02-20. 🎊

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

Copy link

melvin-bot bot commented Feb 13, 2024

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:

  • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
  • [@situchan] 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:
  • [@situchan] 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:
  • [@situchan] Determine if we should create a regression test for this bug.
  • [@situchan] 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.
  • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@jliexpensify
Copy link
Contributor

jliexpensify commented Feb 19, 2024

Bump @situchan to complete the checklist please

EDIT: Looks like the Upworks job is closed so I will make another one today

@jliexpensify
Copy link
Contributor

I made a new job + here is a payment summary:

Upworks job

@tienifr
Copy link
Contributor

tienifr commented Feb 19, 2024

@jliexpensify I've accepted the job offer, thanks 🙏

@situchan
Copy link
Contributor

I already have offer accepted here

This doesn't require BZ checklist as no way to reproduce on non-Expensify accounts.

@jliexpensify
Copy link
Contributor

jliexpensify commented Feb 19, 2024

@situchan I'm aware that you've accepted the offer, but that was for the old posting and it's now been closed by Upworks:

image

I don't have a way to pay you on that job, so I created a new, active job.

@situchan
Copy link
Contributor

ok no problem. Accepted new offer

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 20, 2024
@jliexpensify
Copy link
Contributor

Paid and job closed. Waiting on @situchan to complete checklist

@jliexpensify jliexpensify removed the Awaiting Payment Auto-added when associated PR is deployed to production label Feb 21, 2024
@jliexpensify jliexpensify changed the title [HOLD for payment 2024-02-20] [$1000] Web - missing translations on additional details page in wallet enablement flow [WAITING ON CHECKLIST] [$1000] Web - missing translations on additional details page in wallet enablement flow Feb 21, 2024
@situchan
Copy link
Contributor

@jliexpensify here's my feedback on checklist - #29712 (comment)

@jliexpensify
Copy link
Contributor

Cool, thanks! Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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