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

Pronouns - pronoun not translated when language changes #27343

Closed
6 tasks done
lanitochka17 opened this issue Sep 13, 2023 · 13 comments
Closed
6 tasks done

Pronouns - pronoun not translated when language changes #27343

lanitochka17 opened this issue Sep 13, 2023 · 13 comments
Assignees

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 13, 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!


Issue found when executing PR #25846

Action Performed:

Pre-conditions: Pronoun option selected he/Him/His/They/Them/Theirs

  1. Go to https://staging.new.expensify.com/
  2. Tap profile icon
  3. Tap preferences
  4. Tap language ---> Spanish
  5. Navigate back to Settings
  6. Tap Profile
  7. Tap pronouns

Expected Result:

The pronoun options shown outside must be shown inside with dropdown below of selected pronouns with a tick mark

Actual Result:

The pronouns are shown outside in selected Spanish language correctly but inside displayed in English and "no results found" message displayed instead of showing dropdown below of selected pronouns with a tick mark

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.3.69-0

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6199003_web25846.mp4
Bug6199003_android25846.mp4
Bug6199003_pr25846.mp4

Expensify/Expensify Issue URL:

Issue reported by: @gadhiyamanan/ Applause - Internal Team

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694594697108839

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Sep 13, 2023
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

Triggered auto assignment to @Li357 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 13, 2023

Proposal

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

Incorrect pronoun search displayed

What is the root cause of that problem?

It is a regression from #25846 where we iterate through the array PRONOUNS_LIST consisting of the keys and found key value we are setting in the serachValue instead of the text.
https://github.com/Expensify/App/pull/25846/files#diff-2becc643119bc669cba2992bd64114fa69691d2a7d3fe265026322b57f4c75fdL29-L32

const currentPronounsText = _.chain(CONST.PRONOUNS_LIST)
.find((_value) => _value === currentPronounsKey)
.value();
return currentPronounsText || '';

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

Making a proposal as I think we can set the value directly.

We already have the currentPronounsKey which we can use directly instead of finding the key again.

const [searchValue, setSearchValue] = useState(currentPronounsKey ? translate(`pronouns.${currentPronounsKey}`) : '')

const currentPronounsKey = currentPronouns.substring(CONST.PRONOUNS.PREFIX.length);

cc: @BeeMargarida

What alternative solutions did you explore? (Optional)

With the current implementation, we can translate the found key for setting the search value.

       const pronounKey = _.chain(CONST.PRONOUNS_LIST)
            .find((_value) => _value === currentPronounsKey);
        
        return pronounKey ? translate(`pronouns.${pronounKey}`) : '';

@Pluto0104
Copy link
Contributor

I can consider this issue as dup of #27326.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Sep 13, 2023
@AndrewGable
Copy link
Contributor

This is going to be fixed by #27358

@parasharrajat
Copy link
Member

Ready to be closed @Li357

@gadhiyamanan
Copy link
Contributor

this is eligible for reporting bonus because this is the first issue which was reported in slack

@gadhiyamanan
Copy link
Contributor

@Li357 can you assign BZ member for reporting bonus

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Oct 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

This issue has not been updated in over 15 days. @Li357 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@gadhiyamanan
Copy link
Contributor

bump @Li357

@gadhiyamanan
Copy link
Contributor

Bump @Li357

Copy link

melvin-bot bot commented Dec 5, 2023

@Li357, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

@gadhiyamanan
Copy link
Contributor

@Li357 reporting bonus is pending here, can you please reopen the issue ..

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

No branches or pull requests

9 participants