Upgrade react-intl (#24906)
This commit is contained in:
parent
00c222377d
commit
44cd88adc4
130 changed files with 413 additions and 5046 deletions
|
@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||
import { PureComponent } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
import { IntlProvider, addLocaleData } from 'react-intl';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
|
||||
import { fromJS } from 'immutable';
|
||||
|
||||
|
@ -14,11 +14,10 @@ import Audio from 'mastodon/features/audio';
|
|||
import Card from 'mastodon/features/status/components/card';
|
||||
import MediaModal from 'mastodon/features/ui/components/media_modal';
|
||||
import Video from 'mastodon/features/video';
|
||||
import { getLocale } from 'mastodon/locales';
|
||||
import { getLocale, onProviderError } from 'mastodon/locales';
|
||||
import { getScrollbarWidth } from 'mastodon/utils/scrollbar';
|
||||
|
||||
const { localeData, messages } = getLocale();
|
||||
addLocaleData(localeData);
|
||||
const { messages } = getLocale();
|
||||
|
||||
const MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll, Hashtag, Audio };
|
||||
|
||||
|
@ -84,7 +83,7 @@ export default class MediaContainer extends PureComponent {
|
|||
}
|
||||
|
||||
return (
|
||||
<IntlProvider locale={locale} messages={messages}>
|
||||
<IntlProvider locale={locale} messages={messages} onError={onProviderError}>
|
||||
<>
|
||||
{[].map.call(components, (component, i) => {
|
||||
const componentName = component.getAttribute('data-component');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue