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-05-04] [HOLD for payment 2023-04-26] [$1000] ‘Link has been resent’ Spanish message is not dynamically translated into English when a user changes langue preference to English #17216

Closed
1 of 6 tasks
kavimuru opened this issue Apr 9, 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. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Apr 9, 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. Open the app on the Sign In screen.
  2. Verify if the App's translations are in English.
  3. Set your device / browser language to Spanish.
  4. Open the app again on the Sign In screen.
  5. Verify if the App's translations are in Spanish
  6. Enter email address and click on continue button
  7. Click on ‘forgot password’ link
  8. Click on ‘Resend link’ button
  9. Reset your device / browser language to English.
  10. Navigate back to the sign-in page and click refresh button

Expected Result:

System should translate all sing-in page content to English

Actual Result:

System translates all sign-in page content to English, except ‘Link has been resent’ Spanish text

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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: 1.2.97-2
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

2023-04-08.23.21.00.mp4
Recording.188.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680986148035829

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010987a0fa7cf27346
  • Upwork Job ID: 1645488016025690112
  • Last Price Increase: 2023-04-10
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 9, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 9, 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

@CortneyOfstad
Copy link
Contributor

I was able to recreate this (forgot to get a video) so getting eyes on this 👍

@CortneyOfstad CortneyOfstad added the External Added to denote the issue can be worked on by a contributor label Apr 10, 2023
@melvin-bot melvin-bot bot changed the title ‘Link has been resent’ Spanish message is not dynamically translated into English when a user changes langue preference to English [$1000] ‘Link has been resent’ Spanish message is not dynamically translated into English when a user changes langue preference to English Apr 10, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~010987a0fa7cf27346

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

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

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

@allroundexperts
Copy link
Contributor

allroundexperts commented Apr 10, 2023

Proposal

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

Link has been resent spanish message is not dynamically translated.

What is the root cause of that problem?

The root cause of this issue is that we're saving translated text in Onyx instead of saving the key. This can be seen here.

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

We need to save the key of the text instead of the translated version of text. Here, we need to add the following:

message: 'resendValidationForm.linkHasBeenResent',

Then, wherever the message key is being used, we need to use Localize.translateLocal method to convert it to the correct translated text.

What alternative solutions did you explore? (Optional)

None

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 10, 2023

Proposal

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

Success message of link has been reset not converted to selected language

What is the root cause of that problem?

For the ResendRequestPasswordReset and RequestAccountValidationLink api call we are storing the translated message in the onyx store.

message: Localize.translateLocal('resendValidationForm.linkHasBeenResent'),

message: Localize.translateLocal('resendValidationForm.linkHasBeenResent'),

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

We should store the translation key in both the places for onyx success and use props.translate for those keys in the component.

message: 'resendValidationForm.linkHasBeenResent',

<DotIndicatorMessage style={[styles.mb5, styles.flex0]} type="success" messages={{0: props.account.message}} />

props.translate(props.account.message)

We also need to do the same for the errors but I am not seeing right now we are setting any errors in case of failure.

Result
Screen.Recording.2023-04-10.at.11.55.43.PM.mov

@mollfpr
Copy link
Contributor

mollfpr commented Apr 11, 2023

Thank you guys for the proposals!

Both proposals got the point of the issue correct, but @Pujan92's proposal was more accurate about the place that caused the problem, either Session.resendResetPassword() or Session.resendValidationLink().


Then, wherever the message key is being used, we need to use Localize.translateLocal method to convert it to the correct translated text.

@allroundexperts your proposal only mentions Session.resendValidationLink() is the place that caused the problem, and the suggesting changes part is unclear where we should update the code to read the key translation.

I know it's high competition to propose a solution, but taking your time to analyze it and having the best proposal with all the information we need to review it is better. I'll be happy to review your proposal in the other issue! 👍


@tgolen I like @Pujan92 proposal because it has the complete root cause and a clear place for suggesting the changes.

In addition, we need to update the BaseValidateCodeForm to translate the message key.

🎀 👀 🎀 C+ reviewed!

@allroundexperts
Copy link
Contributor

Thank you guys for the proposals!

Both proposals got the point of the issue correct, but @Pujan92's proposal was more accurate about the place that caused the problem, either Session.resendResetPassword() or Session.resendValidationLink().


Then, wherever the message key is being used, we need to use Localize.translateLocal method to convert it to the correct translated text.

@allroundexperts your proposal only mentions Session.resendValidationLink() is the place that caused the problem, and the suggesting changes part is unclear where we should update the code to read the key translation.

I know it's high competition to propose a solution, but taking your time to analyze it and having the best proposal with all the information we need to review it is better. I'll be happy to review your proposal in the other issue! 👍


