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 { withTracker } from 'meteor/react-meteor-data';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { IntlProvider } from 'react-intl';
import Settings from '/imports/ui/services/settings';
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 = {
locale: PropTypes.string,
children: PropTypes.element.isRequired,

View File

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

View File

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

View File

@ -1,12 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
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 Button from '/imports/ui/components/button/component';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
isActive: PropTypes.bool.isRequired,
handleOnClick: PropTypes.func.isRequired,
};

View File

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

View File

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

View File

@ -1,11 +1,11 @@
import React from 'react';
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 MediaService from '/imports/ui/components/media/service';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
toggleSwapLayout: PropTypes.func.isRequired,
};

View File

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

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react';
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 Modal from '/imports/ui/components/modal/simple/component';
@ -9,7 +9,7 @@ import { makeCall } from '/imports/ui/services/api';
import { styles } from './styles';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
responseDelay: PropTypes.number.isRequired,
};

View File

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

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
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 getFromUserSettings from '/imports/ui/services/users-settings';
import withShortcutHelper from '/imports/ui/components/shortcut-help/service';
@ -36,7 +36,7 @@ const propTypes = {
showMute: PropTypes.bool.isRequired,
inAudio: PropTypes.bool.isRequired,
listenOnly: PropTypes.bool.isRequired,
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
talking: PropTypes.bool.isRequired,
};

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages, intlShape } from 'react-intl';
import { injectIntl, defineMessages } from 'react-intl';
import { styles } from './styles';
const intlMessages = defineMessages({
@ -23,7 +23,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
formattedDialNum: 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 { Session } from 'meteor/session';
import {
defineMessages, injectIntl, intlShape, FormattedMessage,
defineMessages, injectIntl, FormattedMessage,
} from 'react-intl';
import { styles } from './styles';
import PermissionsOverlay from '../permissions-overlay/component';
@ -16,7 +16,7 @@ import AudioDial from '../audio-dial/component';
import AudioAutoplayPrompt from '../autoplay/component';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired,
joinMicrophone: PropTypes.func.isRequired,
joinListenOnly: PropTypes.func.isRequired,

View File

@ -1,6 +1,6 @@
import React from 'react';
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 { withModalMounter } from '/imports/ui/components/modal/service';
import DeviceSelector from '/imports/ui/components/audio/device-selector/component';
@ -9,7 +9,7 @@ import cx from 'classnames';
import { styles } from './styles';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
changeInputDevice: PropTypes.func.isRequired,
changeOutputDevice: PropTypes.func.isRequired,
handleBack: PropTypes.func.isRequired,

View File

@ -1,11 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
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';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
handlePlayAudioSample: PropTypes.func.isRequired,
outputDeviceId: PropTypes.string,
};

View File

@ -1,7 +1,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
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';
@ -18,7 +18,7 @@ const intlMessages = defineMessages({
const propTypes = {
handleAllowAutoplay: PropTypes.func.isRequired,
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
};
class AudioAutoplayPrompt extends PureComponent {

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Session } from 'meteor/session';
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';
const intlMessages = defineMessages({
@ -27,7 +27,7 @@ const intlMessages = defineMessages({
const propTypes = {
handleYes: PropTypes.func.isRequired,
handleNo: PropTypes.func.isRequired,
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
};
class EchoTest extends Component {

View File

@ -1,11 +1,11 @@
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 PropTypes from 'prop-types';
import { styles } from './styles';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired,
};

View File

@ -1,5 +1,5 @@
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 Modal from '/imports/ui/components/modal/fullscreen/component';
import logger from '/imports/startup/client/logger';
@ -40,7 +40,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
breakout: PropTypes.objectOf(Object).isRequired,
getURL: PropTypes.func.isRequired,
mountModal: PropTypes.func.isRequired,

View File

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

View File

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

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
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 screenreaderTrap from 'makeup-screenreader-trap';
import { styles } from './styles';
@ -50,7 +50,7 @@ const propTypes = {
onHide: PropTypes.func,
onShow: PropTypes.func,
autoFocus: PropTypes.bool,
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
};
const defaultProps = {
@ -218,4 +218,4 @@ class Dropdown extends Component {
Dropdown.propTypes = propTypes;
Dropdown.defaultProps = defaultProps;
export default injectIntl(Dropdown);
export default injectIntl(Dropdown, { forwardRef: true });

View File

@ -1,6 +1,6 @@
import React from 'react';
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 Modal from '/imports/ui/components/modal/simple/component';
import { styles } from './styles';
@ -26,7 +26,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
closeModal: PropTypes.func.isRequired,
endMeeting: PropTypes.func.isRequired,
};

View File

@ -1,5 +1,5 @@
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 cx from 'classnames';
import PropTypes from 'prop-types';
@ -13,7 +13,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
fullscreenRef: PropTypes.instanceOf(Element),
dark: PropTypes.bool,
bottom: PropTypes.bool,

View File

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

View File

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

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { defineMessages, injectIntl, intlShape } from 'react-intl';
import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles';
const intlMessages = defineMessages({
@ -16,7 +16,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
onRate: PropTypes.func.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 Tooltip from '/imports/ui/components/tooltip/component';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, intlShape } from 'react-intl';
import { defineMessages, injectIntl } from 'react-intl';
import { styles } from './styles';
const intlMessages = defineMessages({
@ -46,7 +46,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
amIModerator: PropTypes.bool,
record: PropTypes.bool,
recording: PropTypes.bool,

View File

@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import { defineMessages, injectIntl, intlShape } from 'react-intl';
import { defineMessages, injectIntl } from 'react-intl';
import _ from 'lodash';
import PropTypes from 'prop-types';
import { withModalMounter } from '/imports/ui/components/modal/service';
@ -92,7 +92,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
handleToggleFullscreen: PropTypes.func.isRequired,
mountModal: PropTypes.func.isRequired,
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 WhiteboardToolbarContainer from '/imports/ui/components/whiteboard/whiteboard-toolbar/container';
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 PresentationToolbarContainer from './presentation-toolbar/container';
import CursorWrapperContainer from './cursor/cursor-wrapper-container/container';
@ -721,7 +721,7 @@ class PresentationArea extends PureComponent {
export default injectIntl(withDraggableConsumer(PresentationArea));
PresentationArea.propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
podId: PropTypes.string.isRequired,
// Defines a boolean value to detect whether a current user is a presenter
userIsPresenter: PropTypes.bool.isRequired,

View File

@ -1,5 +1,5 @@
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 cx from 'classnames';
import PropTypes from 'prop-types';
@ -13,7 +13,7 @@ const intlMessages = defineMessages({
});
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
handleDownloadPresentation: PropTypes.func.isRequired,
dark: PropTypes.bool,
};

View File

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
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 cx from 'classnames';
import { styles } from '../styles.scss';
@ -231,7 +231,7 @@ class ZoomTool extends PureComponent {
}
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
zoomValue: PropTypes.number.isRequired,
change: PropTypes.func.isRequired,
minBound: PropTypes.number.isRequired,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,11 +2,11 @@ import React from 'react';
import PropTypes from 'prop-types';
import Icon from '/imports/ui/components/icon/component';
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';
const propTypes = {
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
locale: PropTypes.shape({
locale: 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 UserListService from '/imports/ui/components/user-list/service';
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 UserOptions from './component';
const propTypes = {
users: PropTypes.arrayOf(Object).isRequired,
setEmojiStatus: PropTypes.func.isRequired,
intl: intlShape.isRequired,
intl: PropTypes.object.isRequired,
};
const intlMessages = defineMessages({

View File

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

View File

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

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
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 { noop } from 'lodash';
import KEY_CODES from '/imports/utils/keyCodes';
@ -784,7 +784,7 @@ WhiteboardToolbar.defaultProps = {
colors: ANNOTATION_COLORS,
thicknessRadiuses: THICKNESS_RADIUSES,
fontSizes: FONT_SIZES,
intl: intlShape,
intl: {},
};
WhiteboardToolbar.propTypes = {
@ -821,7 +821,7 @@ WhiteboardToolbar.propTypes = {
value: PropTypes.number.isRequired,
}).isRequired),
intl: intlShape,
intl: PropTypes.object.isRequired,
};

View File

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

View File

@ -480,6 +480,43 @@
"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": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz",
@ -1142,6 +1179,20 @@
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"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": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
@ -1179,6 +1230,20 @@
"integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==",
"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": {
"version": "1.0.1",
"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": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@ -3747,9 +3817,12 @@
}
},
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
},
"hosted-git-info": {
"version": "2.7.1",
@ -4163,29 +4236,25 @@
}
},
"intl-format-cache": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.1.0.tgz",
"integrity": "sha1-BKNp/sv61tpgBbrh8UMzMy3PkxY="
"version": "4.2.28",
"resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-4.2.28.tgz",
"integrity": "sha512-yFACAtiacQj2nPfFSyDd/ZRgDFDDtw55cmqdYux7ncqrqvaMTajf3Biuc4a3HAWNuMvk0r2VHBfwy2YmOmAZ+A=="
},
"intl-messageformat": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz",
"integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=",
"version": "7.8.4",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-7.8.4.tgz",
"integrity": "sha512-yS0cLESCKCYjseCOGXuV4pxJm/buTfyCJ1nzQjryHmSehlptbZbn9fnlk1I9peLopZGGbjj46yHHiTAEZ1qOTA==",
"requires": {
"intl-messageformat-parser": "1.4.0"
"intl-format-cache": "^4.2.21",
"intl-messageformat-parser": "^3.6.4"
}
},
"intl-messageformat-parser": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz",
"integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU="
},
"intl-relativeformat": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/intl-relativeformat/-/intl-relativeformat-2.1.0.tgz",
"integrity": "sha1-AQ8RBYAiUfQKxH0OPhogE0iiVd8=",
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-3.6.4.tgz",
"integrity": "sha512-RgPGwue0mJtoX2Ax8EmMzJzttxjnva7gx0Q7mKJ4oALrTZvtmCeAw5Msz2PcjW4dtCh/h7vN/8GJCxZO1uv+OA==",
"requires": {
"intl-messageformat": "^2.0.0"
"@formatjs/intl-unified-numberformat": "^3.2.0"
}
},
"invariant": {
@ -8916,15 +8985,22 @@
}
},
"react-intl": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-2.7.2.tgz",
"integrity": "sha512-3dcNGLqEw2FKkX+1L2WYLgjP0MVJkvWuVd1uLcnwifIQe8JQvnd9Bss4hb4Gvg/YhBIRcs4LM6C2bAgyklucjw==",
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-3.12.1.tgz",
"integrity": "sha512-cgumW29mwROIqyp8NXStYsoIm27+8FqnxykiLSawWjOxGIBeLuN/+p2srei5SRIumcJefOkOIHP+NDck05RgHg==",
"requires": {
"hoist-non-react-statics": "^2.5.5",
"intl-format-cache": "^2.0.5",
"intl-messageformat": "^2.1.0",
"intl-relativeformat": "^2.1.0",
"invariant": "^2.1.1"
"@formatjs/intl-displaynames": "^1.2.0",
"@formatjs/intl-listformat": "^1.4.1",
"@formatjs/intl-relativetimeformat": "^4.5.9",
"@formatjs/intl-unified-numberformat": "^3.2.0",
"@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": {
@ -9514,6 +9590,11 @@
"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": {
"version": "1.2.0",
"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-draggable": "^3.3.2",
"react-dropzone": "^7.0.1",
"react-intl": "~2.7.2",
"react-intl": "^3.12.1",
"react-modal": "~3.6.1",
"react-player": "^1.14.2",
"react-render-in-browser": "^1.1.1",

View File

@ -310,6 +310,13 @@ public:
server: { enabled: true, level: info }
console: { enabled: true, level: debug }
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:
app:
host: 127.0.0.1