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

fix: i18n default language resolution #12786

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

jimblanc
Copy link
Contributor

@jimblanc jimblanc commented Jan 2, 2024

Description of changes

Fixes a regression that was introduced with some v6 refactoring that prevented the default browser language from being set in the i18n utility.

Issue #, if available

#12767

Description of how you validated changes

Tested in sample application.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jimblanc jimblanc marked this pull request as ready for review January 2, 2024 22:44
@jimblanc jimblanc requested review from a team as code owners January 2, 2024 22:44
@@ -65,6 +65,8 @@ export class I18n {
* @param {String} defVal - Default value
*/
get(key: string, defVal: string | undefined = undefined) {
this.setDefaultLanguage();
Copy link
Contributor Author

@jimblanc jimblanc Jan 2, 2024

Choose a reason for hiding this comment

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

Existing logic, regression introduced during TS refactor

@jimblanc jimblanc merged commit 05d73ab into aws-amplify:main Jan 2, 2024
30 checks passed
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.

None yet

3 participants