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

Clean up multiple subscriptions of preferredLocale #3716

Closed
wants to merge 2 commits into from

Conversation

Jag96
Copy link
Contributor

@Jag96 Jag96 commented Jun 22, 2021

Details

This PR removes subscriptions to ONYXKEYS.PREFERRED_LOCALE that are outside of withLocalize in favor of one translate function.

Fixed Issues

Follow-up to a discussion from #3463 (comment)

Tests

TBD

QA Steps

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@Jag96 Jag96 self-assigned this Jun 22, 2021
Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but curious to get your thoughts on an alternative that I started implementing in another PR.

Instead of having a getPreferredLocale() was planning to export something like translateWithPreferredLocale() or translateLocal() and then use it in place of translate().

https://github.com/Expensify/Expensify.cash/blob/ba7e6586eafb28c12e1a8ec18034ae06579a9192/src/libs/translate.js (from a PR not yet merged)

@Jag96
Copy link
Contributor Author

Jag96 commented Jun 22, 2021

Instead of having a getPreferredLocale() was planning to export something like translateWithPreferredLocale() or translateLocal() and then use it in place of translate().

That sounds like a better alternative, I can close this then 👍

@Jag96 Jag96 closed this Jun 22, 2021
@roryabraham roryabraham deleted the joe-preferred-locale branch November 2, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants