diff --git a/app/locales/en.json b/app/locales/en.json index 96527d026..8c63406bf 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -75,4 +75,4 @@ "Discover": "Discover", "Fetching content": "Fetching content", "What's this?": "What's this?" -} \ No newline at end of file +} diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx index 6edb9e371..0e33a4ea6 100644 --- a/ui/js/page/publish/view.jsx +++ b/ui/js/page/publish/view.jsx @@ -179,7 +179,7 @@ class PublishPage extends React.Component { } if (!lbryuri.isValidName(rawName, false)) { - this.refs.name.showError('LBRY names must contain only letters, numbers and dashes.'); + this.refs.name.showError(__("LBRY names must contain only letters, numbers and dashes.")); return; } @@ -266,7 +266,7 @@ class PublishPage extends React.Component { }; if (licenseType == 'copyright') { - newState.copyrightNotice = 'All rights reserved.' + newState.copyrightNotice = __("All rights reserved.") } this.setState(newState); @@ -302,7 +302,7 @@ class PublishPage extends React.Component { const newChannelName = (event.target.value.startsWith('@') ? event.target.value : '@' + event.target.value); if (newChannelName.length > 1 && !lbryuri.isValidName(newChannelName.substr(1), false)) { - this.refs.newChannelName.showError('LBRY channel names must contain only letters, numbers and dashes.'); + this.refs.newChannelName.showError(__("LBRY channel names must contain only letters, numbers and dashes.")); return; } else { this.refs.newChannelName.clearError() @@ -327,7 +327,7 @@ class PublishPage extends React.Component { handleCreateChannelClick(event) { if (this.state.newChannelName.length < 5) { - this.refs.newChannelName.showError('LBRY channel names must be at least 4 characters in length.'); + this.refs.newChannelName.showError(__("LBRY channel names must be at least 4 characters in length.")); return; } @@ -346,7 +346,7 @@ class PublishPage extends React.Component { }, 5000); }, (error) => { // TODO: better error handling - this.refs.newChannelName.showError('Unable to create channel due to an internal error.'); + this.refs.newChannelName.showError(__("Unable to create channel due to an internal error.")); this.setState({ creatingChannel: false, }); @@ -377,14 +377,17 @@ class PublishPage extends React.Component { getNameBidHelpText() { if (!this.state.name) { - return "Select a URL for this publish."; + return __("Select a URL for this publish."); } else if (this.state.nameResolved === false) { - return "This URL is unused."; + return __("This URL is unused."); } else if (this.state.myClaimExists) { - return "You have already used this URL. Publishing to it again will update your previous publish." + return __("You have already used this URL. Publishing to it again will update your previous publish.") } else if (this.state.topClaimValue) { - return A deposit of at least {this.state.topClaimValue} {this.state.topClaimValue == 1 ? 'credit ' : 'credits '} - is required to win {this.state.name}. However, you can still get a permanent URL for any amount. + return {__n("A deposit of at least \"%s\" credit is required to win \"%s\". However, you can still get a permanent URL for any amount." + , "A deposit of at least \"%s\" credits is required to win \"%s\". However, you can still get a permanent URL for any amount." + , this.state.topClaimValue /*pluralization param*/ + , this.state.topClaimValue, this.state.name /*regular params*/ + )} } else { return ''; } @@ -401,49 +404,49 @@ class PublishPage extends React.Component { return null; } - const lbcInputHelp = "This LBC remains yours and the deposit can be undone at any time." + const lbcInputHelp = __("This LBC remains yours and the deposit can be undone at any time."); return (
{ this.handleSubmit(event) }}>
-

Content

+

{__("Content")}

- What are you publishing? + {__("What are you publishing?")}
{ this.onFileChange(event) }} - helper={this.state.myClaimExists ? "If you don't choose a file, the file from your existing claim will be used." : null}/> + helper={this.state.myClaimExists ? __("If you don't choose a file, the file from your existing claim will be used.") : null}/>
{ !this.state.hasFile ? '' :
- +
- +
- +
- - - - - - - - + + + + + + + +
- + {/* */} - - + +
} @@ -451,73 +454,73 @@ class PublishPage extends React.Component {
-

Access

+

{__("Access")}

- How much does this content cost? + {__("How much does this content cost?")}
- +
- { this.handleFeePrefChange(false) } } defaultChecked={!this.state.isFee} /> - { this.handleFeePrefChange(false) } } defaultChecked={!this.state.isFee} /> + { this.handleFeePrefChange(true) } } defaultChecked={this.state.isFee} /> this.handleFeeAmountChange(event)} /> { this.handleFeeCurrencyChange(event) }}> - - + + { this.state.isFee ?
- If you choose to price this content in dollars, the number of credits charged will be adjusted based on the value of LBRY credits at the time of purchase. + {__("If you choose to price this content in dollars, the number of credits charged will be adjusted based on the value of LBRY credits at the time of purchase.")}
: '' } { this.handleLicenseChange(event) }}> - - - - - - - - - + + + + + + + + + {this.state.copyrightChosen - ? { this.handleCopyrightNoticeChange(event) }} /> : null} {this.state.otherLicenseChosen ? - { this.handleOtherLicenseDescriptionChange() }} /> + { this.handleOtherLicenseDescriptionChange() }} /> : null} {this.state.otherLicenseChosen ? - { this.handleOtherLicenseUrlChange(event) }} /> + { this.handleOtherLicenseUrlChange(event) }} /> : null}
-

