Skip to content

[HOLD for payment 2024-08-07] [$250] Login – Please enter an email or phone number is not is not displayed in Spanish #44849

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.4.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: N/A
Email or phone of affected tester (no customers): gocemate+a523@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Scroll down the login page
  3. Change the language to Spanish

Expected Result:

"Please enter an email or phone number" error message should be displayed in Spanish

Actual Result:

"Please enter an email or phone number" error message is not displayed in Spanish

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6532880_1720083081859.Recording__3417.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015ecfe6dbe2a9cae6
  • Upwork Job ID: 1810338171865148259
  • Last Price Increase: 2024-07-15
  • Automatic offers:
    • alitoshmatov | Reviewer | 103143197
    • ShridharGoel | Contributor | 103143199
Issue OwnerCurrent Issue Owner: @muttmuure

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 4, 2024
  2. ShridharGoel commented on Jul 4, 2024

    @ShridharGoel
    Contributor

    Proposal

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

    Login – Please enter an email or phone number is not is not displayed in Spanish

    What is the root cause of that problem?

    translate is used here:

                    setFormError(translate('common.pleaseEnterEmailOrPhoneNumber'));
    

    Same issue is at multiple other places also.

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

    We need to remove translate:

                    setFormError('common.pleaseEnterEmailOrPhoneNumber');
    

    And set it in the errorText:

    errorText={formError ? translate(formError) : undefined}
    

    Update at other string usages also (some in the same file and some in other files).

  3. melvin-bot commented on Jul 4, 2024

    @melvin-bot

    Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  4. lanitochka17 commented on Jul 4, 2024

    @lanitochka17
    Author

    @muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  5. Krishna2323 commented on Jul 4, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Login – Please enter an email or phone number is not is not displayed in Spanish

    What is the root cause of that problem?

    translate is use when setting the form error.

    setFormError(translate('common.pleaseEnterEmailOrPhoneNumber'));
    return false;
    }
    const phoneLogin = LoginUtils.appendCountryCode(LoginUtils.getPhoneNumberWithoutSpecialChars(loginTrim));
    const parsedPhoneNumber = parsePhoneNumber(phoneLogin);
    if (!Str.isValidEmail(loginTrim) && !parsedPhoneNumber.possible) {
    if (ValidationUtils.isNumericWithSpecialChars(loginTrim)) {
    setFormError(translate('common.error.phoneNumber'));
    } else {
    setFormError(translate('loginForm.error.invalidFormatEmailLogin'));

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

    Remove translate when updating formError and use it when passing the formError as errorText prop.

    We also need to update the type for formError state:
    const [formError, setFormError] = useState<TranslationPaths | undefined>();

    We should also look up for other components which uses translate when setting the error text state.

    What alternative solutions did you explore? (Optional)

  6. ShridharGoel commented on Jul 4, 2024

    @ShridharGoel
    Contributor

    Proposal

    Updated

  7. Krishna2323 commented on Jul 4, 2024

    @Krishna2323
    Contributor

    Proposal updated

    • Minor updates
  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 8, 2024
  9. melvin-bot commented on Jul 8, 2024

    @melvin-bot
  10. changed the title [-]Login – Please enter an email or phone number is not is not displayed in Spanish[/-] [+][$250] Login – Please enter an email or phone number is not is not displayed in Spanish[/+] on Jul 8, 2024
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 8, 2024
  12. melvin-bot commented on Jul 8, 2024

    @melvin-bot

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

  13. 83 remaining items

  14. muttmuure commented on Aug 27, 2024

    @muttmuure
    Contributor
  15. muttmuure commented on Aug 30, 2024

    @muttmuure
    Contributor

    Waiting for @ShridharGoel to apply

  16. muttmuure commented on Sep 1, 2024

    @muttmuure
    Contributor

    Dropping to weekly

  17. added and removed on Sep 1, 2024
  18. muttmuure commented on Sep 13, 2024

    @muttmuure
    Contributor
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