@tgolen I like @Pujan92 proposal because it has the complete root cause and a clear place for suggesting the changes.

In addition, we need to update the BaseValidateCodeForm to translate the message key.

🎀 👀 🎀 C+ reviewed!

Thanks for the review. I agree with your decision!

@tgolen
Copy link
Contributor

tgolen commented Apr 11, 2023

Sounds good, thanks! @CortneyOfstad 🟢 to hire @Pujan92

@gianni92-carb
Copy link

Contributor details Your Expensify account email:giannicarboni@hotmail.it
Upwork Profile Link: https://www.upwork.com/freelancers/~019cd25d87a71f705e

@MelvinBot
Copy link

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 12, 2023

I am not assigned for this issue yet but based on @tgolen comment/approval I just raised a PR which is ready for review!

@tgolen
Copy link
Contributor

tgolen commented Apr 13, 2023

bump @CortneyOfstad to hire and assign @Pujan92

@CortneyOfstad
Copy link
Contributor

Invite sent!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Apr 24, 2023
@melvin-bot melvin-bot bot added Daily KSv2 Weekly KSv2 and removed Weekly KSv2 Daily KSv2 labels Apr 26, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-04-26] [$1000] ‘Link has been resent’ Spanish message is not dynamically translated into English when a user changes langue preference to English [HOLD for payment 2023-05-04] [HOLD for payment 2023-04-26] [$1000] ‘Link has been resent’ Spanish message is not dynamically translated into English when a user changes langue preference to English Apr 27, 2023
@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 27, 2023
@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.6-0 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-05-04. 🎊

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

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

@MelvinBot
Copy link

MelvinBot commented Apr 27, 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:

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

@isabelastisser
Copy link
Contributor

Just confirming that we are holding for payment on May 4, correct?

@mollfpr
Copy link
Contributor

mollfpr commented Apr 29, 2023

@isabelastisser Yes!

@melvin-bot melvin-bot bot added the Overdue label May 8, 2023
@tgolen
Copy link
Contributor

tgolen commented May 8, 2023

Now that it's May 8, what's the next step here?

@melvin-bot melvin-bot bot removed the Overdue label May 8, 2023
@isabelastisser
Copy link
Contributor

I was OOO and the payments and checklist tasks are delayed. I will review this now.

@mollfpr
Copy link
Contributor

mollfpr commented May 8, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:

#10556
#10783

[@mollfpr] 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:

https://github.com/Expensify/App/pull/10556/files#r1187620912
https://github.com/Expensify/App/pull/10783/files#r1187621034

[@mollfpr] 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:

We could probably add a checklist whenever a localized text is saved in Onyx. Make sure that we save the key instead the translated text.

@isabelastisser
Copy link
Contributor

All hired in Upwork:

Issue reported by: @Natnael-Guchima
C+ review: @mollfpr
Assigned Contributor: @Pujan92

@mollfpr
Copy link
Contributor

mollfpr commented May 8, 2023

Regression Test Proposal

  1. In magic link/forgot password screen click on the Resend button
  2. It shows the success text Link has been re-sent if the current language in english
  3. Switch language to spanish
  4. Verify the success text translated to spanish

Do we agree 👍 or 👎

@isabelastisser
Copy link
Contributor

@tgolen the contributor was assigned this issue on April 13, and the first PR was merged on April 14. Based on this, the contributors would qualify for a 50% bonus, however, I found this additional PR that was later created to fix a regression issue and only merged on April 25. Can you please clarify if this issue qualifies for a bonus? Thanks!

@priya-zha
Copy link

@isabelastisser For the regression issue, I've already been paid by @puneetlath . Reference here. Thanks

@isabelastisser
Copy link
Contributor

@priya-zha I understand, but I still need clarification on this:

#17216 (comment)

@tgolen
Copy link
Contributor

tgolen commented May 8, 2023

Our guidelines state:

If the PR causes a regression at any point within the regression period (starting when the code is merged and ending 7 days after being deployed to production), contributors are not eligible for the 50% bonus.

So, I do not think they are eligible for a 50% bonus on the original PR.

@Natnael-Guchima
Copy link

All hired in Upwork:

Issue reported by: @Natnael-Guchima
C+ review: @mollfpr
Assigned Contributor: @Pujan92

Accepted! Thanks🙏

@isabelastisser
Copy link
Contributor

isabelastisser commented May 9, 2023

Thanks for confirming, @tgolen!

I have processed the payments in Upwork and will follow up on the task below now:

[@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

https://github.com/Expensify/Expensify/issues/282237

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests