How to use the react-intl.defineMessages function in react-intl

To help you get started, we’ve selected a few react-intl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pubpub / pubpub / src / containers / JournalProfile / JournalCurate.jsx View on Github external
render: function() {
		const messages = defineMessages({
			searchPubsToFeature: {
				id: 'journal.searchPubsToFeature',
				defaultMessage: 'Search Pubs to Feature',
			},
		});

		return (
			<div style="{styles.container}">
				<div style="{styles.pubSectionsWrapper}">

					{/* Featured Pubs Section */}
					<div style="{[styles.pubSectionWrapper,">
						<div style="{styles.sectionTitle}">
							</div></div></div></div>
github openfun / marsha / src / frontend / components / DashboardTimedTextManager / DashboardTimedTextManager.spec.tsx View on Github external
it('renders the message & tracks it is passed', () => {
    const message = defineMessages({
      key: {
        defaultMessage: 'Our title',
        description: '',
        id: 'message.key',
      },
    });

    const tracks = [
      {
        id: '42',
        language: 'fr',
        mode: timedTextMode.TRANSCRIPT,
      } as TimedText,
      {
        id: '43',
        language: 'en',
github Emurgo / yoroi-frontend / app / components / wallet / transactions / Transaction.js View on Github external
const assuranceLevelTranslations = defineMessages({
  low: {
    id: 'wallet.transaction.assuranceLevel.low',
    defaultMessage: '!!!low',
  },
  medium: {
    id: 'wallet.transaction.assuranceLevel.medium',
    defaultMessage: '!!!medium',
  },
  high: {
    id: 'wallet.transaction.assuranceLevel.high',
    defaultMessage: '!!!high',
  },
});

const stateTranslations = defineMessages({
  pending: {
    id: 'wallet.transaction.state.pending',
    defaultMessage: '!!!pending',
  },
  failed: {
    id: 'wallet.transaction.state.failed',
    defaultMessage: '!!!failed',
  },
});

type Props = {|
  +data: WalletTransaction,
  +state: TxStatusCodesType,
  +selectedExplorer: ExplorerType,
  +assuranceLevel: AssuranceLevel,
  +isLastInList: boolean,
github swaponline / swap.react / shared / components / modals / Alert / AlertModal.js View on Github external
import actions from 'redux/actions'
import { constants } from 'helpers'

import Link from 'sw-valuelink'

import cssModules from 'react-css-modules'
import styles from './AlertModal.scss'

import { Modal } from 'components/modal'
import { Button } from 'components/controls'
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'
import WidthContainer from 'components/layout/WidthContainer/WidthContainer'


const defaultLanguage = defineMessages({
  title: {
    id: 'alertDialogDefaultTitle',
    defaultMessage: 'Информация',
  },
  message: {
    id: 'alertDialogDefaultMessage',
    defaultMessage: 'Ставим перед фактом',
  },
  ok: {
    id: 'alertDialogDefaultOk',
    defaultMessage: 'Ok',
  },
})

@injectIntl
@cssModules(styles)
github decred / decrediton / app / components / inputs / WalletSelect.js View on Github external
import Select from "react-select";
import { injectIntl, defineMessages } from "react-intl";

const messages = defineMessages({
  placeholder: {
    id: "selectWallet.placeholder",
    defaultMessage: "Select Wallet..."
  }
});

const WalletSelect = ({
  valueKey="value",
  labelKey="label",
  multi=false,
  clearable=false,
  style={ zIndex:"9" },
  intl,
  ...props
}) =&gt; (
github OpenEnergyDashboard / OED / src / client / app / components / groups / EditGroupsComponent.tsx View on Github external
};
		const leftRightButtonsDivStyle: React.CSSProperties = {
			marginTop: '25px'
		};
		const leftRightButtonStyle: React.CSSProperties = {
			width: '50%',
			margin: '0 auto'
		};
		const boldStyle: React.CSSProperties = {
			fontWeight: 'bold',
			margin: 0
		};
		const centerTextStyle: React.CSSProperties = {
			textAlign: 'center'
		};
		const messages = defineMessages({ name: { id: 'name' }});
		return (
			<div>
				
				<div>
					<div>
						<div style="{divStyle}">
							<h3 style="{centerTextStyle}">
								
							</h3>
							<p style="{boldStyle}">
								:
							</p>
							<input value="{this.state.name}" placeholder="{this.props.intl.formatMessage(messages.name)}" type="text">
							<div style="{metersDivStyle}">
								<div>
									<p style="{boldStyle}"></p></div></div></div></div></div></div>
github swaponline / swap.react / shared / components / modals / SignUpModal / SignUpModal.js View on Github external
import { connect } from 'redaction'
import actions from 'redux/actions'
import Link from 'sw-valuelink'
import { request, firebase, constants } from 'helpers'
import firestore from 'helpers/firebase/firestore'

import cssModules from 'react-css-modules'
import styles from './SignUpModal.scss'

import Modal from 'components/modal/Modal/Modal'
import Button from 'components/controls/Button/Button'
import Input from 'components/forms/Input/Input'
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'


const title = defineMessages({
  signUpModal: {
    id: 'SignUpModal55',
    defaultMessage: 'Sign up',
  },
})

@withRouter
@connect(
  ({
    user: { ethData, btcData, bchData, ltcData },
    signUp: { isSigned },
  }) => ({
    ethAddress: ethData.address,
    btcAddress: btcData.address,
    bchAddress: bchData.address,
    ltcAddress: ltcData.address,
github wireapp / wire-webapp / src / script / strings.ts View on Github external
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/.
 *
 */

import {SyntheticErrorLabel} from '@wireapp/api-client/dist/http';
import {defineMessages} from 'react-intl';
import {BackendError} from './auth/module/action/BackendError';
import {LabeledError} from './auth/module/action/LabeledError';
import {ValidationError} from './auth/module/action/ValidationError';
import {LOGOUT_REASON} from './auth/route';

export const footerStrings = defineMessages({
  copy: {
    defaultMessage: '© Wire Swiss GmbH',
    id: 'footer.copy',
  },
  wireLink: {
    defaultMessage: 'wire.com',
    id: 'footer.wireLink',
  },
});

export const cookiePolicyStrings = defineMessages({
  bannerText: {
    defaultMessage: `We use cookies to personalize your experience on our website. By continuing to use the website, you agree to the use of cookies.<br>Further information on cookies can be found in our <b>privacy policy</b>.`,
    id: 'cookiePolicyStrings.bannerText',
  },
});
github Emurgo / yoroi-frontend / app / components / settings / categories / PaperWalletSettings.js View on Github external
import { observer } from 'mobx-react';
import classNames from 'classnames';
import { Checkbox } from 'react-polymorph/lib/components/Checkbox';
import { Select } from 'react-polymorph/lib/components/Select';
import { Button } from 'react-polymorph/lib/components/Button';
import { SelectSkin } from 'react-polymorph/lib/skins/simple/SelectSkin';
import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin';
import { defineMessages, intlShape } from 'react-intl';
import ReactToolboxMobxForm from '../../../utils/ReactToolboxMobxForm';
import LocalizableError from '../../../i18n/LocalizableError';
import styles from './PaperWalletSettings.scss';
import ReactMarkdown from 'react-markdown';
import type { Node } from 'react';
import { CheckboxOwnSkin } from '../../../themes/skins/CheckboxOwnSkin';

const messages = defineMessages({
  numAddressesSelectLabel: {
    id: 'settings.paperWallet.numAddressesSelect.label',
    defaultMessage: '!!!Number of addresses',
  },
  printIdentificationSelectLabel: {
    id: 'settings.paperWallet.printIdentificationCheckbox.label',
    defaultMessage: '!!!Print Paper Wallet account checksum',
  },
  printIdentificationMessage: {
    id: 'settings.paperWallet.printIdentificationCheckbox.description',
    defaultMessage: '!!!Enabling this will forfeit plausible deniability',
  },
  createPaperLabel: {
    id: 'settings.paperWallet.createPaper.label',
    defaultMessage: '!!!Create Paper Wallet',
  },
github digidem / react-mapfilter / src / components / PrintDialog.js View on Github external
import React from 'react'
import Button from '@material-ui/core/Button'
import Dialog from '@material-ui/core/Dialog'
import DialogActions from '@material-ui/core/DialogActions'
import DialogContent from '@material-ui/core/DialogContent'
import DialogTitle from '@material-ui/core/DialogTitle'
import InputLabel from '@material-ui/core/InputLabel'
import Input from '@material-ui/core/Input'
import FormControl from '@material-ui/core/FormControl'
import Select from '@material-ui/core/Select'
import {defineMessages, FormattedMessage} from 'react-intl'

const messages = defineMessages({
  title: {
    id: 'printDialog.title',
    defaultMessage: 'Print settings'
  },
  paperSize: {
    id: 'printDialog.paperSizeLabel',
    defaultMessage: 'Paper size'
  },
  cancel: {
    id: 'printDialog.cancelButtonLabel',
    defaultMessage: 'Cancel'
  },
  print: {
    id: 'printDialog.printButtonLabel',
    defaultMessage: 'Print'
  }