Update react-intl and add fallback to unsupported languages

This commit is contained in:
Tainan Felipe 2020-05-25 17:00:13 -03:00
parent e986cc9eba
commit db8e7fcd39
47 changed files with 271 additions and 270 deletions

View File

@ -1,104 +1,10 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data'; import { withTracker } from 'meteor/react-meteor-data';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl'; import { IntlProvider } from 'react-intl';
import Settings from '/imports/ui/services/settings'; import Settings from '/imports/ui/services/settings';
import LoadingScreen from '/imports/ui/components/loading-screen/component'; import LoadingScreen from '/imports/ui/components/loading-screen/component';
// currently supported locales.
import ar from 'react-intl/locale-data/ar';
import az from 'react-intl/locale-data/az';
import bg from 'react-intl/locale-data/bg';
import ca from 'react-intl/locale-data/ca';
import cs from 'react-intl/locale-data/cs';
import da from 'react-intl/locale-data/da';
import de from 'react-intl/locale-data/de';
import el from 'react-intl/locale-data/el';
import en from 'react-intl/locale-data/en';
import es from 'react-intl/locale-data/es';
import et from 'react-intl/locale-data/et';
import eu from 'react-intl/locale-data/eu';
import fa from 'react-intl/locale-data/fa';
import fi from 'react-intl/locale-data/fi';
import fr from 'react-intl/locale-data/fr';
import gl from 'react-intl/locale-data/gl';
import he from 'react-intl/locale-data/he';
import hi from 'react-intl/locale-data/hi';
import hr from 'react-intl/locale-data/hr';
import hu from 'react-intl/locale-data/hu';
import hy from 'react-intl/locale-data/hy';
import id from 'react-intl/locale-data/id';
import it from 'react-intl/locale-data/it';
import ja from 'react-intl/locale-data/ja';
import ka from 'react-intl/locale-data/ka';
import km from 'react-intl/locale-data/km';
import ko from 'react-intl/locale-data/ko';
import lt from 'react-intl/locale-data/lt';
import lv from 'react-intl/locale-data/lv';
import nb from 'react-intl/locale-data/nb';
import nl from 'react-intl/locale-data/nl';
import pl from 'react-intl/locale-data/pl';
import pt from 'react-intl/locale-data/pt';
import ro from 'react-intl/locale-data/ro';
import ru from 'react-intl/locale-data/ru';
import sk from 'react-intl/locale-data/sk';
import sl from 'react-intl/locale-data/sl';
import sr from 'react-intl/locale-data/sr';
import sv from 'react-intl/locale-data/sv';
import th from 'react-intl/locale-data/th';
import tr from 'react-intl/locale-data/tr';
import uk from 'react-intl/locale-data/uk';
import vi from 'react-intl/locale-data/vi';
import zh from 'react-intl/locale-data/zh';
addLocaleData([
...ar,
...az,
...bg,
...ca,
...cs,
...da,
...de,
...el,
...et,
...en,
...es,
...eu,
...fa,
...fi,
...fr,
...gl,
...he,
...hi,
...hr,
...hu,
...hy,
...id,
...it,
...ja,
...ka,
...km,
...ko,
...lt,
...lv,
...nb,
...nl,
...pl,
...pt,
...ro,
...ru,
...sk,
...sl,
...sr,
...sv,
...th,
...tr,
...uk,
...vi,
...zh,
]);
const propTypes = { const propTypes = {
locale: PropTypes.string, locale: PropTypes.string,
children: PropTypes.element.isRequired, children: PropTypes.element.isRequired,

View File

@ -19,7 +19,7 @@ Meteor.startup(() => {
const INTERVAL_TIME = INTERVAL_IN_SETTINGS < 10000 ? 10000 : INTERVAL_IN_SETTINGS; const INTERVAL_TIME = INTERVAL_IN_SETTINGS < 10000 ? 10000 : INTERVAL_IN_SETTINGS;
const env = Meteor.isDevelopment ? 'development' : 'production'; const env = Meteor.isDevelopment ? 'development' : 'production';
const CDN_URL = APP_CONFIG.cdn; const CDN_URL = APP_CONFIG.cdn;
// Commenting out in BBB 2.3 as node12 does not allow for `memwatch`. // Commenting out in BBB 2.3 as node12 does not allow for `memwatch`.
// We are looking for alternatives // We are looking for alternatives
@ -150,15 +150,22 @@ WebApp.connectHandlers.use('/locale', (req, res) => {
}); });
WebApp.connectHandlers.use('/locales', (req, res) => { WebApp.connectHandlers.use('/locales', (req, res) => {
const FALLBACK_LANGUAGES = Meteor.settings.public.fallbackLanguages;
let locales = []; let locales = [];
try { try {
locales = AVAILABLE_LOCALES locales = AVAILABLE_LOCALES
.map(file => file.replace('.json', '')) .map(file => file.replace('.json', ''))
.map(file => file.replace('_', '-')) .map(file => file.replace('_', '-'))
.map(locale => ({ .map((locale) => {
locale, const localeName = (Langmap[locale] || {}).nativeName
name: Langmap[locale].nativeName, || (FALLBACK_LANGUAGES[locale] || {}).nativeName
})); || locale;
return {
locale,
name: localeName,
};
});
} catch (e) { } catch (e) {
Logger.warn(`'Could not process locales error: ${e}`); Logger.warn(`'Could not process locales error: ${e}`);
} }

View File

@ -1,7 +1,7 @@
import _ from 'lodash'; import _ from 'lodash';
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, intlShape } from 'react-intl'; import { defineMessages } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import Dropdown from '/imports/ui/components/dropdown/component'; import Dropdown from '/imports/ui/components/dropdown/component';
import DropdownTrigger from '/imports/ui/components/dropdown/trigger/component'; import DropdownTrigger from '/imports/ui/components/dropdown/trigger/component';
@ -18,7 +18,7 @@ import { styles } from '../styles';
const propTypes = { const propTypes = {
amIPresenter: PropTypes.bool.isRequired, amIPresenter: PropTypes.bool.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
mountModal: PropTypes.func.isRequired, mountModal: PropTypes.func.isRequired,
amIModerator: PropTypes.bool.isRequired, amIModerator: PropTypes.bool.isRequired,
shortcuts: PropTypes.string, shortcuts: PropTypes.string,

View File

@ -1,12 +1,12 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from '/imports/ui/components/actions-bar/styles'; import { styles } from '/imports/ui/components/actions-bar/styles';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
isActive: PropTypes.bool.isRequired, isActive: PropTypes.bool.isRequired,
handleOnClick: PropTypes.func.isRequired, handleOnClick: PropTypes.func.isRequired,
}; };

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import _ from 'lodash'; import _ from 'lodash';
import cx from 'classnames'; import cx from 'classnames';
import browser from 'browser-detect'; import browser from 'browser-detect';
@ -113,7 +113,7 @@ const MIN_BREAKOUT_ROOMS = 2;
const MAX_BREAKOUT_ROOMS = 8; const MAX_BREAKOUT_ROOMS = 8;
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
isInvitation: PropTypes.bool.isRequired, isInvitation: PropTypes.bool.isRequired,
meetingName: PropTypes.string.isRequired, meetingName: PropTypes.string.isRequired,
users: PropTypes.arrayOf(PropTypes.object).isRequired, users: PropTypes.arrayOf(PropTypes.object).isRequired,

View File

@ -1,6 +1,6 @@
import React, { memo } from 'react'; import React, { memo } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import browser from 'browser-detect'; import browser from 'browser-detect';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import logger from '/imports/startup/client/logger'; import logger from '/imports/startup/client/logger';
@ -11,7 +11,7 @@ import { withModalMounter } from '../../modal/service';
import { styles } from '../styles'; import { styles } from '../styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
amIPresenter: PropTypes.bool.isRequired, amIPresenter: PropTypes.bool.isRequired,
handleShareScreen: PropTypes.func.isRequired, handleShareScreen: PropTypes.func.isRequired,
handleUnshareScreen: PropTypes.func.isRequired, handleUnshareScreen: PropTypes.func.isRequired,

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import MediaService from '/imports/ui/components/media/service'; import MediaService from '/imports/ui/components/media/service';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
toggleSwapLayout: PropTypes.func.isRequired, toggleSwapLayout: PropTypes.func.isRequired,
}; };

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, intlShape } from 'react-intl'; import { defineMessages } from 'react-intl';
import _ from 'lodash'; import _ from 'lodash';
import { makeCall } from '/imports/ui/services/api'; import { makeCall } from '/imports/ui/services/api';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
@ -35,7 +35,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
parseCurrentSlideContent: PropTypes.func.isRequired, parseCurrentSlideContent: PropTypes.func.isRequired,
amIPresenter: PropTypes.bool.isRequired, amIPresenter: PropTypes.bool.isRequired,
}; };

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, intlShape } from 'react-intl'; import { defineMessages } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
@ -9,7 +9,7 @@ import { makeCall } from '/imports/ui/services/api';
import { styles } from './styles'; import { styles } from './styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
responseDelay: PropTypes.number.isRequired, responseDelay: PropTypes.number.isRequired,
}; };

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { throttle } from 'lodash'; import { throttle } from 'lodash';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Modal from 'react-modal'; import Modal from 'react-modal';
import browser from 'browser-detect'; import browser from 'browser-detect';
import PanelManager from '/imports/ui/components/panel-manager/component'; import PanelManager from '/imports/ui/components/panel-manager/component';
@ -80,7 +80,7 @@ const propTypes = {
actionsbar: PropTypes.element, actionsbar: PropTypes.element,
captions: PropTypes.element, captions: PropTypes.element,
locale: PropTypes.string, locale: PropTypes.string,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
const defaultProps = { const defaultProps = {

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import { defineMessages, intlShape, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import getFromUserSettings from '/imports/ui/services/users-settings'; import getFromUserSettings from '/imports/ui/services/users-settings';
import withShortcutHelper from '/imports/ui/components/shortcut-help/service'; import withShortcutHelper from '/imports/ui/components/shortcut-help/service';
@ -36,7 +36,7 @@ const propTypes = {
showMute: PropTypes.bool.isRequired, showMute: PropTypes.bool.isRequired,
inAudio: PropTypes.bool.isRequired, inAudio: PropTypes.bool.isRequired,
listenOnly: PropTypes.bool.isRequired, listenOnly: PropTypes.bool.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
talking: PropTypes.bool.isRequired, talking: PropTypes.bool.isRequired,
}; };

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { injectIntl, defineMessages, intlShape } from 'react-intl'; import { injectIntl, defineMessages } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
@ -23,7 +23,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
formattedDialNum: PropTypes.string.isRequired, formattedDialNum: PropTypes.string.isRequired,
telVoice: PropTypes.string.isRequired, telVoice: PropTypes.string.isRequired,
}; };

View File

@ -5,7 +5,7 @@ import Modal from '/imports/ui/components/modal/simple/component';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import { import {
defineMessages, injectIntl, intlShape, FormattedMessage, defineMessages, injectIntl, FormattedMessage,
} from 'react-intl'; } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
import PermissionsOverlay from '../permissions-overlay/component'; import PermissionsOverlay from '../permissions-overlay/component';
@ -16,7 +16,7 @@ import AudioDial from '../audio-dial/component';
import AudioAutoplayPrompt from '../autoplay/component'; import AudioAutoplayPrompt from '../autoplay/component';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired, closeModal: PropTypes.func.isRequired,
joinMicrophone: PropTypes.func.isRequired, joinMicrophone: PropTypes.func.isRequired,
joinListenOnly: PropTypes.func.isRequired, joinListenOnly: PropTypes.func.isRequired,

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { withModalMounter } from '/imports/ui/components/modal/service'; import { withModalMounter } from '/imports/ui/components/modal/service';
import DeviceSelector from '/imports/ui/components/audio/device-selector/component'; import DeviceSelector from '/imports/ui/components/audio/device-selector/component';
@ -9,7 +9,7 @@ import cx from 'classnames';
import { styles } from './styles'; import { styles } from './styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
changeInputDevice: PropTypes.func.isRequired, changeInputDevice: PropTypes.func.isRequired,
changeOutputDevice: PropTypes.func.isRequired, changeOutputDevice: PropTypes.func.isRequired,
handleBack: PropTypes.func.isRequired, handleBack: PropTypes.func.isRequired,

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { defineMessages, intlShape, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles.scss'; import { styles } from './styles.scss';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
handlePlayAudioSample: PropTypes.func.isRequired, handlePlayAudioSample: PropTypes.func.isRequired,
outputDeviceId: PropTypes.string, outputDeviceId: PropTypes.string,
}; };

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { defineMessages, intlShape, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
@ -18,7 +18,7 @@ const intlMessages = defineMessages({
const propTypes = { const propTypes = {
handleAllowAutoplay: PropTypes.func.isRequired, handleAllowAutoplay: PropTypes.func.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
class AudioAutoplayPrompt extends PureComponent { class AudioAutoplayPrompt extends PureComponent {

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { defineMessages, intlShape, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
@ -27,7 +27,7 @@ const intlMessages = defineMessages({
const propTypes = { const propTypes = {
handleYes: PropTypes.func.isRequired, handleYes: PropTypes.func.isRequired,
handleNo: PropTypes.func.isRequired, handleNo: PropTypes.func.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
class EchoTest extends Component { class EchoTest extends Component {

View File

@ -1,11 +1,11 @@
import React from 'react'; import React from 'react';
import { injectIntl, intlShape, defineMessages } from 'react-intl'; import { injectIntl, defineMessages } from 'react-intl';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { styles } from './styles'; import { styles } from './styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired, closeModal: PropTypes.func.isRequired,
}; };

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { withModalMounter } from '/imports/ui/components/modal/service'; import { withModalMounter } from '/imports/ui/components/modal/service';
import Modal from '/imports/ui/components/modal/fullscreen/component'; import Modal from '/imports/ui/components/modal/fullscreen/component';
import logger from '/imports/startup/client/logger'; import logger from '/imports/startup/client/logger';
@ -40,7 +40,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
breakout: PropTypes.objectOf(Object).isRequired, breakout: PropTypes.objectOf(Object).isRequired,
getURL: PropTypes.func.isRequired, getURL: PropTypes.func.isRequired,
mountModal: PropTypes.func.isRequired, mountModal: PropTypes.func.isRequired,

View File

@ -1,5 +1,5 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import cx from 'classnames'; import cx from 'classnames';
import TextareaAutosize from 'react-autosize-textarea'; import TextareaAutosize from 'react-autosize-textarea';
import browser from 'browser-detect'; import browser from 'browser-detect';
@ -10,7 +10,7 @@ import { styles } from './styles.scss';
import Button from '../../button/component'; import Button from '../../button/component';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
chatId: PropTypes.string.isRequired, chatId: PropTypes.string.isRequired,
disabled: PropTypes.bool.isRequired, disabled: PropTypes.bool.isRequired,
minMessageLength: PropTypes.number.isRequired, minMessageLength: PropTypes.number.isRequired,

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { import {
defineMessages, injectIntl, intlShape, FormattedMessage, defineMessages, injectIntl, FormattedMessage,
} from 'react-intl'; } from 'react-intl';
import browser from 'browser-detect'; import browser from 'browser-detect';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -8,7 +8,7 @@ import cx from 'classnames';
import { styles } from '../styles.scss'; import { styles } from '../styles.scss';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
typingUsers: PropTypes.arrayOf(Object).isRequired, typingUsers: PropTypes.arrayOf(Object).isRequired,
}; };

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom'; import { findDOMNode } from 'react-dom';
import cx from 'classnames'; import cx from 'classnames';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import screenreaderTrap from 'makeup-screenreader-trap'; import screenreaderTrap from 'makeup-screenreader-trap';
import { styles } from './styles'; import { styles } from './styles';
@ -50,7 +50,7 @@ const propTypes = {
onHide: PropTypes.func, onHide: PropTypes.func,
onShow: PropTypes.func, onShow: PropTypes.func,
autoFocus: PropTypes.bool, autoFocus: PropTypes.bool,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
const defaultProps = { const defaultProps = {
@ -218,4 +218,4 @@ class Dropdown extends Component {
Dropdown.propTypes = propTypes; Dropdown.propTypes = propTypes;
Dropdown.defaultProps = defaultProps; Dropdown.defaultProps = defaultProps;
export default injectIntl(Dropdown); export default injectIntl(Dropdown, { forwardRef: true });

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
import { styles } from './styles'; import { styles } from './styles';
@ -26,7 +26,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired, closeModal: PropTypes.func.isRequired,
endMeeting: PropTypes.func.isRequired, endMeeting: PropTypes.func.isRequired,
}; };

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import cx from 'classnames'; import cx from 'classnames';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -13,7 +13,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
fullscreenRef: PropTypes.instanceOf(Element), fullscreenRef: PropTypes.instanceOf(Element),
dark: PropTypes.bool, dark: PropTypes.bool,
bottom: PropTypes.bool, bottom: PropTypes.bool,

View File

@ -5,65 +5,65 @@ import './styles.css';
// currently supported locales. // currently supported locales.
import ar from 'react-intl/locale-data/ar'; // import ar from 'react-intl/locale-data/ar';
import bg from 'react-intl/locale-data/bg'; // import bg from 'react-intl/locale-data/bg';
import cs from 'react-intl/locale-data/cs'; // import cs from 'react-intl/locale-data/cs';
import de from 'react-intl/locale-data/de'; // import de from 'react-intl/locale-data/de';
import el from 'react-intl/locale-data/el'; // import el from 'react-intl/locale-data/el';
import en from 'react-intl/locale-data/en'; // import en from 'react-intl/locale-data/en';
import es from 'react-intl/locale-data/es'; // import es from 'react-intl/locale-data/es';
import eu from 'react-intl/locale-data/eu'; // import eu from 'react-intl/locale-data/eu';
import fa from 'react-intl/locale-data/fa'; // import fa from 'react-intl/locale-data/fa';
import fi from 'react-intl/locale-data/fi'; // import fi from 'react-intl/locale-data/fi';
import fr from 'react-intl/locale-data/fr'; // import fr from 'react-intl/locale-data/fr';
import he from 'react-intl/locale-data/he'; // import he from 'react-intl/locale-data/he';
import hi from 'react-intl/locale-data/hi'; // import hi from 'react-intl/locale-data/hi';
import hu from 'react-intl/locale-data/hu'; // import hu from 'react-intl/locale-data/hu';
import id from 'react-intl/locale-data/id'; // import id from 'react-intl/locale-data/id';
import it from 'react-intl/locale-data/it'; // import it from 'react-intl/locale-data/it';
import ja from 'react-intl/locale-data/ja'; // import ja from 'react-intl/locale-data/ja';
import km from 'react-intl/locale-data/km'; // import km from 'react-intl/locale-data/km';
import pl from 'react-intl/locale-data/pl'; // import pl from 'react-intl/locale-data/pl';
import pt from 'react-intl/locale-data/pt'; // import pt from 'react-intl/locale-data/pt';
import ru from 'react-intl/locale-data/ru'; // import ru from 'react-intl/locale-data/ru';
import sv from 'react-intl/locale-data/sv'; // import sv from 'react-intl/locale-data/sv';
import tr from 'react-intl/locale-data/tr'; // import tr from 'react-intl/locale-data/tr';
import uk from 'react-intl/locale-data/uk'; // import uk from 'react-intl/locale-data/uk';
import vi from 'react-intl/locale-data/vi'; // import vi from 'react-intl/locale-data/vi';
import zh from 'react-intl/locale-data/zh'; // import zh from 'react-intl/locale-data/zh';
// This class is the only component loaded on legacy (unsupported) browsers. // // This class is the only component loaded on legacy (unsupported) browsers.
// What is included here needs to be minimal and carefully considered because some // // What is included here needs to be minimal and carefully considered because some
// things can't be polyfilled. // // things can't be polyfilled.
addLocaleData([ // addLocaleData([
...ar, // ...ar,
...bg, // ...bg,
...cs, // ...cs,
...de, // ...de,
...el, // ...el,
...en, // ...en,
...es, // ...es,
...eu, // ...eu,
...fa, // ...fa,
...fi, // ...fi,
...fr, // ...fr,
...he, // ...he,
...hi, // ...hi,
...hu, // ...hu,
...id, // ...id,
...it, // ...it,
...ja, // ...ja,
...km, // ...km,
...pl, // ...pl,
...pt, // ...pt,
...ru, // ...ru,
...sv, // ...sv,
...tr, // ...tr,
...uk, // ...uk,
...vi, // ...vi,
...zh, // ...zh,
]); // ]);
const FETCHING = 'fetching'; const FETCHING = 'fetching';
const FALLBACK = 'fallback'; const FALLBACK = 'fallback';

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data'; import { withTracker } from 'meteor/react-meteor-data';
import Settings from '/imports/ui/services/settings'; import Settings from '/imports/ui/services/settings';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import { notify } from '/imports/ui/services/notification'; import { notify } from '/imports/ui/services/notification';
@ -22,7 +22,7 @@ const KURENTO_CONFIG = Meteor.settings.public.kurento;
const propTypes = { const propTypes = {
isScreensharing: PropTypes.bool.isRequired, isScreensharing: PropTypes.bool.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
const intlMessages = defineMessages({ const intlMessages = defineMessages({

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import _ from 'lodash'; import _ from 'lodash';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
@ -16,7 +16,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
onRate: PropTypes.func.isRequired, onRate: PropTypes.func.isRequired,
total: PropTypes.string.isRequired, total: PropTypes.string.isRequired,
}; };

View File

@ -3,7 +3,7 @@ import RecordingContainer from '/imports/ui/components/recording/container';
import humanizeSeconds from '/imports/utils/humanizeSeconds'; import humanizeSeconds from '/imports/utils/humanizeSeconds';
import Tooltip from '/imports/ui/components/tooltip/component'; import Tooltip from '/imports/ui/components/tooltip/component';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
@ -46,7 +46,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
amIModerator: PropTypes.bool, amIModerator: PropTypes.bool,
record: PropTypes.bool, record: PropTypes.bool,
recording: PropTypes.bool, recording: PropTypes.bool,

View File

@ -1,5 +1,5 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import _ from 'lodash'; import _ from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withModalMounter } from '/imports/ui/components/modal/service'; import { withModalMounter } from '/imports/ui/components/modal/service';
@ -92,7 +92,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
handleToggleFullscreen: PropTypes.func.isRequired, handleToggleFullscreen: PropTypes.func.isRequired,
mountModal: PropTypes.func.isRequired, mountModal: PropTypes.func.isRequired,
noIOSFullscreen: PropTypes.bool, noIOSFullscreen: PropTypes.bool,

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import WhiteboardOverlayContainer from '/imports/ui/components/whiteboard/whiteboard-overlay/container'; import WhiteboardOverlayContainer from '/imports/ui/components/whiteboard/whiteboard-overlay/container';
import WhiteboardToolbarContainer from '/imports/ui/components/whiteboard/whiteboard-toolbar/container'; import WhiteboardToolbarContainer from '/imports/ui/components/whiteboard/whiteboard-toolbar/container';
import { HUNDRED_PERCENT, MAX_PERCENT } from '/imports/utils/slideCalcUtils'; import { HUNDRED_PERCENT, MAX_PERCENT } from '/imports/utils/slideCalcUtils';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { toast } from 'react-toastify'; import { toast } from 'react-toastify';
import PresentationToolbarContainer from './presentation-toolbar/container'; import PresentationToolbarContainer from './presentation-toolbar/container';
import CursorWrapperContainer from './cursor/cursor-wrapper-container/container'; import CursorWrapperContainer from './cursor/cursor-wrapper-container/container';
@ -721,7 +721,7 @@ class PresentationArea extends PureComponent {
export default injectIntl(withDraggableConsumer(PresentationArea)); export default injectIntl(withDraggableConsumer(PresentationArea));
PresentationArea.propTypes = { PresentationArea.propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
podId: PropTypes.string.isRequired, podId: PropTypes.string.isRequired,
// Defines a boolean value to detect whether a current user is a presenter // Defines a boolean value to detect whether a current user is a presenter
userIsPresenter: PropTypes.bool.isRequired, userIsPresenter: PropTypes.bool.isRequired,

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import cx from 'classnames'; import cx from 'classnames';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -13,7 +13,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
handleDownloadPresentation: PropTypes.func.isRequired, handleDownloadPresentation: PropTypes.func.isRequired,
dark: PropTypes.bool, dark: PropTypes.bool,
}; };

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import cx from 'classnames'; import cx from 'classnames';
import { styles } from '../styles.scss'; import { styles } from '../styles.scss';
@ -231,7 +231,7 @@ class ZoomTool extends PureComponent {
} }
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
zoomValue: PropTypes.number.isRequired, zoomValue: PropTypes.number.isRequired,
change: PropTypes.func.isRequired, change: PropTypes.func.isRequired,
minBound: PropTypes.number.isRequired, minBound: PropTypes.number.isRequired,

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Dropzone from 'react-dropzone'; import Dropzone from 'react-dropzone';
import update from 'immutability-helper'; import update from 'immutability-helper';
import cx from 'classnames'; import cx from 'classnames';
@ -17,7 +17,7 @@ import Checkbox from '/imports/ui/components/checkbox/component';
import { styles } from './styles.scss'; import { styles } from './styles.scss';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
mountModal: PropTypes.func.isRequired, mountModal: PropTypes.func.isRequired,
defaultFileName: PropTypes.string.isRequired, defaultFileName: PropTypes.string.isRequired,
fileSizeMin: PropTypes.number.isRequired, fileSizeMin: PropTypes.number.isRequired,

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
import { styles } from './styles'; import { styles } from './styles';
@ -37,7 +37,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired, closeModal: PropTypes.func.isRequired,
toggleRecording: PropTypes.func.isRequired, toggleRecording: PropTypes.func.isRequired,
recordingTime: PropTypes.number, recordingTime: PropTypes.number,

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import _ from 'lodash'; import _ from 'lodash';
import FullscreenService from '../fullscreen-button/service'; import FullscreenService from '../fullscreen-button/service';
@ -185,7 +185,7 @@ class ScreenshareComponent extends React.Component {
export default injectIntl(ScreenshareComponent); export default injectIntl(ScreenshareComponent);
ScreenshareComponent.propTypes = { ScreenshareComponent.propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
isPresenter: PropTypes.bool.isRequired, isPresenter: PropTypes.bool.isRequired,
unshareScreen: PropTypes.func.isRequired, unshareScreen: PropTypes.func.isRequired,
presenterScreenshareHasEnded: PropTypes.func.isRequired, presenterScreenshareHasEnded: PropTypes.func.isRequired,

View File

@ -3,7 +3,7 @@ import Modal from '/imports/ui/components/modal/fullscreen/component';
import { import {
Tab, Tabs, TabList, TabPanel, Tab, Tabs, TabList, TabPanel,
} from 'react-tabs'; } from 'react-tabs';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import DataSaving from '/imports/ui/components/settings/submenus/data-saving/component'; import DataSaving from '/imports/ui/components/settings/submenus/data-saving/component';
import Application from '/imports/ui/components/settings/submenus/application/component'; import Application from '/imports/ui/components/settings/submenus/application/component';
import Notification from '/imports/ui/components/settings/submenus/notification/component'; import Notification from '/imports/ui/components/settings/submenus/notification/component';
@ -62,7 +62,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
dataSaving: PropTypes.shape({ dataSaving: PropTypes.shape({
viewParticipantsWebcams: PropTypes.bool, viewParticipantsWebcams: PropTypes.bool,
viewScreenshare: PropTypes.bool, viewScreenshare: PropTypes.bool,

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import browser from 'browser-detect'; import browser from 'browser-detect';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
import _ from 'lodash'; import _ from 'lodash';
@ -180,11 +180,11 @@ const ShortcutHelpComponent = (props) => {
}; };
ShortcutHelpComponent.defaultProps = { ShortcutHelpComponent.defaultProps = {
intl: intlShape, intl: {},
}; };
ShortcutHelpComponent.propTypes = { ShortcutHelpComponent.propTypes = {
intl: intlShape, intl: PropTypes.object.isRequired,
shortcuts: PropTypes.arrayOf(PropTypes.shape({ shortcuts: PropTypes.arrayOf(PropTypes.shape({
accesskey: PropTypes.string.isRequired, accesskey: PropTypes.string.isRequired,
descId: PropTypes.string.isRequired, descId: PropTypes.string.isRequired,

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { defineMessages, intlShape } from 'react-intl'; import { defineMessages } from 'react-intl';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Modal from '/imports/ui/components/modal/simple/component'; import Modal from '/imports/ui/components/modal/simple/component';
@ -9,7 +9,7 @@ import Service from './service';
import { styles } from './styles'; import { styles } from './styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
meetingId: PropTypes.string.isRequired, meetingId: PropTypes.string.isRequired,
requesterUserId: PropTypes.string.isRequired, requesterUserId: PropTypes.string.isRequired,
}; };

View File

@ -2,11 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Icon from '/imports/ui/components/icon/component'; import Icon from '/imports/ui/components/icon/component';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from '/imports/ui/components/user-list/user-list-content/styles'; import { styles } from '/imports/ui/components/user-list/user-list-content/styles';
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
locale: PropTypes.shape({ locale: PropTypes.shape({
locale: PropTypes.string.isRequired, locale: PropTypes.string.isRequired,
name: PropTypes.string.isRequired, name: PropTypes.string.isRequired,

View File

@ -5,14 +5,14 @@ import Meetings from '/imports/api/meetings';
import ActionsBarService from '/imports/ui/components/actions-bar/service'; import ActionsBarService from '/imports/ui/components/actions-bar/service';
import UserListService from '/imports/ui/components/user-list/service'; import UserListService from '/imports/ui/components/user-list/service';
import logger from '/imports/startup/client/logger'; import logger from '/imports/startup/client/logger';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { notify } from '/imports/ui/services/notification'; import { notify } from '/imports/ui/services/notification';
import UserOptions from './component'; import UserOptions from './component';
const propTypes = { const propTypes = {
users: PropTypes.arrayOf(Object).isRequired, users: PropTypes.arrayOf(Object).isRequired,
setEmojiStatus: PropTypes.func.isRequired, setEmojiStatus: PropTypes.func.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
const intlMessages = defineMessages({ const intlMessages = defineMessages({

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { import {
defineMessages, injectIntl, intlShape, FormattedMessage, defineMessages, injectIntl, FormattedMessage,
} from 'react-intl'; } from 'react-intl';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
// import { notify } from '/imports/ui/services/notification'; // import { notify } from '/imports/ui/services/notification';
@ -20,7 +20,7 @@ const VIEW_STATES = {
}; };
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired, closeModal: PropTypes.func.isRequired,
startSharing: PropTypes.func.isRequired, startSharing: PropTypes.func.isRequired,
stopSharing: PropTypes.func.isRequired, stopSharing: PropTypes.func.isRequired,

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import VideoService from '../service'; import VideoService from '../service';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles'; import { styles } from './styles';
import { validIOSVersion } from '/imports/ui/components/app/service'; import { validIOSVersion } from '/imports/ui/components/app/service';
@ -31,7 +31,7 @@ const intlMessages = defineMessages({
}); });
const propTypes = { const propTypes = {
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
hasVideoStream: PropTypes.bool.isRequired, hasVideoStream: PropTypes.bool.isRequired,
isDisabled: PropTypes.bool.isRequired, isDisabled: PropTypes.bool.isRequired,
mountVideoPreview: PropTypes.func.isRequired, mountVideoPreview: PropTypes.func.isRequired,

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import { HEXToINTColor, INTToHEXColor } from '/imports/utils/hexInt'; import { HEXToINTColor, INTToHEXColor } from '/imports/utils/hexInt';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import browser from 'browser-detect'; import browser from 'browser-detect';
import { noop } from 'lodash'; import { noop } from 'lodash';
import KEY_CODES from '/imports/utils/keyCodes'; import KEY_CODES from '/imports/utils/keyCodes';
@ -784,7 +784,7 @@ WhiteboardToolbar.defaultProps = {
colors: ANNOTATION_COLORS, colors: ANNOTATION_COLORS,
thicknessRadiuses: THICKNESS_RADIUSES, thicknessRadiuses: THICKNESS_RADIUSES,
fontSizes: FONT_SIZES, fontSizes: FONT_SIZES,
intl: intlShape, intl: {},
}; };
WhiteboardToolbar.propTypes = { WhiteboardToolbar.propTypes = {
@ -821,7 +821,7 @@ WhiteboardToolbar.propTypes = {
value: PropTypes.number.isRequired, value: PropTypes.number.isRequired,
}).isRequired), }).isRequired),
intl: intlShape, intl: PropTypes.object.isRequired,
}; };

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import cx from 'classnames'; import cx from 'classnames';
import { defineMessages, injectIntl, intlShape } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import _ from 'lodash'; import _ from 'lodash';
import { styles } from '../styles'; import { styles } from '../styles';
import ToolbarSubmenuItem from '../toolbar-submenu-item/component'; import ToolbarSubmenuItem from '../toolbar-submenu-item/component';
@ -286,7 +286,7 @@ ToolbarSubmenu.propTypes = {
}), }),
]).isRequired, ]).isRequired,
customIcon: PropTypes.bool.isRequired, customIcon: PropTypes.bool.isRequired,
intl: intlShape.isRequired, intl: PropTypes.object.isRequired,
}; };
export default injectIntl(ToolbarSubmenu); export default injectIntl(ToolbarSubmenu);

View File

@ -480,6 +480,43 @@
"minimist": "^1.2.0" "minimist": "^1.2.0"
} }
}, },
"@formatjs/intl-displaynames": {
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/@formatjs/intl-displaynames/-/intl-displaynames-1.2.10.tgz",
"integrity": "sha512-GROA2RP6+7Ouu0WnHFF78O5XIU7pBfI19WM1qm93l6MFWibUk67nCfVCK3VAYJkLy8L8ZxjkYT11VIAfvSz8wg==",
"requires": {
"@formatjs/intl-utils": "^2.3.0"
}
},
"@formatjs/intl-listformat": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-1.4.8.tgz",
"integrity": "sha512-WNMQlEg0e50VZrGIkgD5n7+DAMGt3boKi1GJALfhFMymslJb5i+5WzWxyj/3a929Z6MAFsmzRIJjKuv+BxKAOQ==",
"requires": {
"@formatjs/intl-utils": "^2.3.0"
}
},
"@formatjs/intl-relativetimeformat": {
"version": "4.5.16",
"resolved": "https://registry.npmjs.org/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.5.16.tgz",
"integrity": "sha512-IQ0haY97oHAH5OYUdykNiepdyEWj3SAT+Fp9ZpR85ov2JNiFx+12WWlxlVS8ehdyncC2ZMt/SwFIy2huK2+6/A==",
"requires": {
"@formatjs/intl-utils": "^2.3.0"
}
},
"@formatjs/intl-unified-numberformat": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.3.7.tgz",
"integrity": "sha512-KnWgLRHzCAgT9eyt3OS34RHoyD7dPDYhRcuKn+/6Kv2knDF8Im43J6vlSW6Hm1w63fNq3ZIT1cFk7RuVO3Psag==",
"requires": {
"@formatjs/intl-utils": "^2.3.0"
}
},
"@formatjs/intl-utils": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@formatjs/intl-utils/-/intl-utils-2.3.0.tgz",
"integrity": "sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ=="
},
"@iamstarkov/listr-update-renderer": { "@iamstarkov/listr-update-renderer": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz", "resolved": "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz",
@ -1142,6 +1179,20 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"dev": true "dev": true
}, },
"@types/hoist-non-react-statics": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
"integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
"requires": {
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0"
}
},
"@types/invariant": {
"version": "2.2.33",
"resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.33.tgz",
"integrity": "sha512-/jUNmS8d4bCKdqslfxW6dg/9Gksfzxz67IYfqApHn+HvHlMVXwYv2zpTDnS/yaK9BB0i0GlBTaYci0EFE62Hmw=="
},
"@types/istanbul-lib-coverage": { "@types/istanbul-lib-coverage": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
@ -1179,6 +1230,20 @@
"integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==", "integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==",
"dev": true "dev": true
}, },
"@types/prop-types": {
"version": "15.7.3",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
},
"@types/react": {
"version": "16.9.35",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.35.tgz",
"integrity": "sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ==",
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
}
},
"@types/stack-utils": { "@types/stack-utils": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
@ -2336,6 +2401,11 @@
} }
} }
}, },
"csstype": {
"version": "2.6.10",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.10.tgz",
"integrity": "sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w=="
},
"currently-unhandled": { "currently-unhandled": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@ -3747,9 +3817,12 @@
} }
}, },
"hoist-non-react-statics": { "hoist-non-react-statics": {
"version": "2.5.5", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
}, },
"hosted-git-info": { "hosted-git-info": {
"version": "2.7.1", "version": "2.7.1",
@ -4163,29 +4236,25 @@
} }
}, },
"intl-format-cache": { "intl-format-cache": {
"version": "2.1.0", "version": "4.2.28",
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.1.0.tgz", "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-4.2.28.tgz",
"integrity": "sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY=" "integrity": "sha512-yFACAtiacQj2nPfFSyDd/ZRgDFDDtw55cmqdYux7ncqrqvaMTajf3Biuc4a3HAWNuMvk0r2VHBfwy2YmOmAZ+A=="
}, },
"intl-messageformat": { "intl-messageformat": {
"version": "2.2.0", "version": "7.8.4",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz", "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-7.8.4.tgz",
"integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=", "integrity": "sha512-yS0cLESCKCYjseCOGXuV4pxJm/buTfyCJ1nzQjryHmSehlptbZbn9fnlk1I9peLopZGGbjj46yHHiTAEZ1qOTA==",
"requires": { "requires": {
"intl-messageformat-parser": "1.4.0" "intl-format-cache": "^4.2.21",
"intl-messageformat-parser": "^3.6.4"
} }
}, },
"intl-messageformat-parser": { "intl-messageformat-parser": {
"version": "1.4.0", "version": "3.6.4",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz", "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-3.6.4.tgz",
"integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU=" "integrity": "sha512-RgPGwue0mJtoX2Ax8EmMzJzttxjnva7gx0Q7mKJ4oALrTZvtmCeAw5Msz2PcjW4dtCh/h7vN/8GJCxZO1uv+OA==",
},
"intl-relativeformat": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz",
"integrity": "sha1-AQ8RBYAiUfQKxH0OPhogE0iiVd8=",
"requires": { "requires": {
"intl-messageformat": "^2.0.0" "@formatjs/intl-unified-numberformat": "^3.2.0"
} }
}, },
"invariant": { "invariant": {
@ -8916,15 +8985,22 @@
} }
}, },
"react-intl": { "react-intl": {
"version": "2.7.2", "version": "3.12.1",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-2.7.2.tgz", "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-3.12.1.tgz",
"integrity": "sha512-3dcNGLqEw2FKkX+1L2WYLgjP0MVJkvWuVd1uLcnwifIQe8JQvnd9Bss4hb4Gvg/YhBIRcs4LM6C2bAgyklucjw==", "integrity": "sha512-cgumW29mwROIqyp8NXStYsoIm27+8FqnxykiLSawWjOxGIBeLuN/+p2srei5SRIumcJefOkOIHP+NDck05RgHg==",
"requires": { "requires": {
"hoist-non-react-statics": "^2.5.5", "@formatjs/intl-displaynames": "^1.2.0",
"intl-format-cache": "^2.0.5", "@formatjs/intl-listformat": "^1.4.1",
"intl-messageformat": "^2.1.0", "@formatjs/intl-relativetimeformat": "^4.5.9",
"intl-relativeformat": "^2.1.0", "@formatjs/intl-unified-numberformat": "^3.2.0",
"invariant": "^2.1.1" "@formatjs/intl-utils": "^2.2.0",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/invariant": "^2.2.31",
"hoist-non-react-statics": "^3.3.2",
"intl-format-cache": "^4.2.21",
"intl-messageformat": "^7.8.4",
"intl-messageformat-parser": "^3.6.4",
"shallow-equal": "^1.2.1"
} }
}, },
"react-is": { "react-is": {
@ -9514,6 +9590,11 @@
"crypt": ">= 0.0.1" "crypt": ">= 0.0.1"
} }
}, },
"shallow-equal": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.1.tgz",
"integrity": "sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA=="
},
"shebang-command": { "shebang-command": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",

View File

@ -61,7 +61,7 @@
"react-dom": "^16.12.0", "react-dom": "^16.12.0",
"react-draggable": "^3.3.2", "react-draggable": "^3.3.2",
"react-dropzone": "^7.0.1", "react-dropzone": "^7.0.1",
"react-intl": "~2.7.2", "react-intl": "^3.12.1",
"react-modal": "~3.6.1", "react-modal": "~3.6.1",
"react-player": "^1.14.2", "react-player": "^1.14.2",
"react-render-in-browser": "^1.1.1", "react-render-in-browser": "^1.1.1",

View File

@ -310,6 +310,13 @@ public:
server: { enabled: true, level: info } server: { enabled: true, level: info }
console: { enabled: true, level: debug } console: { enabled: true, level: debug }
external: { enabled: false, level: info, url: https://LOG_HOST/html5Log, method: POST, throttleInterval: 400, flushOnClose: true, logTag: "" } external: { enabled: false, level: info, url: https://LOG_HOST/html5Log, method: POST, throttleInterval: 400, flushOnClose: true, logTag: "" }
fallbackLanguages:
lo:
englishName: Lao
nativeName: ລາວ
lo-LA:
englishName: Lao
nativeName: ລາວ
private: private:
app: app:
host: 127.0.0.1 host: 127.0.0.1