Identity

+

{__("Identity")}

- Who created this content? + {__("Who created this content?")}
{ this.handleChannelChange(event) }} value={this.state.channel}> - + {this.state.channels.map(({name}) => )} - +
{this.state.channel == 'new' ?
- { this.handleNewChannelNameChange(event) }} ref={newChannelName => { this.refs.newChannelName = newChannelName }} + { this.handleNewChannelNameChange(event) }} ref={newChannelName => { this.refs.newChannelName = newChannelName }} value={this.state.newChannelName} /> - { this.handleNewChannelBidChange(event) }} value={this.state.newChannelBid} />
- { this.handleCreateChannelClick(event) }} disabled={this.state.creatingChannel} /> + { this.handleCreateChannelClick(event) }} disabled={this.state.creatingChannel} />
: null} @@ -534,8 +537,8 @@ class PublishPage extends React.Component {
-

Address

-
Where should this content permanently reside? .
+

{__("Address")}

+
{__("Where should this content permanently reside?")} .
{ this.handleNameChange(event) }} @@ -546,7 +549,7 @@ class PublishPage extends React.Component { { this.handleBidChange(event) }} value={this.state.bid} @@ -557,30 +560,30 @@ class PublishPage extends React.Component {
-

Terms of Service

+

{__("Terms of Service")}

I agree to the + {__("I agree to the")} } type="checkbox" name="tos_agree" ref={(field) => { this.refs.tos_agree = field }} onChange={(event) => { this.handleTOSChange(event)}} />
- { this.handleSubmit(event) }} disabled={this.state.submitting} /> - + { this.handleSubmit(event) }} disabled={this.state.submitting} /> +
- { this.handlePublishStartedConfirmed(event) }}> -

Your file has been published to LBRY at the address lbry://{this.state.name}!

-

The file will take a few minutes to appear for other LBRY users. Until then it will be listed as "pending" under your published files.

+

{__("Your file has been published to LBRY at the address")} lbry://{this.state.name}!

+

{__('The file will take a few minutes to appear for other LBRY users. Until then it will be listed as "pending" under your published files.')}

- { this.closeModal(event) }}> - The following error occurred when attempting to publish your file: {this.state.errorMessage} + {__("The following error occurred when attempting to publish your file")}: {this.state.errorMessage}
);