diff --git a/package.json b/package.json index 379d3a1..7ac431e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "romajs", - "version": "1.1.0", + "version": "1.1.1", "description": "Roma: a TEI customization tool in React+Redux", "main": "index.js", "scripts": { diff --git a/src/components/DownloadButton.js b/src/components/DownloadButton.js index d0b91cf..18e44f6 100644 --- a/src/components/DownloadButton.js +++ b/src/components/DownloadButton.js @@ -8,9 +8,13 @@ import InfoDialog from './dialogs/Info' export default class DownloadButton extends Component { constructor(props) { super(props) - this.state = { - showInfoDialog: false + const i18n = _i18n(this.props.language, 'DownloadButton') + this.initialState = { + showInfoDialog: false, + infoHeader: i18n('The customization is not valid'), + infoBody: i18n('errormsg') } + this.state = this.initialState } componentDidMount() { @@ -20,6 +24,20 @@ export default class DownloadButton extends Component { render() { // Set language function const i18n = _i18n(this.props.language, 'DownloadButton') + + const handleDownload = (format) => { + if (format === 'customization') { + this.props.downloadCustomization() + } else { + this.setState({ + showInfoDialog: true, + infoHeader: i18n('Generating the Customization'), + infoBody: i18n('geninfo') + }) + this.props.downloadSchema(format) + } + } + return (
) } diff --git a/src/localization/i18n.json b/src/localization/i18n.json index 549a1d8..a66f545 100644 --- a/src/localization/i18n.json +++ b/src/localization/i18n.json @@ -1073,6 +1073,10 @@ "zh-notchecked": "ODD不能被处理,因为它不是格式良好的XML,或者它是无效的!请检查你的定制,特别是带有XML数据的文档字段。", "es": "El ODD no puede ser procesado porque no está bien formado XML o no es válido. Por favor, compruebe su personalización, especialmente los campos de documentación con datos XML.", "ja": "このODDは、適格なXMLでないか、無効であるため、処理できません!カスタマイズ、特にXMLデータを含むドキュメントフィールドを確認してください。" + }, + "Generating the Customization": {}, + "geninfo": { + "en": "The download will begin shortly." } }, "FilterSearchBar": { diff --git a/src/utils/version.js b/src/utils/version.js index 1d861cb..9f34233 100644 --- a/src/utils/version.js +++ b/src/utils/version.js @@ -1,2 +1,2 @@ // Roma version -export default '1.1.0' +export default '1.1.1'