diff --git a/client/modules/IDE/components/ErrorModal.jsx b/client/modules/IDE/components/ErrorModal.jsx
index b1ff6b10..099065a5 100644
--- a/client/modules/IDE/components/ErrorModal.jsx
+++ b/client/modules/IDE/components/ErrorModal.jsx
@@ -1,15 +1,16 @@
import PropTypes from 'prop-types';
import React from 'react';
import { Link } from 'react-router';
+import { withTranslation } from 'react-i18next';
class ErrorModal extends React.Component {
forceAuthentication() {
return (
- In order to save sketches, you must be logged in. Please
- Login
- or
- Sign Up.
+ {this.props.t('ErrorModal.MessageLogin')}
+ {this.props.t('ErrorModal.Login')}
+ {this.props.t('ErrorModal.LoginOr')}
+ {this.props.t('ErrorModal.SignUp')}.
- The project you have attempted to save has been saved from another window.
- Please refresh the page to see the latest version.
+ {this.props.t('ErrorModal.SavedDifferentWindow')}
);
}
@@ -51,7 +51,8 @@ class ErrorModal extends React.Component {
ErrorModal.propTypes = {
type: PropTypes.string.isRequired,
- closeModal: PropTypes.func.isRequired
+ closeModal: PropTypes.func.isRequired,
+ t: PropTypes.func.isRequired
};
-export default ErrorModal;
+export default withTranslation()(ErrorModal);
diff --git a/client/modules/IDE/components/FileUploader.jsx b/client/modules/IDE/components/FileUploader.jsx
index e2e6e509..f33b59ed 100644
--- a/client/modules/IDE/components/FileUploader.jsx
+++ b/client/modules/IDE/components/FileUploader.jsx
@@ -3,6 +3,7 @@ import React from 'react';
import Dropzone from 'dropzone';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
+import { withTranslation } from 'react-i18next';
import * as UploaderActions from '../actions/uploader';
import getConfig from '../../../utils/getConfig';
import { fileExtensionsAndMimeTypes } from '../../../../server/utils/fileUtils';
@@ -30,7 +31,7 @@ class FileUploader extends React.Component {
thumbnailWidth: 200,
thumbnailHeight: 200,
acceptedFiles: fileExtensionsAndMimeTypes,
- dictDefaultMessage: 'Drop files here or click to use the file browser',
+ dictDefaultMessage: this.props.t('FileUploader.DictDefaultMessage'),
accept: this.props.dropzoneAcceptCallback.bind(this, userId),
sending: this.props.dropzoneSendingCallback,
complete: this.props.dropzoneCompleteCallback
@@ -59,7 +60,8 @@ FileUploader.propTypes = {
}),
user: PropTypes.shape({
id: PropTypes.string
- })
+ }),
+ t: PropTypes.func.isRequired
};
FileUploader.defaultProps = {
@@ -84,4 +86,4 @@ function mapDispatchToProps(dispatch) {
return bindActionCreators(UploaderActions, dispatch);
}
-export default connect(mapStateToProps, mapDispatchToProps)(FileUploader);
+export default withTranslation()(connect(mapStateToProps, mapDispatchToProps)(FileUploader));
diff --git a/client/modules/IDE/components/ShareModal.jsx b/client/modules/IDE/components/ShareModal.jsx
index e0962624..bea4c42a 100644
--- a/client/modules/IDE/components/ShareModal.jsx
+++ b/client/modules/IDE/components/ShareModal.jsx
@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
+import { withTranslation } from 'react-i18next';
import CopyableInput from './CopyableInput';
class ShareModal extends React.PureComponent {
@@ -16,21 +17,21 @@ class ShareModal extends React.PureComponent {
{projectName}
`}
/>
@@ -42,7 +43,8 @@ class ShareModal extends React.PureComponent {
ShareModal.propTypes = {
projectId: PropTypes.string.isRequired,
ownerUsername: PropTypes.string.isRequired,
- projectName: PropTypes.string.isRequired
+ projectName: PropTypes.string.isRequired,
+ t: PropTypes.func.isRequired
};
-export default ShareModal;
+export default withTranslation()(ShareModal);
diff --git a/client/modules/IDE/components/UploadFileModal.jsx b/client/modules/IDE/components/UploadFileModal.jsx
index ff7e9c2d..793c4183 100644
--- a/client/modules/IDE/components/UploadFileModal.jsx
+++ b/client/modules/IDE/components/UploadFileModal.jsx
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
+import { withTranslation } from 'react-i18next';
import prettyBytes from 'pretty-bytes';
import getConfig from '../../../utils/getConfig';
import FileUploader from './FileUploader';
@@ -14,7 +15,8 @@ const limitText = prettyBytes(limit);
class UploadFileModal extends React.Component {
propTypes = {
reachedTotalSizeLimit: PropTypes.bool.isRequired,
- closeModal: PropTypes.func.isRequired
+ closeModal: PropTypes.func.isRequired,
+ t: PropTypes.func.isRequired
}
componentDidMount() {
@@ -31,22 +33,18 @@ class UploadFileModal extends React.Component {
{ this.modal = element; }}>
-
Upload File
+
{this.props.t('UploadFileModal.Title')}
{ this.props.reachedTotalSizeLimit &&
- {
- `Error: You cannot upload any more files. You have reached the total size limit of ${limitText}.
- If you would like to upload more, please remove the ones you aren't using anymore by
- in your `
- }
+ {this.props.t('UploadFileModal.SizeLimitError', { sizeLimit: limitText })}
assets
.