Skip to content

[HOLD for payment 2023-06-21] [$1000] 'Link sent!' message is not dynamically updated when changing language preference #18827

Closed

Description

@kavimuru

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. Add a secondary login account, and leave it unverified
  2. Open new tab
  3. Navigate to sign in page
  4. Enter the unverified email address
  5. Click on Unlink button
  6. Verify that 'Link sent!' message is displayed
  7. Scroll down, and select Spanish as a language preference

Expected Result:

'Link sent!' message should be dynamically updated to Spanish

Actual Result:

'Link sent!' message is not dynamically updated to Spanish

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.3.13.1
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-05-09.19.16.52.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0198d8720bb9bfb004
  • Upwork Job ID: 1659222928961388544
  • Last Price Increase: 2023-05-18

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 12, 2023
  2. melvin-bot commented on May 12, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 12, 2023

    @melvin-bot

    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
  4. Pujan92 commented on May 12, 2023

    @Pujan92
    Contributor

    Proposal

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

    Link sent isn't changed dynamically on language change

    What is the root cause of that problem?

    In the onyx success message we are storing the translated message so it won't get updated on language change.

    message: Localize.translateLocal('unlinkLoginForm.linkSent'),

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

    We should store the translation key in the onyx successData message instead of the translated value and In the component, we need to use this translation key to get the value which makes the text language specific.

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

    props.translate(props.account.message)
    
  5. eh2077 commented on May 12, 2023

    @eh2077
    Contributor

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

    'Link sent!' message is not dynamically updated when changing language preference.

    What is the root cause of that problem?

    The root cause is that we translate link sent success message here

    message: Localize.translateLocal('unlinkLoginForm.linkSent'),

    in the success data, which will not be translated into local language here

    messages={{0: props.account.message}}

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

    To fix this issue, we should not translate link sent success message in the success data here

    message: Localize.translateLocal('unlinkLoginForm.linkSent'),

    but set message code like

    message: 'unlinkLoginForm.linkSent'

    And then translate here

    messages={{0: props.account.message}}

    We can fix similar issues in file https://github.com/Expensify/App/blob/6d27757667e0757d02a390623c072c69238c7070/src/libs/actions/Session/index.js or even other places

    What alternative solutions did you explore? (Optional)

    N/A

  6. melvin-bot commented on May 16, 2023

    @melvin-bot

    @kevinksullivan Whoops! This issue is 2 days overdue. Let's get this updated quick!

  7. kevinksullivan commented on May 18, 2023

    @kevinksullivan
    Contributor

    Ok, got the go ahead yesterday on moving this forward in that slack thread above.

  8. changed the title [-] 'Link sent!' message is not dynamically updated when changing language preference[/-] [+][$1000] 'Link sent!' message is not dynamically updated when changing language preference[/+] on May 18, 2023
  9. 51 remaining items

  10. melvin-bot commented on Jun 14, 2023

    @melvin-bot

    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:

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

    @kevinksullivan
    Contributor

    @Natnael-Guchima @parasharrajat @Pujan92 please accept the offer in Upwork when you get a chance. Thanks!

  12. Natnael-Guchima commented on Jun 23, 2023

    @Natnael-Guchima

    @kevinksullivan it seems you have sent me a $1000 offer for bug reporting bonus by accident

  13. kevinksullivan commented on Jun 23, 2023

    @kevinksullivan
    Contributor

    Thanks @Natnael-Guchima , I modified the amount on the offer.

  14. kevinksullivan commented on Jun 23, 2023

    @kevinksullivan
    Contributor

    @parasharrajat bump on accepting offer, and can you complete the checklist above before we pay this out?

  15. Natnael-Guchima commented on Jun 23, 2023

    @Natnael-Guchima

    You are welcome, @kevinksullivan 🙌. Accepted the offer, thanks.

  16. cristipaval commented on Jun 26, 2023

    @cristipaval
    Contributor
  17. parasharrajat commented on Jun 26, 2023

    @parasharrajat
    Member

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

    [@parasharrajat] 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/15811/files#r1242598881
    [@parasharrajat] 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: https://expensify.slack.com/archives/C049HHMV9SM/p1687804792012139

    [@parasharrajat] Determine if we should create a regression test for this bug. Yes

    [@parasharrajat] 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. #18827 (comment)

  18. parasharrajat commented on Jun 26, 2023

    @parasharrajat
    Member

    Regression Test Steps

    1. For user A go to Settings -> Profile -> Contact Method -> New contact method
    2. Add a new contact method called B
    3. Don't verify the method and logout.
    4. Open the login page in new tab.
    5. Enter unverified id B & click continue.
    6. Click on Unlink button.
    7. Verify the success message Link Sent is shown.
    8. Change the language from the language switch dropdown at the footer of the page. Verify that link sent message changes dynamically on changing the language.

    Do you agree 👍 or 👎 ?

  19. kevinksullivan commented on Jun 26, 2023

    @kevinksullivan
    Contributor

    Paid out. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions