moved the import of y18n component before some other imports; translations for auth developer

This commit is contained in:
Intnick 2017-05-26 02:16:25 +02:00
parent df2192116c
commit 8917d9e7e7
19 changed files with 200 additions and 127 deletions

View file

@ -75,5 +75,73 @@
"Discover": "Discover",
"Fetching content": "Fetching content",
"What's this?": "What's this?",
"Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!": "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!"
"Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!": "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!",
"LBRY is Closed": "LBRY is Closed",
"Click here to start LBRY": "Click here to start LBRY",
"Failed to load landing content.": "Failed to load landing content.",
"Settings": "Settings",
"Welcome to LBRY": "Welcome to LBRY",
"Downloads & Purchases": "Downloads & Purchases",
"Downloaded": "Downloaded",
"Published": "Published",
"Publishes": "Publishes",
"Overview": "Overview",
"Send": "Send",
"Receive": "Receive",
"Rewards": "Rewards",
"Search results for %s": "Search results for %s",
"Search": "Search",
"Your email is still not verified.": "Your email is still not verified.",
"Next": "Next",
"Email": "Email",
"Verification Code": "Verification Code",
"A verification code is required to access this version.": "A verification code is required to access this version.",
"Verify": "Verify",
"No code?": "No code?",
"Click here": "Click here",
"Authentication": "Authentication",
"LBRY Early Access": "LBRY Early Access",
"Preparing for first access": "Preparing for first access",
"Welcome to LBRY.": "Welcome to LBRY.",
"Using LBRY is like dating a centaur. Totally normal up top, and <em>way different</em> underneath.": "Using LBRY is like dating a centaur. Totally normal up top, and <em>way different</em> underneath.",
"Up top, LBRY is similar to popular media sites.": "Up top, LBRY is similar to popular media sites.",
"Below, LBRY is controlled by users -- you -- via blockchain and decentralization.": "Below, LBRY is controlled by users -- you -- via blockchain and decentralization.",
"Thank you for making content freedom possible! Here's a nickel, kid.": "Thank you for making content freedom possible! Here's a nickel, kid.",
"Developer Settings": "Developer Settings",
"Show developer menu": "Show developer menu",
"Use custom search servers": "Use custom search servers",
"Custom search servers (one per line)": "Custom search servers (one per line)",
"Force Upgrade": "Force Upgrade",
"OK": "OK",
"Show More...": "Show More...",
"Show Less": "Show Less",
"Starting daemon": "Starting daemon",
"Waiting for name resolution": "Waiting for name resolution",
"Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.": "Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.",
"Claim Reward": "Claim Reward",
"Claiming...": "Claiming...",
"This is an estimate and does not include data fees": "This is an estimate and does not include data fees",
"free": "free",
"Reward Claim Error": "Reward Claim Error",
"This field is required": "This field is required",
"Choose File": "Choose File",
"No File Chosen": "No File Chosen",
"Choose Directory": "Choose Directory",
"Downloading Update": "Downloading Update",
"Click \"Begin Upgrade\" to start the upgrade process.": "Click \"Begin Upgrade\" to start the upgrade process.",
"The app will close, and you will be prompted to install the latest version of LBRY.": "The app will close, and you will be prompted to install the latest version of LBRY.",
"After the install is complete, please reopen the app.": "After the install is complete, please reopen the app.",
"Begin Upgrade": "Begin Upgrade",
"API connection string": "API connection string",
"We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.": "We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.",
"You haven't downloaded anything from LBRY yet. Go": "You haven't downloaded anything from LBRY yet. Go",
"search for your first download": "search for your first download",
"Loading": "Loading",
" credits": " credits",
"It looks like you haven't published anything to LBRY yet. Go": "It looks like you haven't published anything to LBRY yet. Go",
"share your beautiful cats with the world": "share your beautiful cats with the world",
"report": "report",
"Content-Type": "Content-Type",
"Author": "Author",
"License": "License"
}

View file

@ -55,11 +55,11 @@ class SubmitEmailStage extends React.Component {
return (
<section>
<form onSubmit={(event) => { this.handleSubmit(event) }}>
<FormRow ref={(ref) => { this._emailRow = ref }} type="text" label="Email" placeholder="scrwvwls@lbry.io"
<FormRow ref={(ref) => { this._emailRow = ref }} type="text" label={__("Email")} placeholder="scrwvwls@lbry.io"
name="email" value={this.state.email}
onChange={(event) => { this.handleEmailChanged(event) }} />
<div className="form-row-submit">
<Link button="primary" label="Next" disabled={this.state.submitting} onClick={(event) => { this.handleSubmit(event) }} />
<Link button="primary" label={__("Next")} disabled={this.state.submitting} onClick={(event) => { this.handleSubmit(event) }} />
</div>
</form>
</section>
@ -102,7 +102,7 @@ class ConfirmEmailStage extends React.Component {
if (userEmail.is_verified) {
this.props.setStage("welcome")
} else {
onSubmitError(new Error("Your email is still not verified.")) //shouldn't happen?
onSubmitError(new Error(__("Your email is still not verified."))) //shouldn't happen?
}
}, onSubmitError);
}
@ -111,14 +111,14 @@ class ConfirmEmailStage extends React.Component {
return (
<section>
<form onSubmit={(event) => { this.handleSubmit(event) }}>
<FormRow label="Verification Code" ref={(ref) => { this._codeRow = ref }} type="text"
<FormRow label={__("Verification Code")} ref={(ref) => { this._codeRow = ref }} type="text"
name="code" placeholder="a94bXXXXXXXXXXXXXX" value={this.state.code} onChange={(event) => { this.handleCodeChanged(event) }}
helper="A verification code is required to access this version."/>
helper={__("A verification code is required to access this version.")}/>
<div className="form-row-submit form-row-submit--with-footer">
<Link button="primary" label="Verify" disabled={this.state.submitting} onClick={(event) => { this.handleSubmit(event)}} />
<Link button="primary" label={__("Verify")} disabled={this.state.submitting} onClick={(event) => { this.handleSubmit(event)}} />
</div>
<div className="form-field__helper">
No code? <Link onClick={() => { this.props.setStage("nocode")}} label="Click here" />.
{__("No code?")} <Link onClick={() => { this.props.setStage("nocode")}} label={__("Click here")} />.
</div>
</form>
</section>
@ -150,26 +150,26 @@ class WelcomeStage extends React.Component {
render() {
return (
!this.state.hasReward ?
<Modal type="custom" isOpen={true} contentLabel="Welcome to LBRY" {...this.props}>
<Modal type="custom" isOpen={true} contentLabel={__("Welcome to LBRY")} {...this.props}>
<section>
<h3 className="modal__header">Welcome to LBRY.</h3>
<p>Using LBRY is like dating a centaur. Totally normal up top, and <em>way different</em> underneath.</p>
<p>Up top, LBRY is similar to popular media sites.</p>
<p>Below, LBRY is controlled by users -- you -- via blockchain and decentralization.</p>
<p>Thank you for making content freedom possible! Here's a nickel, kid.</p>
<h3 className="modal__header">{__("Welcome to LBRY.")}</h3>
<p>{__("Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.")}</p>
<p>{__("Up top, LBRY is similar to popular media sites.")}</p>
<p>{__("Below, LBRY is controlled by users -- you -- via blockchain and decentralization.")}</p>
<p>{__("Thank you for making content freedom possible! Here's a nickel, kid.")}</p>
<div style={{textAlign: "center", marginBottom: "12px"}}>
<RewardLink type="new_user" button="primary" onRewardClaim={(event) => { this.onRewardClaim(event) }} onRewardFailure={() => this.props.setStage(null)} onConfirmed={() => { this.props.setStage(null) }} />
</div>
</section>
</Modal> :
<Modal type="alert" overlayClassName="modal-overlay modal-overlay--clear" isOpen={true} contentLabel="Welcome to LBRY" {...this.props} onConfirmed={() => { this.props.setStage(null) }}>
<Modal type="alert" overlayClassName="modal-overlay modal-overlay--clear" isOpen={true} contentLabel={__("Welcome to LBRY")} {...this.props} onConfirmed={() => { this.props.setStage(null) }}>
<section>
<h3 className="modal__header">About Your Reward</h3>
<p>You earned a reward of <CreditAmount amount={this.state.rewardAmount} label={false} /> LBRY credits, or <em>LBC</em>.</p>
<p>This reward will show in your Wallet momentarily, probably while you are reading this message.</p>
<p>LBC is used to compensate creators, to publish, and to have say in how the network works.</p>
<p>No need to understand it all just yet! Try watching or downloading something next.</p>
<p>Finally, know that LBRY is an early beta and that it earns the name.</p>
<h3 className="modal__header">{__("About Your Reward")}</h3>
<p>{__("You earned a reward of ")} <CreditAmount amount={this.state.rewardAmount} label={false} /> {__("LBRY credits, or \"LBC\".")}</p>
<p>{__("This reward will show in your Wallet momentarily, probably while you are reading this message.")}</p>
<p>{__("LBC is used to compensate creators, to publish, and to have say in how the network works.")}</p>
<p>{__("No need to understand it all just yet! Try watching or downloading something next.")}</p>
<p>{__("Finally, know that LBRY is an early beta and that it earns the name.")}</p>
</section>
</Modal>
);
@ -178,16 +178,16 @@ class WelcomeStage extends React.Component {
const ErrorStage = (props) => {
return <section>
<p>An error was encountered that we cannot continue from.</p>
<p>At least we're earning the name beta.</p>
{ props.errorText ? <p>Message: {props.errorText}</p> : '' }
<Link button="alt" label="Try Reload" onClick={() => { window.location.reload() } } />
<p>{__("An error was encountered that we cannot continue from.")}</p>
<p>{__("At least we're earning the name beta.")}</p>
{ props.errorText ? <p>{__("Message:")} {props.errorText}</p> : '' }
<Link button="alt" label={__("Try Reload")} onClick={() => { window.location.reload() } } />
</section>
}
const PendingStage = (props) => {
return <section>
<p>Preparing for first access <span className="busy-indicator"></span></p>
<p>{__("Preparing for first access")} <span className="busy-indicator"></span></p>
</section>
}
@ -230,20 +230,20 @@ class CodeRequiredStage extends React.Component {
return (
<div>
<section className="section-spaced">
<p>Access to LBRY is restricted as we build and scale the network.</p>
<p>There are two ways in:</p>
<h3>Own LBRY Credits</h3>
<p>If you own at least 1 LBC, you can get in right now.</p>
<p>{__("Access to LBRY is restricted as we build and scale the network.")}</p>
<p>{__("There are two ways in:")}</p>
<h3>{__("Own LBRY Credits")}</h3>
<p>{__("If you own at least 1 LBC, you can get in right now.")}</p>
<p style={{ textAlign: "center"}}><Link onClick={() => { setLocal('auth_bypassed', true); this.props.setStage(null); }}
disabled={disabled} label="Let Me In" button={ disabled ? "alt" : "primary" } /></p>
<p>Your balance is <CreditAmount amount={this.state.balance} />. To increase your balance, send credits to this address:</p>
<p><Address address={ this.state.address ? this.state.address : "Generating Address..." } /></p>
<p>If you don't understand how to send credits, then...</p>
disabled={disabled} label={__("Let Me In")} button={ disabled ? "alt" : "primary" } /></p>
<p>{__("Your balance is ")}<CreditAmount amount={this.state.balance} />. {__("To increase your balance, send credits to this address:")}</p>
<p><Address address={ this.state.address ? this.state.address : __("Generating Address...") } /></p>
<p>{__("If you don't understand how to send credits, then...")}</p>
</section>
<section>
<h3>Wait For A Code</h3>
<p>If you provide your email, you'll automatically receive a notification when the system is open.</p>
<p><Link onClick={() => { this.props.setStage("email"); }} label="Return" /></p>
<h3>{__("Wait For A Code")}</h3>
<p>{__("If you provide your email, you'll automatically receive a notification when the system is open.")}</p>
<p><Link onClick={() => { this.props.setStage("email"); }} label={__("Return")} /></p>
</section>
</div>
);
@ -312,16 +312,16 @@ export class AuthOverlay extends React.Component {
const StageContent = this._stages[this.state.stage];
if (!StageContent) {
return <span className="empty">Unknown authentication step.</span>
return <span className="empty">{__("Unknown authentication step.")}</span>
}
return (
this.state.stage != "welcome" ?
<ModalPage className="modal-page--full" isOpen={true} contentLabel="Authentication">
<h1>LBRY Early Access</h1>
<ModalPage className="modal-page--full" isOpen={true} contentLabel={__("Authentication")}>
<h1>{__("LBRY Early Access")}</h1>
<StageContent {...this.state.stageProps} setStage={(stage, stageProps) => { this.setStage(stage, stageProps) }} />
</ModalPage> :
<StageContent setStage={(stage, stageProps) => { this.setStage(stage, stageProps) }} {...this.state.stageProps} />
);
}
}
}

View file

@ -68,9 +68,9 @@ export class CreditAmount extends React.Component {
const formattedAmount = lbry.formatCredits(this.props.amount, this.props.precision);
let amountText;
if (this.props.showFree && parseFloat(formattedAmount) == 0) {
amountText = 'free';
amountText = __('free');
} else if (this.props.label) {
amountText = formattedAmount + (parseFloat(formattedAmount) == 1 ? ' credit' : ' credits');
amountText = formattedAmount + (parseFloat(formattedAmount) == 1 ? __(' credit') : __(' credits'));
} else {
amountText = formattedAmount;
}
@ -80,7 +80,7 @@ export class CreditAmount extends React.Component {
<span>
{amountText}
</span>
{ this.props.isEstimate ? <span className="credit-amount__estimate" title="This is an estimate and does not include data fees">*</span> : null }
{ this.props.isEstimate ? <span className="credit-amount__estimate" title={__("This is an estimate and does not include data fees")}>*</span> : null }
</span>
);
}

View file

@ -15,22 +15,22 @@ class DownloadingModal extends React.Component {
} = this.props
return (
<Modal isOpen={true} contentLabel="Downloading Update" type="custom">
Downloading Update{downloadProgress ? `: ${downloadProgress}%` : null}
<Modal isOpen={true} contentLabel={__("Downloading Update")} type="custom">
{__("Downloading Update")}{downloadProgress ? `: ${downloadProgress}%` : null}
<Line percent={downloadProgress} strokeWidth="4"/>
{downloadComplete ? (
<div>
<br />
<p>Click "Begin Upgrade" to start the upgrade process.</p>
<p>The app will close, and you will be prompted to install the latest version of LBRY.</p>
<p>After the install is complete, please reopen the app.</p>
<p>{__("Click \"Begin Upgrade\" to start the upgrade process.")}</p>
<p>{__("The app will close, and you will be prompted to install the latest version of LBRY.")}</p>
<p>{__("After the install is complete, please reopen the app.")}</p>
</div>
) : null }
<div className="modal__buttons">
{downloadComplete
? <Link button="primary" label="Begin Upgrade" className="modal__button" onClick={startUpgrade} />
? <Link button="primary" label={__("Begin Upgrade")} className="modal__button" onClick={startUpgrade} />
: null}
<Link button="alt" label="Cancel" className="modal__button" onClick={cancelUpgrade} />
<Link button="alt" label={__("Cancel")} className="modal__button" onClick={cancelUpgrade} />
</div>
</Modal>
)

View file

@ -15,12 +15,12 @@ class ErrorModal extends React.Component {
const errorObj = typeof error === "string" ? { error: error } : error
const error_key_labels = {
connectionString: 'API connection string',
method: 'Method',
params: 'Parameters',
code: 'Error code',
message: 'Error message',
data: 'Error data',
connectionString: __('API connection string'),
method: __('Method'),
params: __('Parameters'),
code: __('Error code'),
message: __('Error message'),
data: __('Error data'),
}
@ -35,16 +35,16 @@ class ErrorModal extends React.Component {
return(
<ExpandableModal
isOpen={modal == 'error'}
contentLabel="Error" className="error-modal"
contentLabel={__("Error")} className="error-modal"
overlayClassName="error-modal-overlay"
onConfirmed={closeModal}
extraContent={errorInfo}
>
<h3 className="modal__header">Error</h3>
<h3 className="modal__header">{__("Error")}</h3>
<div className="error-modal__content">
<div><img className="error-modal__warning-symbol" src={lbry.imagePath('warning.png')} /></div>
<p>We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.</p>
<p>{__("We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.")}</p>
</div>
</ExpandableModal>
)

View file

@ -41,14 +41,14 @@ class FileSelector extends React.Component {
<div className="file-selector">
<button type="button" className="file-selector__choose-button" onClick={() => this.handleButtonClick()}>
{this.props.type == 'file' ?
'Choose File' :
'Choose Directory'}
__('Choose File') :
__('Choose Directory')}
</button>
{' '}
<span className="file-selector__path">
{this.state.path ?
this.state.path :
'No File Chosen'}
__('No File Chosen')}
</span>
</div>
);

View file

@ -21,7 +21,7 @@ export class FormField extends React.Component {
constructor(props) {
super(props);
this._fieldRequiredText = 'This field is required';
this._fieldRequiredText = __('This field is required');
this._type = null;
this._element = null;
@ -136,7 +136,7 @@ export class FormRow extends React.Component {
constructor(props) {
super(props);
this._fieldRequiredText = 'This field is required';
this._fieldRequiredText = __('This field is required');
this.state = {
isError: false,

View file

@ -2,6 +2,9 @@ import React from 'react';
import ReactModal from 'react-modal';
import Link from 'component/link';
const i18n = require('y18n')({directory: 'app/locales'});
export class Modal extends React.Component {
static propTypes = {
@ -18,8 +21,8 @@ export class Modal extends React.Component {
static defaultProps = {
type: 'alert',
overlay: true,
confirmButtonLabel: 'OK',
abortButtonLabel: 'Cancel',
confirmButtonLabel: i18n.__('OK'),
abortButtonLabel: i18n.__('Cancel'),
confirmButtonDisabled: false,
abortButtonDisabled: false,
}
@ -52,9 +55,9 @@ export class ExpandableModal extends React.Component {
}
static defaultProps = {
confirmButtonLabel: 'OK',
expandButtonLabel: 'Show More...',
hideButtonLabel: 'Show Less',
confirmButtonLabel: i18n.__('OK'),
expandButtonLabel: i18n.__('Show More...'),
hideButtonLabel: i18n.__('Show Less'),
}
constructor(props) {

View file

@ -77,15 +77,15 @@ export class RewardLink extends React.Component {
return (
<div className="reward-link">
{this.props.claimed
? <span><Icon icon="icon-check" /> Reward claimed.</span>
? <span><Icon icon="icon-check" /> {__("Reward claimed.")}</span>
: <Link button={this.props.button ? this.props.button : 'alt'} disabled={this.state.pending || !this.state.claimable }
label={ this.state.pending ? "Claiming..." : "Claim Reward"} onClick={() => { this.claimReward() }} />}
label={ this.state.pending ? __("Claiming...") : __("Claim Reward")} onClick={() => { this.claimReward() }} />}
{this.state.errorMessage ?
<Modal isOpen={true} contentLabel="Reward Claim Error" className="error-modal" onConfirmed={() => { this.clearError() }}>
<Modal isOpen={true} contentLabel={__("Reward Claim Error")} className="error-modal" onConfirmed={() => { this.clearError() }}>
{this.state.errorMessage}
</Modal>
: ''}
</div>
);
}
}
}

View file

@ -12,7 +12,7 @@ export class SplashScreen extends React.Component {
super(props);
this.state = {
details: 'Starting daemon',
details: __('Starting daemon'),
isLagging: false,
};
}
@ -29,7 +29,7 @@ export class SplashScreen extends React.Component {
// TODO: This is a hack, and the logic should live in the daemon
// to give us a better sense of when we are actually started
this.setState({
details: 'Waiting for name resolution',
details: __('Waiting for name resolution'),
isLagging: false
});
@ -54,8 +54,8 @@ export class SplashScreen extends React.Component {
} else {
this.setState({
isLagging: true,
message: "Failed to connect to LBRY",
details: "LBRY was unable to start and connect properly."
message: __("Failed to connect to LBRY"),
details: __("LBRY was unable to start and connect properly.")
})
}
})

View file

@ -2,14 +2,19 @@ import React from 'react';
import ReactDOM from 'react-dom';
import lbry from './lbry.js';
import lbryio from './lbryio.js';
const i18n = require('y18n')({directory: 'app/locales'});
window.__ = i18n.__;
window.__n = i18n.__n;
import lighthouse from './lighthouse.js';
import App from 'component/app/index.js';
import SplashScreen from 'component/splash.js';
import SnackBar from 'component/snackBar';
import {AuthOverlay} from 'component/auth.js';
import { Provider } from 'react-redux';
import batchActions from 'util/batchActions'
import store from 'store.js';
import SplashScreen from 'component/splash.js';
import {AuthOverlay} from 'component/auth.js';
import {
doChangePath,
doNavigate,
@ -30,9 +35,6 @@ const {remote, ipcRenderer, shell} = require('electron');
const contextMenu = remote.require('./menu/context-menu');
const app = require('./app')
const i18n = require('y18n')({directory: 'app/locales'});
window.__ = i18n.__;
window.__n = i18n.__n;
lbry.showMenuIfNeeded();

View file

@ -27,11 +27,11 @@ class ChannelPage extends React.Component{
let contentList
if (claimsInChannel === undefined) {
contentList = <BusyMessage message="Fetching content" />
contentList = <BusyMessage message={__("Fetching content")} />
} else if (claimsInChannel) {
contentList = claimsInChannel.length ?
claimsInChannel.map((claim) => <FileTile key={claim.claim_id} uri={lbryuri.build({name: claim.name, claimId: claim.claim_id})} />) :
<span className="empty">No content found.</span>
<span className="empty">{__("No content found.")}</span>
}
return <main className="main--single-column">
@ -41,11 +41,11 @@ class ChannelPage extends React.Component{
</div>
<div className="card__content">
<p>
This channel page is a stub.
{__("This channel page is a stub.")}
</p>
</div>
</section>
<h3 className="card-row__header">Published Content</h3>
<h3 className="card-row__header">{__("Published Content")}</h3>
{contentList}
</main>
}

View file

@ -63,17 +63,17 @@ class DeveloperPage extends React.Component {
return (
<main>
<section className="card">
<h3>Developer Settings</h3>
<h3>{__("Developer Settings")}</h3>
<div className="form-row">
<label><FormField type="checkbox" onChange={(event) => { this.handleShowDeveloperMenuChange() }} checked={this.state.showDeveloperMenu} /> Show developer menu</label>
<label><FormField type="checkbox" onChange={(event) => { this.handleShowDeveloperMenuChange() }} checked={this.state.showDeveloperMenu} /> {__("Show developer menu")}</label>
</div>
<div className="form-row">
<label><FormField type="checkbox" onChange={(event) => { this.handleUseCustomLighthouseServersChange() }} checked={this.state.useCustomLighthouseServers} /> Use custom search servers</label>
<label><FormField type="checkbox" onChange={(event) => { this.handleUseCustomLighthouseServersChange() }} checked={this.state.useCustomLighthouseServers} /> {__("Use custom search servers")}</label>
</div>
{this.state.useCustomLighthouseServers
? <div className="form-row">
<label>
Custom search servers (one per line)
{__("Custom search servers (one per line)")}
<div><FormField type="textarea" className="developer-page__custom-lighthouse-servers" value={this.state.customLighthouseServers} onChange={(event) => { this.handleCustomLighthouseServersChange() }} checked={this.state.debugMode} /></div>
</label>
</div>
@ -83,7 +83,7 @@ class DeveloperPage extends React.Component {
<div className="form-row">
<FormField name="file" ref="file" type="file" onChange={(event) => { this.handleUpgradeFileChange() }}/>
&nbsp;
<Link label="Force Upgrade" button="alt" onClick={(event) => { this.handleForceUpgradeClick() }} />
<Link label={__("Force Upgrade")} button="alt" onClick={(event) => { this.handleForceUpgradeClick() }} />
</div>
</section>
</main>

View file

@ -38,7 +38,7 @@ class DiscoverPage extends React.Component{
<main>
{
fetchingFeaturedUris &&
<BusyMessage message="Fetching content" />
<BusyMessage message={__("Fetching content")} />
}
{
typeof featuredUris === "object" &&
@ -48,7 +48,7 @@ class DiscoverPage extends React.Component{
}
{
typeof featuredUris !== undefined &&
<div className="empty">Failed to load landing content.</div>
<div className="empty">{__("Failed to load landing content.")}</div>
}
</main>
)

View file

@ -27,9 +27,9 @@ class FileListDownloaded extends React.Component {
content = <FileList fileInfos={fileInfos} fetching={isPending} />
} else {
if (isPending) {
content = <BusyMessage message="Loading" />
content = <BusyMessage message={__("Loading")} />
} else {
content = <span>You haven't downloaded anything from LBRY yet. Go <Link onClick={() => navigate('/discover')} label="search for your first download" />!</span>
content = <span>{__("You haven't downloaded anything from LBRY yet. Go")} <Link onClick={() => navigate('/discover')} label={__("search for your first download")} />!</span>
}
}

View file

@ -49,9 +49,9 @@ class FileListPublished extends React.Component {
content = <FileList fileInfos={fileInfos} fetching={isPending} fileTileShowEmpty={FileTile.SHOW_EMPTY_PENDING} />
} else {
if (isPending) {
content = <BusyMessage message="Loading" />
content = <BusyMessage message={__("Loading")} />
} else {
content = <span>It looks like you haven't published anything to LBRY yet. Go <Link onClick={() => navigate('/publish')} label="share your beautiful cats with the world" />!</span>
content = <span>{__("It looks like you haven't published anything to LBRY yet. Go")} <Link onClick={() => navigate('/publish')} label={__("share your beautiful cats with the world")} />!</span>
}
}

View file

@ -26,16 +26,16 @@ const FormatItem = (props) => {
<table className="table-standard">
<tbody>
<tr>
<td>Content-Type</td><td>{mediaType}</td>
<td>{__("Content-Type")}</td><td>{mediaType}</td>
</tr>
<tr>
<td>Author</td><td>{author}</td>
<td>{__("Author")}</td><td>{author}</td>
</tr>
<tr>
<td>Language</td><td>{language}</td>
<td>{__("Language")}</td><td>{language}</td>
</tr>
<tr>
<td>License</td><td>{license}</td>
<td>{__("License")}</td><td>{license}</td>
</tr>
</tbody>
</table>
@ -68,7 +68,7 @@ class FilePage extends React.Component{
} = this.props
if (!claim || !metadata) {
return <span className="empty">Empty claim or metadata info.</span>
return <span className="empty">{__("Empty claim or metadata info.")}</span>
}
const {
@ -117,7 +117,7 @@ class FilePage extends React.Component{
<FormatItem metadata={metadata} contentType={contentType} />
</div> : '' }
<div className="card__content">
<Link href="https://lbry.io/dmca" label="report" className="button-text-help" />
<Link href="https://lbry.io/dmca" label={__("report")} className="button-text-help" />
</div>
</section>
</main>
@ -125,4 +125,4 @@ class FilePage extends React.Component{
}
}
export default FilePage;
export default FilePage;

View file

@ -9,8 +9,8 @@ class StartPage extends React.Component {
render() {
return (
<main className="main--single-column">
<h3>__("LBRY is Closed")</h3>
<Link href="lbry://lbry" label="Click here to start LBRY" />
<h3>{__("LBRY is Closed")}</h3>
<Link href="lbry://lbry" label={__("Click here to start LBRY")} />
</main>
);
}

View file

@ -39,13 +39,13 @@ export const selectPageTitle = createSelector(
(page, params) => {
switch (page) {
case 'search':
return params.query ? `Search results for ${params.query}` : 'Search'
return params.query ? __("Search results for %s", params.query) : __('Search')
case 'settings':
return 'Settings'
return __('Settings')
case 'help':
return 'Help'
return __('Help')
case 'report':
return 'Report'
return __('Report')
case 'wallet':
case 'send':
case 'receive':
@ -54,19 +54,19 @@ export const selectPageTitle = createSelector(
case 'show':
return lbryuri.normalize(params.uri)
case 'downloaded':
return 'Downloads & Purchases'
return __('Downloads & Purchases')
case 'published':
return 'Publishes'
return __('Publishes')
case 'start':
return 'Start'
return __('Start')
case 'publish':
return 'Publish'
return __('Publish')
case 'help':
return 'Help'
return __('Help')
case 'developer':
return 'Developer'
return __('Developer')
case 'discover':
return 'Home'
return __('Home')
default:
return '';
}
@ -142,22 +142,22 @@ export const selectHeaderLinks = createSelector(
case 'receive':
case 'rewards':
return {
'wallet': 'Overview',
'send': 'Send',
'receive': 'Receive',
'rewards': 'Rewards',
'wallet': __('Overview'),
'send': __('Send'),
'receive': __('Receive'),
'rewards': __('Rewards'),
};
case 'downloaded':
case 'published':
return {
'downloaded': 'Downloaded',
'published': 'Published',
'downloaded': __('Downloaded'),
'published': __('Published'),
};
case 'settings':
case 'help':
return {
'settings': 'Settings',
'help': 'Help',
'settings': __('Settings'),
'help': __('Help'),
}
default:
return null;
@ -203,4 +203,4 @@ export const selectSnackBar = createSelector(
export const selectSnackBarSnacks = createSelector(
selectSnackBar,
(snackBar) => snackBar.snacks || []
)
)