diff --git a/js/components/ascribe_forms/form_share_email.js b/js/components/ascribe_forms/form_share_email.js
index 93cf6e81..e10492d4 100644
--- a/js/components/ascribe_forms/form_share_email.js
+++ b/js/components/ascribe_forms/form_share_email.js
@@ -7,6 +7,8 @@ import FormMixin from '../../mixins/form_mixin';
import InputText from './input_text';
import InputTextArea from './input_textarea';
import ButtonSubmitOrClose from '../ascribe_buttons/button_submit_close';
+import { getLangText } from '../../utils/lang_utils.js'
+
let ShareForm = React.createClass({
mixins: [FormMixin],
@@ -27,19 +29,19 @@ let ShareForm = React.createClass({
let title = this.getTitlesString().join('');
let username = this.props.currentUser.username;
let message =
-`Hi,
+`${getLangText('Hi')},
-I am sharing :
-${title}with you.
+${getLangText('I am sharing')} :
+${title}${getLangText('with you')}.
-Truly yours,
+${getLangText('Truly yours')},
${username}`;
return (
diff --git a/js/components/ascribe_forms/form_signup.js b/js/components/ascribe_forms/form_signup.js
index f46a0b64..9fa96d6d 100644
--- a/js/components/ascribe_forms/form_signup.js
+++ b/js/components/ascribe_forms/form_signup.js
@@ -7,6 +7,7 @@ import FormMixin from '../../mixins/form_mixin';
import InputText from './input_text';
import InputCheckbox from './input_checkbox';
import ButtonSubmitOrClose from '../ascribe_buttons/button_submit_close';
+import { getLangText } from '../../utils/lang_utils.js'
let SignupForm = React.createClass({
mixins: [FormMixin],
@@ -32,43 +33,43 @@ let SignupForm = React.createClass({
- Your password must be at least 10 characters.
- This password is securing your digital property like a bank account.
- Store it in a safe place!
+ {getLangText('Your password must be at least 10 characters')}.
+ {getLangText('This password is securing your digital property like a bank account')}.
+ {getLangText('Store it in a safe place')}!
- I agree to the
- Terms of Service
+ {getLangText('I agree to the')}
+ {getLangText('Terms of Service')}
}/>
diff --git a/js/components/ascribe_forms/form_transfer.js b/js/components/ascribe_forms/form_transfer.js
index 5fa1e948..f10455d1 100644
--- a/js/components/ascribe_forms/form_transfer.js
+++ b/js/components/ascribe_forms/form_transfer.js
@@ -7,7 +7,7 @@ import FormMixin from '../../mixins/form_mixin';
import InputText from './input_text';
import InputTextArea from './input_textarea';
import ButtonSubmitOrClose from '../ascribe_buttons/button_submit_close';
-
+import { getLangText } from '../../utils/lang_utils.js'
let TransferForm = React.createClass({
mixins: [FormMixin],
@@ -29,12 +29,12 @@ let TransferForm = React.createClass({
let title = this.getTitlesString().join('');
let username = this.props.currentUser.username;
let message =
-`Hi,
+`${getLangText('Hi')},
-I transfer ownership of :
-${title}to you.
+${getLangText('I transfer ownership of')} :
+${title}${getLangText('to you')}.
-Truly yours,
+${getLangText('Truly yours')},
${username}`;
return (
@@ -43,7 +43,7 @@ ${username}`;
@@ -54,7 +54,7 @@ ${username}`;
/>
@@ -63,7 +63,7 @@ ${username}`;
They cannot be edited after the transfer.
diff --git a/js/components/ascribe_forms/form_unconsign.js b/js/components/ascribe_forms/form_unconsign.js
index c7d1cff2..80a1fa58 100644
--- a/js/components/ascribe_forms/form_unconsign.js
+++ b/js/components/ascribe_forms/form_unconsign.js
@@ -7,6 +7,7 @@ import FormMixin from '../../mixins/form_mixin';
import InputText from './input_text';
import InputTextArea from './input_textarea';
import ButtonSubmitOrClose from '../ascribe_buttons/button_submit_close';
+import { getLangText } from '../../utils/lang_utils.js'
let UnConsignForm = React.createClass({
mixins: [FormMixin],
@@ -27,12 +28,12 @@ let UnConsignForm = React.createClass({
let title = this.getTitlesString().join('');
let username = this.props.currentUser.username;
let message =
-`Hi,
+`${getLangText('Hi')},
-I un-consign:
-${title}from you.
+${getLangText('I un-consign')}:
+${title}${getLangText('from you')}.
-Truly yours,
+${getLangText('Truly yours')},
${username}`;
return (
@@ -45,12 +46,12 @@ ${username}`;
required="" />
diff --git a/js/components/ascribe_forms/form_unconsign_request.js b/js/components/ascribe_forms/form_unconsign_request.js
index fdf44c94..e2a53513 100644
--- a/js/components/ascribe_forms/form_unconsign_request.js
+++ b/js/components/ascribe_forms/form_unconsign_request.js
@@ -6,6 +6,7 @@ import ApiUrls from '../../constants/api_urls';
import FormMixin from '../../mixins/form_mixin';
import InputTextArea from './input_textarea';
import ButtonSubmitOrClose from '../ascribe_buttons/button_submit_close';
+import { getLangText } from '../../utils/lang_utils.js'
let UnConsignRequestForm = React.createClass({
mixins: [FormMixin],
@@ -25,11 +26,11 @@ let UnConsignRequestForm = React.createClass({
let title = this.props.edition.title;
let username = this.props.currentUser.username;
let message =
-`Hi,
+`${getLangText('Hi')},
-I request you to un-consign \" ${title} \".
+${getLangText('I request you to un-consign')} \" ${title} \".
-Truly yours,
+${getLangText('Truly yours')},
${username}`;
return (
@@ -39,7 +40,7 @@ ${username}`;
defaultValue={message}
required="" />
diff --git a/js/components/ascribe_modal/modal_login.js b/js/components/ascribe_modal/modal_login.js
index fae1e2d7..70fe9ece 100644
--- a/js/components/ascribe_modal/modal_login.js
+++ b/js/components/ascribe_modal/modal_login.js
@@ -7,11 +7,12 @@ import LoginForm from '../ascribe_forms/form_login';
import GlobalNotificationModel from '../../models/global_notification_model';
import GlobalNotificationActions from '../../actions/global_notification_actions';
+import { getLangText } from '../../utils/lang_utils.js'
let LoginModal = React.createClass({
handleLoginSuccess(){
this.props.handleSuccess();
- let notificationText = 'Login successful';
+ let notificationText = getLangText('Login successful');
let notification = new GlobalNotificationModel(notificationText, 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
},
@@ -20,9 +21,9 @@ let LoginModal = React.createClass({
return (
+ tooltip={getLangText('Log in to ascribe')}>
);
diff --git a/js/components/ascribe_modal/modal_password_request_reset.js b/js/components/ascribe_modal/modal_password_request_reset.js
index 17768f2c..fffcb3d7 100644
--- a/js/components/ascribe_modal/modal_password_request_reset.js
+++ b/js/components/ascribe_modal/modal_password_request_reset.js
@@ -7,10 +7,11 @@ import PasswordResetRequestForm from '../ascribe_forms/form_password_reset_reque
import GlobalNotificationModel from '../../models/global_notification_model';
import GlobalNotificationActions from '../../actions/global_notification_actions';
+import { getLangText } from '../../utils/lang_utils.js'
let PasswordResetRequestModal = React.createClass({
handleResetSuccess(){
- let notificationText = 'Request succesfully sent, check your email';
+ let notificationText = getLangText('Request successfully sent, check your email');
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
GlobalNotificationActions.appendGlobalNotification(notification);
},
@@ -18,9 +19,9 @@ let PasswordResetRequestModal = React.createClass({
return (
+ tooltip={getLangText('Reset your password')}>
);
diff --git a/js/components/ascribe_modal/modal_signup.js b/js/components/ascribe_modal/modal_signup.js
index 0cd32a0a..49f3cde5 100644
--- a/js/components/ascribe_modal/modal_signup.js
+++ b/js/components/ascribe_modal/modal_signup.js
@@ -7,10 +7,11 @@ import SignupForm from '../ascribe_forms/form_signup';
import GlobalNotificationModel from '../../models/global_notification_model';
import GlobalNotificationActions from '../../actions/global_notification_actions';
+import { getLangText } from '../../utils/lang_utils.js'
let SignupModal = React.createClass({
handleSignupSuccess(response){
- let notificationText = 'We sent an email to your address ' + response.user.email + ', please confirm.';
+ let notificationText = getLangText('We sent an email to your address') + ' ' + response.user.email + ', ' + getLangText('please confirm') + '.';
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
GlobalNotificationActions.appendGlobalNotification(notification);
},
@@ -19,9 +20,9 @@ let SignupModal = React.createClass({
return (
+ tooltip={getLangText('Sign up to ascribe')}>
);
diff --git a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
index 86241c76..a02dca9c 100644
--- a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
+++ b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
@@ -15,7 +15,7 @@ import AclButtonList from '../ascribe_buttons/acl_button_list';
import { getAvailableAcls } from '../../utils/acl_utils';
-
+import { getLangText } from '../../utils/lang_utils.js'
let PieceListBulkModal = React.createClass({
propTypes: {
@@ -97,7 +97,7 @@ let PieceListBulkModal = React.createClass({
clear all
+ onClick={this.clearAllSelections}>{getLangText('clear all')}
diff --git a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal_selected_editions_widget.js b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal_selected_editions_widget.js
index 99ede112..17e72072 100644
--- a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal_selected_editions_widget.js
+++ b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal_selected_editions_widget.js
@@ -1,6 +1,7 @@
'use strict';
import React from 'react';
+import { getLangText } from '../../utils/lang_utils.js'
let PieceListBulkModalSelectedEditionsWidget = React.createClass({
propTypes: {
@@ -9,8 +10,8 @@ let PieceListBulkModalSelectedEditionsWidget = React.createClass({
render() {
return (
-
- {this.props.numberOfSelectedEditions} Editions selected
+
+ {this.props.numberOfSelectedEditions} {getLangText('Editions selected')}
);
}
diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js
index b663aea0..a4b24722 100644
--- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js
+++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js
@@ -7,6 +7,7 @@ import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import ButtonLink from 'react-router-bootstrap/lib/ButtonLink';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
+import { getLangText } from '../../utils/lang_utils';
let PieceListToolbar = React.createClass({
@@ -32,7 +33,7 @@ let PieceListToolbar = React.createClass({
@@ -44,4 +45,4 @@ let PieceListToolbar = React.createClass({
}
});
-export default PieceListToolbar;
\ No newline at end of file
+export default PieceListToolbar;
diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
index 64974b41..d624dc68 100644
--- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
+++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar_filter_widget.js
@@ -5,6 +5,7 @@ import React from 'react';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import DropdownButton from 'react-bootstrap/lib/DropdownButton';
import MenuItem from 'react-bootstrap/lib/MenuItem';
+import { getLangText } from '../../utils/lang_utils.js'
let PieceListToolbarFilterWidgetFilter = React.createClass({
render() {
@@ -13,16 +14,16 @@ let PieceListToolbarFilterWidgetFilter = React.createClass({
return (
- Show Pieces that:
+ {getLangText('Show Pieces that')}:
diff --git a/js/components/ascribe_uploader/file_drag_and_drop.js b/js/components/ascribe_uploader/file_drag_and_drop.js
index b729e841..a0dde9a7 100644
--- a/js/components/ascribe_uploader/file_drag_and_drop.js
+++ b/js/components/ascribe_uploader/file_drag_and_drop.js
@@ -4,6 +4,7 @@ import React from 'react';
import FileDragAndDropDialog from './file_drag_and_drop_dialog';
import FileDragAndDropPreviewIterator from './file_drag_and_drop_preview_iterator';
+import { getLangText } from '../../utils/lang_utils.js';
// Taken from: https://github.com/fedosejev/react-file-drag-and-drop
@@ -152,8 +153,7 @@ let FileDragAndDrop = React.createClass({
+ onClick={this.handleOnClick}/>
);
}
@@ -90,4 +90,4 @@ let FileDragAndDropPreview = React.createClass({
}
});
-export default FileDragAndDropPreview;
\ No newline at end of file
+export default FileDragAndDropPreview;
diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js
index 04d35a47..1d145a76 100644
--- a/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js
+++ b/js/components/ascribe_uploader/file_drag_and_drop_preview_image.js
@@ -4,6 +4,7 @@ import React from 'react';
import ProgressBar from 'react-progressbar';
import AppConstants from '../../constants/application_constants';
+import { getLangText } from '../../utils/lang_utils.js'
let FileDragAndDropPreviewImage = React.createClass({
propTypes: {
@@ -40,15 +41,15 @@ let FileDragAndDropPreviewImage = React.createClass({
let actionSymbol;
if(this.props.progress > 0 && this.props.progress < 99 && this.state.paused) {
- actionSymbol = ;
+ actionSymbol = ;
} else if(this.props.progress > 0 && this.props.progress < 99 && !this.state.paused) {
- actionSymbol = ;
+ actionSymbol = ;
} else if(this.props.progress === 100) {
// only if assets are actually downloadable, there should be a download icon if the process is already at
// 100%. If not, no actionSymbol should be displayed
if(this.props.areAssetsDownloadable) {
- actionSymbol = ;
+ actionSymbol = ;
}
} else {
@@ -66,4 +67,4 @@ let FileDragAndDropPreviewImage = React.createClass({
}
});
-export default FileDragAndDropPreviewImage;
\ No newline at end of file
+export default FileDragAndDropPreviewImage;
diff --git a/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js b/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js
index 167df5e0..1460a7b6 100644
--- a/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js
+++ b/js/components/ascribe_uploader/file_drag_and_drop_preview_other.js
@@ -4,6 +4,7 @@ import React from 'react';
import ProgressBar from 'react-progressbar';
import AppConstants from '../../constants/application_constants';
+import { getLangText } from '../../utils/lang_utils.js'
let FileDragAndDropPreviewOther = React.createClass({
propTypes: {
@@ -36,15 +37,15 @@ let FileDragAndDropPreviewOther = React.createClass({
let actionSymbol;
if(this.props.progress > 0 && this.props.progress < 99 && this.state.paused) {
- actionSymbol = ;
+ actionSymbol = ;
} else if(this.props.progress > 0 && this.props.progress < 99 && !this.state.paused) {
- actionSymbol = ;
+ actionSymbol = ;
} else if(this.props.progress === 100) {
// only if assets are actually downloadable, there should be a download icon if the process is already at
// 100%. If not, no actionSymbol should be displayed
if(this.props.areAssetsDownloadable) {
- actionSymbol = ;
+ actionSymbol = ;
}
} else {
@@ -66,4 +67,4 @@ let FileDragAndDropPreviewOther = React.createClass({
}
});
-export default FileDragAndDropPreviewOther;
\ No newline at end of file
+export default FileDragAndDropPreviewOther;
diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js
index 0b20886d..aa090ed9 100644
--- a/js/components/ascribe_uploader/react_s3_fine_uploader.js
+++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js
@@ -463,7 +463,7 @@ var ReactS3FineUploader = React.createClass({
// replace filelist with first-element file list
files = tempFilesList;
-
+ // TOOD translate?
let notification = new GlobalNotificationModel('Only one file allowed (took first one)', 'danger', 10000);
GlobalNotificationActions.appendGlobalNotification(notification);
}
diff --git a/js/components/coa_verify_container.js b/js/components/coa_verify_container.js
index 14a78c16..3cc5b056 100644
--- a/js/components/coa_verify_container.js
+++ b/js/components/coa_verify_container.js
@@ -22,13 +22,13 @@ let CoaVerifyContainer = React.createClass({
- Verify your Certificate of Authenticity
+ {getLangText('Verify your Certificate of Authenticity')}
- ascribe is using the following public key for verification:
+ {getLangText('ascribe is using the following public key for verification')}:
-----BEGIN PUBLIC KEY-----
@@ -50,6 +50,7 @@ let CoaVerifyForm = React.createClass({
handleSuccess(response){
let notification = null;
if (response.verdict){
+ // TODO translate?
notification = new GlobalNotificationModel('Certificate of Authenticity successfully verified', 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
}
@@ -65,7 +66,7 @@ let CoaVerifyForm = React.createClass({
}
spinner={