1
0
Fork 0
forked from gitea/nas

Upgrade react-intl (#24906)

This commit is contained in:
Renaud Chaput 2023-05-31 23:43:39 +02:00 committed by GitHub
parent 00c222377d
commit 44cd88adc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
130 changed files with 413 additions and 5046 deletions

View file

@ -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');