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

Update intl #1181

Merged
merged 6 commits into from
Aug 29, 2019
Merged

Update intl #1181

merged 6 commits into from
Aug 29, 2019

Conversation

OtterleyW
Copy link
Contributor

@OtterleyW OtterleyW commented Aug 28, 2019

More information about the changes can be found from Upgrade guide for [email protected]

  • Proptype intlShape was removed so we needed to create it again. Because of this we added a new util/reactIntl.js file. This file is now used to wrap all the react-intl related imports.
  • addLocaleDate function was removed and react-intl library is now relying on native Intl APIs: Intl.PluralRules and Intl.RelativeTimeFormat. In order to support older browsers we needed to add intl-pluralrules and intl-relativetimeformat to util/polyfills.js
  • Also Node must be now compiled with full-icu which caused changes to start and test
    scripts in package.json. We also needed to add a specific config for nodemon
  • Default textComponentin IntlProvider changed to React.Fragment so we need to explicitly
    set textComponent to span. Otherwise all the snapshots would have changed and it might affect to UI if there is styles added to these spans generally in customization projects.

Note: FormattedMessage component now supports tagName prop and improved rich-text formatting.

src/util/test-helpers.js Outdated Show resolved Hide resolved
src/util/reactIntl.js Outdated Show resolved Hide resolved
src/util/polyfills.js Outdated Show resolved Hide resolved
@Gnito Gnito temporarily deployed to sharetribe-starter-app August 29, 2019 12:43 Inactive
Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

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

LGTM

@OtterleyW OtterleyW force-pushed the update-intl branch 2 times, most recently from 5d8a63f to 713dc94 Compare August 29, 2019 13:52
@OtterleyW OtterleyW changed the base branch from update-react to master August 29, 2019 14:34
@OtterleyW OtterleyW merged commit 2390bea into master Aug 29, 2019
@OtterleyW OtterleyW deleted the update-intl branch August 29, 2019 14:34
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