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-03-13] [$1000] Language picker texts are not same at login page and preferences. #15285

Closed
3 of 6 tasks
kavimuru opened this issue Feb 19, 2023 · 34 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

@kavimuru
Copy link

kavimuru commented Feb 19, 2023

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


Action Performed:

  1. Sign in to https://staging.new.expensify.com in the Mac/iOS/Android Chrome or Safari browser
  2. Click on Profile > Preferences > change the language to Spanish
  3. Sign out
  4. Notice the drop-down language on the sign-in page isn't in Spanish

Expected Result:

If your language Preference is Spanish, you should see Spanish on the sign-in page.

image

Actual Result:

Showing English on the sign-in page when the language is 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: 1.2.74-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:
inner-spanish-selected
inner-english-selected

Recording.1558.mp4

Expensify/Expensify Issue URL:
Issue reported by: @jatinsonijs
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1676731178309489

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f95903e9a3bdc10d
  • Upwork Job ID: 1627913032303964160
  • Last Price Increase: 2023-02-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 19, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 19, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Feb 19, 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

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Feb 20, 2023

@Christinadobrzyn
Copy link
Contributor

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Feb 21, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 21, 2023
@melvin-bot melvin-bot bot changed the title Language picker texts are not same at login page and preferences. [$1000] Language picker texts are not same at login page and preferences. Feb 21, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Current assignee @Christinadobrzyn 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 - @rushatgabhane (External)

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

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

@jatinsonijs
Copy link
Contributor

Proposal

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

Language picker is not consistent across app. In login page it do not changes values based on selected language but in Language preference it is changing based on selected language.

What is the root cause of that problem?

As per slack discussion - values should be as per selected language same as preference page.
In login page we are displaying values based on there language not as per user selected language.

