mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Merge pull request #154 from ascribe/fix-getlangtext
Fix missing cases of getLangText
This commit is contained in:
commit
8b0f27a17d
@ -25,11 +25,11 @@ let UnConsignRequestButton = React.createClass({
|
||||
<ModalWrapper
|
||||
trigger={
|
||||
<Button bsStyle="danger" className="btn-delete pull-center" bsSize="small" type="submit">
|
||||
REQUEST UNCONSIGN
|
||||
{getLangText('REQUEST UNCONSIGN')}
|
||||
</Button>
|
||||
}
|
||||
handleSuccess={handleSuccess}
|
||||
title='Request to Un-Consign'>
|
||||
title={getLangText('Request to Un-Consign')}>
|
||||
<UnConsignRequestForm
|
||||
url={ApiUrls.ownership_unconsigns_request}
|
||||
id={{'bitcoin_id': edition.bitcoin_id}}
|
||||
|
@ -112,7 +112,7 @@ let Edition = React.createClass({
|
||||
</CollapsibleParagraph>
|
||||
|
||||
<CollapsibleParagraph
|
||||
title="Notes"
|
||||
title={getLangText('Notes')}
|
||||
show={!!(currentUser.username || edition.acl.acl_edit || edition.public_note)}>
|
||||
<Note
|
||||
id={() => {return {'bitcoin_id': edition.bitcoin_id}; }}
|
||||
|
@ -65,7 +65,7 @@ let FurtherDetails = React.createClass({
|
||||
<Col md={12} className="ascribe-edition-personal-note">
|
||||
<PieceExtraDataForm
|
||||
name='artist_contact_info'
|
||||
title='Artist Contact Info'
|
||||
title={getLangText('Artist Contact Info')}
|
||||
convertLinks
|
||||
editable={editable}
|
||||
extraData={extraData}
|
||||
@ -73,14 +73,14 @@ let FurtherDetails = React.createClass({
|
||||
pieceId={pieceId} />
|
||||
<PieceExtraDataForm
|
||||
name='display_instructions'
|
||||
title='Display Instructions'
|
||||
title={getLangText('Display Instructions')}
|
||||
editable={editable}
|
||||
extraData={extraData}
|
||||
handleSuccess={this.showNotification}
|
||||
pieceId={pieceId} />
|
||||
<PieceExtraDataForm
|
||||
name='technology_details'
|
||||
title='Technology Details'
|
||||
title={getLangText('Technology Details')}
|
||||
editable={editable}
|
||||
extraData={extraData}
|
||||
handleSuccess={this.showNotification}
|
||||
|
@ -224,7 +224,7 @@ let Form = React.createClass({
|
||||
<Button
|
||||
className="btn btn-danger btn-delete btn-sm ascribe-margin-1px"
|
||||
type="reset">
|
||||
CANCEL
|
||||
{getLangText('CANCEL')}
|
||||
</Button>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -54,8 +54,7 @@ let SendContractAgreementForm = React.createClass({
|
||||
},
|
||||
|
||||
handleSubmitSuccess() {
|
||||
let notification = 'Contract agreement sent';
|
||||
notification = new GlobalNotificationModel(notification, 'success', 10000);
|
||||
const notification = new GlobalNotificationModel(getLangText('Contract agreement sent'), 'success', 10000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
|
||||
this.history.push('/collection');
|
||||
@ -89,13 +88,14 @@ let SendContractAgreementForm = React.createClass({
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
</Property>);
|
||||
</Property>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
render() {
|
||||
if (this.state.contractList && this.state.contractList.length > 0) {
|
||||
if (this.state.contractList && this.state.contractList.length) {
|
||||
return (
|
||||
<Form
|
||||
className="ascribe-form-bordered ascribe-form-wrapper"
|
||||
@ -139,17 +139,16 @@ let SendContractAgreementForm = React.createClass({
|
||||
</Property>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return (
|
||||
<div>
|
||||
<p className="text-center">
|
||||
{getLangText('No contracts uploaded yet, please go to the ')}
|
||||
<a href="contract_settings">{getLangText('contract settings page')}</a>
|
||||
{getLangText(' and create them.')}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default SendContractAgreementForm;
|
||||
|
@ -43,7 +43,7 @@ let ShareForm = React.createClass({
|
||||
<Button
|
||||
className="btn btn-default btn-sm ascribe-margin-1px"
|
||||
type="submit">
|
||||
SHARE
|
||||
{getLangText('SHARE')}
|
||||
</Button>
|
||||
</p>
|
||||
</div>}
|
||||
|
@ -112,7 +112,7 @@ let APISettings = React.createClass({
|
||||
<hr />
|
||||
</Form>
|
||||
<pre>
|
||||
Usage: curl <url> -H 'Authorization: Bearer <token>'
|
||||
{getLangText('Usage:')} curl <url> -H 'Authorization: Bearer <token>'
|
||||
</pre>
|
||||
{this.getApplications()}
|
||||
</CollapsibleParagraph>
|
||||
|
@ -131,13 +131,13 @@ let WebhookSettings = React.createClass({
|
||||
defaultExpanded={this.props.defaultExpanded}>
|
||||
<div>
|
||||
<p>
|
||||
Webhooks allow external services to receive notifications from ascribe.
|
||||
Currently we support webhook notifications when someone transfers, consigns, loans or shares
|
||||
(by email) a work to you.
|
||||
{getLangText('Webhooks allow external services to receive notifications from ascribe. ' +
|
||||
'Currently we support webhook notifications when someone transfers, consigns, ' +
|
||||
'loans or shares (by email) a work to you.')}
|
||||
</p>
|
||||
<p>
|
||||
To get started, simply choose the prefered action that you want to be notified upon and supply
|
||||
a target url.
|
||||
{getLangText('To get started, simply choose the prefered action that you want to be ' +
|
||||
'notified upon and supply a target url.')}
|
||||
</p>
|
||||
</div>
|
||||
<AclProxy show={this.state.webhookEvents && this.state.webhookEvents.length > 0}>
|
||||
|
@ -126,7 +126,7 @@ let PasswordResetForm = React.createClass({
|
||||
handleSuccess() {
|
||||
this.history.push('/collection');
|
||||
|
||||
const notification = new GlobalNotificationModel(getLangText('password successfully updated'), 'success', 10000);
|
||||
const notification = new GlobalNotificationModel(getLangText('Password successfully updated'), 'success', 10000);
|
||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||
},
|
||||
|
||||
|
@ -3,6 +3,17 @@
|
||||
import React from 'react';
|
||||
import { Route, IndexRoute } from 'react-router';
|
||||
|
||||
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
|
||||
import { AuthPrizeRoleRedirect } from './portfolioreview/components/pr_routes/pr_proxy_handler';
|
||||
|
||||
// General components
|
||||
import EditionContainer from '../../ascribe_detail/edition_container';
|
||||
import LogoutContainer from '../../logout_container';
|
||||
import PasswordResetContainer from '../../password_reset_container';
|
||||
import CoaVerifyContainer from '../../coa_verify_container';
|
||||
import ErrorNotFoundPage from '../../error_not_found_page';
|
||||
|
||||
import SPApp from './simple_prize/prize_app';
|
||||
import SPLanding from './simple_prize/components/prize_landing';
|
||||
import SPLoginContainer from './simple_prize/components/prize_login_container';
|
||||
import SPSignupContainer from './simple_prize/components/prize_signup_container';
|
||||
@ -10,7 +21,6 @@ import SPRegisterPiece from './simple_prize/components/prize_register_piece';
|
||||
import SPPieceList from './simple_prize/components/prize_piece_list';
|
||||
import SPPieceContainer from './simple_prize/components/ascribe_detail/prize_piece_container';
|
||||
import SPSettingsContainer from './simple_prize/components/prize_settings_container';
|
||||
import SPApp from './simple_prize/prize_app';
|
||||
|
||||
import SluicePieceContainer from './sluice/components/sluice_detail/sluice_piece_container';
|
||||
|
||||
@ -18,14 +28,7 @@ import PRApp from './portfolioreview/pr_app';
|
||||
import PRLanding from './portfolioreview/components/pr_landing';
|
||||
import PRRegisterPiece from './portfolioreview/components/pr_register_piece';
|
||||
|
||||
import EditionContainer from '../../ascribe_detail/edition_container';
|
||||
import LogoutContainer from '../../logout_container';
|
||||
import PasswordResetContainer from '../../password_reset_container';
|
||||
import CoaVerifyContainer from '../../coa_verify_container';
|
||||
import ErrorNotFoundPage from '../../error_not_found_page';
|
||||
|
||||
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
|
||||
import { AuthPrizeRoleRedirect } from './portfolioreview/components/pr_routes/pr_proxy_handler';
|
||||
import { getLangText } from '../../../utils/lang_utils';
|
||||
|
||||
|
||||
const ROUTES = {
|
||||
@ -57,12 +60,12 @@ const ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
hideFooter />
|
||||
<Route
|
||||
path='pieces/:pieceId'
|
||||
@ -94,7 +97,7 @@ const ROUTES = {
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
||||
headerTitle='SUBMISSIONS'
|
||||
headerTitle={getLangText('SUBMISSIONS')}
|
||||
hideFooter />
|
||||
<Route
|
||||
path='login'
|
||||
|
@ -66,7 +66,7 @@ let PrizeSettings = React.createClass({
|
||||
render() {
|
||||
return (
|
||||
<CollapsibleParagraph
|
||||
title={'Prize Settings for ' + this.state.prize.name}
|
||||
title={getLangText('Prize Settings for ') + this.state.prize.name}
|
||||
defaultExpanded={true}>
|
||||
<Form >
|
||||
<Property
|
||||
|
@ -3,7 +3,9 @@
|
||||
import React from 'react';
|
||||
import { Route, IndexRoute } from 'react-router';
|
||||
|
||||
// general components
|
||||
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
|
||||
|
||||
// General components
|
||||
import CoaVerifyContainer from '../../../components/coa_verify_container';
|
||||
import LoginContainer from '../../../components/login_container';
|
||||
import LogoutContainer from '../../../components/logout_container';
|
||||
@ -44,10 +46,10 @@ import PollineLanding from './components/polline/polline_landing';
|
||||
|
||||
import ArtcityLanding from './components/artcity/artcity_landing';
|
||||
|
||||
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
|
||||
|
||||
import WalletApp from './wallet_app';
|
||||
|
||||
import { getLangText } from '../../../utils/lang_utils';
|
||||
|
||||
|
||||
let ROUTES = {
|
||||
'cyland': (
|
||||
@ -82,13 +84,13 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit'
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces'
|
||||
hideFooter />
|
||||
<Route
|
||||
@ -138,12 +140,12 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces'
|
||||
hideFooter />
|
||||
<Route
|
||||
@ -196,19 +198,19 @@ let ROUTES = {
|
||||
<Route
|
||||
path='request_loan'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
|
||||
headerTitle='SEND NEW CONTRACT'
|
||||
headerTitle={getLangText('SEND NEW CONTRACT')}
|
||||
aclName='acl_create_contractagreement'
|
||||
hideFooter />
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit'
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces'
|
||||
hideFooter />
|
||||
<Route
|
||||
@ -265,13 +267,13 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit'
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces'
|
||||
hideFooter />
|
||||
<Route
|
||||
@ -323,13 +325,13 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit'
|
||||
hideFooter />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces'
|
||||
hideFooter />
|
||||
<Route
|
||||
@ -374,12 +376,12 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit' />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces' />
|
||||
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
||||
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
||||
@ -411,12 +413,12 @@ let ROUTES = {
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'
|
||||
headerTitle={getLangText('+ NEW WORK')}
|
||||
aclName='acl_wallet_submit' />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces' />
|
||||
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
||||
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
||||
|
@ -27,6 +27,8 @@ import RegisterPiece from './components/register_piece';
|
||||
|
||||
import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_handler';
|
||||
|
||||
import { getLangText } from './utils/lang_utils';
|
||||
|
||||
|
||||
const COMMON_ROUTES = (
|
||||
<Route path='/' component={AscribeApp}>
|
||||
@ -36,11 +38,11 @@ const COMMON_ROUTES = (
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)}
|
||||
headerTitle='+ NEW WORK' />
|
||||
headerTitle={getLangText('+ NEW WORK')} />
|
||||
<Route
|
||||
path='collection'
|
||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
||||
headerTitle='COLLECTION'
|
||||
headerTitle={getLangText('COLLECTION')}
|
||||
disableOn='noPieces' />
|
||||
<Route
|
||||
path='signup'
|
||||
|
Loading…
Reference in New Issue
Block a user