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

feat(app,app-shell,app-shell-odd): detect user system language, add language setting to app config #16393

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

brenthagen
Copy link
Contributor

@brenthagen brenthagen commented Oct 1, 2024

Overview

adds a config app language value to desktop/ODD and initializes i18n language to the stored app language config value. detects the user's system language in desktop app-shell and transmits to renderer via IPC/redux. adds a system language config value.

closes PLAT-504, PLAT-497

Test Plan and Hands on Testing

updated unit tests, confirmed the config value persists and initializes language. developed on MacOS, will need to test in windows/linux before release.

Changelog

  • Adds language setting to app config and initializes i18n language to the stored value

Review requests

confirm the language selection persists on app restart. do the LocalizationProvider changes make sense?

Risk assessment

medium, this changes the app-level localization provider wrapper

@brenthagen brenthagen requested a review from a team October 1, 2024 15:18
@brenthagen brenthagen requested review from a team as code owners October 1, 2024 15:18
@brenthagen brenthagen requested review from jerader and removed request for a team and jerader October 1, 2024 15:18
@brenthagen brenthagen marked this pull request as draft October 3, 2024 15:29
Copy link
Contributor

@vegano1 vegano1 left a comment

Choose a reason for hiding this comment

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

Straight forward, looks good!

@brenthagen brenthagen marked this pull request as ready for review October 10, 2024 15:28
@brenthagen brenthagen changed the title feat(app,app-shell,app-shell-odd): add language setting to app config feat(app,app-shell,app-shell-odd): detect user system language, add language setting to app config Oct 10, 2024
const storedSystemLanguage = useSelector(getStoredSystemLanguage)

// TODO(bh, 2024-10-09): desktop app, check for current system language vs stored config system language value, launch modal
console.log(
Copy link
Contributor

Choose a reason for hiding this comment

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

debug print?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just a spot check, will remove in next PR that uses the system language

@brenthagen brenthagen merged commit e33a247 into edge Oct 10, 2024
36 checks passed
@brenthagen brenthagen deleted the app_language-config branch October 10, 2024 16:45
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