const localesToLanguages = {

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

We can do same way as in Preference page:

const localesToLanguages = _.map(props.translate('languagePage.languages'),

Here we just need 2 fields value and text, we have to rename field text to label. and need to use it inside the component.

What alternative solutions did you explore? (Optional)

None

@esh-g
Copy link
Contributor

esh-g commented Feb 21, 2023

Proposal

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

The languagePicker texts are not according the to the selected locale.

What is the root cause of that problem?

In the this file:

const localesToLanguages = {
default: {
value: 'en',
label: Localize.translate('en', 'languagePage.languages.en.label'),
},
es: {
value: 'es',
label: Localize.translate('es', 'languagePage.languages.es.label'),
},
};


We are setting the label as Localize.translate('es', 'languagePage');

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

Instead of hardcoding the locale like this in the Localize.translate method, we should use the preferredLocale provided by withLocalize and then pass that locale to the Localize.translate method

After solution

Screen.Recording.2023-02-20.at.1.46.35.AM.mov

@Milos213
Copy link
Contributor

Proposal

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

Locale picker dropdown items text on Login page and options text on Language preference page are not consistent.
Former one uses equivalent language, while latter one uses selected language

What is the root cause of that problem?

App/src/languages/en.js

Lines 530 to 540 in 660e389

languagePage: {
language: 'Language',
languages: {
en: {
label: 'English',
},
es: {
label: 'Spanish',
},
},
},

On Language preference page, localized text is used, which depend on preferred locale user selected.
const localesToLanguages = _.map(props.translate('languagePage.languages'),
(language, key) => (
{
value: key,
text: language.label,

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

Use static text (not depend on preferred locale) instead of localized text (depend on preferred locale)
For this, we should use Localize.translate instead of withLocalize & props.translate

                text: Localize.translate(key, `languagePage.languages.${key}.label`),

This approach is already used in LocalePicker for signin page:

const localesToLanguages = {
default: {
value: 'en',
label: Localize.translate('en', 'languagePage.languages.en.label'),
},
es: {
value: 'es',
label: Localize.translate('es', 'languagePage.languages.es.label'),
},
};

demo

@Beamanator
Copy link
Contributor

@Christinadobrzyn I agree with your thoughts here 👍 :

@Christinadobrzyn Christinadobrzyn changed the title [$1000] Language picker texts are not same at login page and preferences. Language picker texts are not same at login page and preferences. Feb 23, 2023
@Christinadobrzyn Christinadobrzyn changed the title Language picker texts are not same at login page and preferences. [$1000] Language picker texts are not same at login page and preferences. Feb 23, 2023
@MelvinBot
Copy link

⚠️ This issue has had its price increased by 4x or more. Please review the issue and ensure the price is correct.

@MelvinBot
Copy link

Upwork job price has been updated to $1000

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Feb 23, 2023

Sorry I accidentally removed the [$1000] in the GH title - added it back!

@rushatgabhane
Copy link
Member

ok all solutions are good. just in a choice paralysis of which one to go with lol

@melvin-bot melvin-bot bot added the Overdue label Feb 27, 2023
@MelvinBot
Copy link

@rushatgabhane, @Christinadobrzyn, @aldo-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

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

📣 @jatinsonijs You have been assigned to this job by @aldo-expensify!
Please apply to this job in Upwork 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 📖

@jatinsonijs
Copy link
Contributor

PR is ready for review

cc @rushatgabhane

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@aldo-expensify
Copy link
Contributor

Issue not reproducible during KI retests. (First week)

How is this issue being tested? I still see the languages in the list not translated to the selected language:

image

@Milos213
Copy link
Contributor

Milos213 commented Mar 1, 2023

I think that's the expected behavior (equivalent language, not selected language). And on preferences page, it should also look like this, which is my proposal:

Let's say user doesn't know English but only Spanish. If selected language is English, user doesn't know which is Spanish from dropdown menu. User knows Espanol but doesn't know Spanish 😄

@MelvinBot
Copy link

📣 @Milos213! 📣

Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Screen Shot 2022-11-16 at 4 42 54 PM

Format:

Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@aldo-expensify
Copy link
Contributor

I think that's the expected behavior (equivalent language, not selected language). And on preferences page, it should also look like this, which is my proposal:

Let's say user doesn't know English but only Spanish. If selected language is English, user doesn't know which is Spanish from dropdown menu. User knows Espanol but doesn't know Spanish 😄

This crossed my mind too and I consider it a valid alternative, but I understand from the slack conversation that we decided that the expected behaviour would be to show the options in the current picked language, not the language of the option itself (preferences page behaviour).

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 6, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Language picker texts are not same at login page and preferences. [HOLD for payment 2023-03-13] [$1000] Language picker texts are not same at login page and preferences. Mar 6, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 6, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.78-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-03-13. 🎊

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 Mar 6, 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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 12, 2023
@jatinsonijs
Copy link
Contributor

Regression Test Proposal

  1. Logout if already logged in.
  2. From locale / language picker change the language.
  3. Open the locale picker again.
  4. Verify locale picker values are also translated based on selected language.

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Mar 14, 2023

Paying this out - looks like this was merged within 3 days so the bonus will be included in the payment

Oh my, so sorry it looks like I haven't yet hired @jatinsonijs and @rushatgabhane for this.

Can you both please accept my job offer in Upwork and I'll pay you? Upwork job here - https://www.upwork.com/jobs/~01f95903e9a3bdc10d

@rushatgabhane
Copy link
Member

Accepted, thanks!

@Christinadobrzyn
Copy link
Contributor

Paid @rushatgabhane $1000 + 50% bonus!
Paid @jatinsonijs $1000 + $250 reporting + 50% bonus!

Closed job in upwork, working on the regression test.

@Christinadobrzyn
Copy link
Contributor

Regression test buddy check - https://expensify.slack.com/archives/C01SKUP7QR0/p1678982816023959

@melvin-bot melvin-bot bot added the Overdue label Mar 18, 2023
@Christinadobrzyn
Copy link
Contributor

Sound like we don't need to do a buddy check on this. So I'm going to send it to QA for them to figure out a spot in Test Rail.

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

10 participants