Extract i18n from shared UI components (#4834)
* Actionbar i18n * ui Errors i18n * Features i18n * GapPriceSelector i18n * WIP * WIP #2 * Update methodDecoding * ModalBox -> functional * Signer pages i18n (missed previously) * Update ModalBox tests * Update variable
This commit is contained in:
@@ -15,11 +15,12 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import FileSaver from 'file-saver';
|
||||
import FileDownloadIcon from 'material-ui/svg-icons/file/file-download';
|
||||
|
||||
import Button from '../../Button';
|
||||
import { FileDownloadIcon } from '../../Icons';
|
||||
|
||||
class ActionbarExport extends Component {
|
||||
static propTypes = {
|
||||
@@ -38,7 +39,12 @@ class ActionbarExport extends Component {
|
||||
<Button
|
||||
className={ className }
|
||||
icon={ <FileDownloadIcon /> }
|
||||
label='export'
|
||||
label={
|
||||
<FormattedMessage
|
||||
id='ui.actionbar.export.button.export'
|
||||
defaultMessage='export'
|
||||
/>
|
||||
}
|
||||
onClick={ this.handleExport }
|
||||
/>
|
||||
);
|
||||
@@ -46,9 +52,7 @@ class ActionbarExport extends Component {
|
||||
|
||||
handleExport = () => {
|
||||
const { filename, content } = this.props;
|
||||
|
||||
const text = JSON.stringify(content, null, 4);
|
||||
|
||||
const blob = new Blob([ text ], { type: 'application/json' });
|
||||
|
||||
FileSaver.saveAs(blob, `${filename}.json`);
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
import ActionSearch from 'material-ui/svg-icons/action/search';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import Button from '../../Button';
|
||||
import InputChip from '../../Form/InputChip';
|
||||
import { SearchIcon } from '../../Icons';
|
||||
|
||||
import styles from './search.css';
|
||||
|
||||
@@ -74,7 +75,12 @@ export default class ActionbarSearch extends Component {
|
||||
<InputChip
|
||||
addOnBlur
|
||||
className={ styles.input }
|
||||
hint='Enter search input...'
|
||||
hint={
|
||||
<FormattedMessage
|
||||
id='ui.actionbar.search.hint'
|
||||
defaultMessage='Enter search input...'
|
||||
/>
|
||||
}
|
||||
ref='inputChip'
|
||||
tokens={ tokens }
|
||||
|
||||
@@ -86,7 +92,7 @@ export default class ActionbarSearch extends Component {
|
||||
|
||||
<Button
|
||||
className={ styles.searchButton }
|
||||
icon={ <ActionSearch /> }
|
||||
icon={ <SearchIcon /> }
|
||||
label=''
|
||||
onClick={ this.handleSearchClick }
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user