Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Feat/conditional native intl #76

Merged

Conversation

timBarton96
Copy link
Member

Description

Changed the updateLocale function so that it will work consistently with the One App environment variable ONE_CONFIG_USE_NATIVE_INTL.

Motivation and Context

This makes the environment variable consistent in not including Lean-Intl. When the environment variable is enabled, updateLocale will still dispatch the action to update the active locale but not add the Lean-Intl bundles.

Relevant One App PR: americanexpress/one-app#1258

How Has This Been Tested?

Ran the changes in a test module along with the branch in the One App PR. Validated that using updateLocale with the environment variable set to true would not add the bundle, but would update the active locale and switches locales for react-intl.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • There aren't any other open Pull Requests for the same issue/update.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • This change impacts caching for client browsers.
  • This change adds additional environment variable requirements for one-app-ducks users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using one-app-ducks?

When using the ONE_CONFIG_USE_NATIVE_INTL environment variable, Lean-Intl bundles will not get added when using updateLocale.

@Matthew-Mallimo Matthew-Mallimo merged commit e2301a3 into americanexpress:main Mar 6, 2024
3 checks passed
oneamexbot added a commit that referenced this pull request Mar 6, 2024
# [4.5.0](v4.4.4...v4.5.0) (2024-03-06)

### Features

* **conditionalIntl:** added useNativeIntl to updateLocale ([#76](#76)) ([e2301a3](e2301a3))
@oneamexbot
Copy link
Contributor

🎉 This PR is included in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants