lots of stuff translated
This commit is contained in:
parent
dbb118c8ee
commit
01cb3f583e
13 changed files with 140 additions and 68 deletions
|
@ -233,5 +233,77 @@
|
|||
"Loading transactions": "Loading transactions",
|
||||
"Amount": "Amount",
|
||||
"Time": "Time",
|
||||
"Transaction": "Transaction"
|
||||
"Transaction": "Transaction",
|
||||
"You earned %s for registering as a new developer.": "You earned %s for registering as a new developer.",
|
||||
"You earned %s LBC new user reward.": "You earned %s LBC new user reward.",
|
||||
"You earned %s LBC for verifying your email address.": "You earned %s LBC for verifying your email address.",
|
||||
"You earned %s LBC for creating a publisher identity.": "You earned %s LBC for creating a publisher identity.",
|
||||
"You earned %s LBC for streaming your first video.": "You earned %s LBC for streaming your first video.",
|
||||
"You earned %s LBC for downloading some of the things.": "You earned %s LBC for downloading some of the things.",
|
||||
"You earned %s LBC for making your first publication.": "You earned %s LBC for making your first publication.",
|
||||
"Your First Nickel": "Your First Nickel",
|
||||
"First Publish": "First Publish",
|
||||
"We're Going Streaming": "We're Going Streaming",
|
||||
"Channel Surfing": "Channel Surfing",
|
||||
"Many Views": "Many Views",
|
||||
"Hot Right Now": "Hot Right Now",
|
||||
"A welcome bonus for being at the vanguard of content freedom.": "A welcome bonus for being at the vanguard of content freedom.",
|
||||
"The first view is on us.": "The first view is on us.",
|
||||
"Up the quad, and to the gymanasium. Press play. Everybody's doing it.": "Up the quad, and to the gymanasium. Press play. Everybody's doing it.",
|
||||
"Claim your channel! Create an identity used to securely publish content.": "Claim your channel! Create an identity used to securely publish content.",
|
||||
"Watch a bunch of stuff... who knows how much?": "Watch a bunch of stuff... who knows how much?",
|
||||
"Watch the latest featured content.": "Watch the latest featured content.",
|
||||
"Rewards are not enabled.": "Rewards are not enabled.",
|
||||
"Failed to load rewards.": "Failed to load rewards.",
|
||||
"Reward claimed.": "Reward claimed.",
|
||||
"Show All": "Show All",
|
||||
"Please create a channel identity first.": "Please create a channel identity first.",
|
||||
"Please publish something and wait for confirmation by the network to claim this reward.": "Please publish something and wait for confirmation by the network to claim this reward.",
|
||||
"Please publish something to claim this reward.": "Please publish something to claim this reward.",
|
||||
"Could not connect to Lighthouse server. Last server attempted: %s": "Could not connect to Lighthouse server. Last server attempted: %s",
|
||||
"LBRY URIs must include a protocol prefix (lbry://).": "LBRY URIs must include a protocol prefix (lbry://).",
|
||||
"URI does not include name.": "URI does not include name.",
|
||||
"No channel name after @.": "No channel name after @.",
|
||||
"Channel names must be at least %s characters.": "Channel names must be at least %s characters.",
|
||||
"Invalid character %s in name: %s.": "Invalid character %s in name: %s.",
|
||||
"No modifier provided after separator %s.": "No modifier provided after separator %s.",
|
||||
"Invalid claim ID %s.": "Invalid claim ID %s.",
|
||||
"Claim sequence must be a number.": "Claim sequence must be a number.",
|
||||
"Bid position must be a number.": "Bid position must be a number.",
|
||||
"Only channel URIs may have a path.": "Only channel URIs may have a path.",
|
||||
"Invalid character %s in path: %s": "Invalid character %s in path: %s",
|
||||
"No path provided after /": "No path provided after /",
|
||||
"Received a channel content URI, but name and channelName do not match. \"name\" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.": "Received a channel content URI, but name and channelName do not match. \"name\" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.",
|
||||
"Path and contentName do not match. Only one is required; most likely you wanted contentName.": "Path and contentName do not match. Only one is required; most likely you wanted contentName.",
|
||||
"Internal API disabled": "Internal API disabled",
|
||||
"LBRY internal API is disabled": "LBRY internal API is disabled",
|
||||
"Something went wrong making an internal API call.": "Something went wrong making an internal API call.",
|
||||
"XMLHttpRequest connection timed out": "XMLHttpRequest connection timed out",
|
||||
"Invalid method": "Invalid method",
|
||||
"Received invalid authentication response.": "Received invalid authentication response.",
|
||||
"Unable to connect to LBRY": "Unable to connect to LBRY",
|
||||
"Resolve has hacked cache on top of it that requires a URI": "Resolve has hacked cache on top of it that requires a URI",
|
||||
"Connection to API server failed": "Connection to API server failed",
|
||||
"Please select a file to upgrade from": "Please select a file to upgrade from",
|
||||
"Update available": "Update available",
|
||||
"Upgrade": "Upgrade",
|
||||
"Skip": "Skip",
|
||||
"Your version of LBRY is out of date and may be unreliable or insecure.": "Your version of LBRY is out of date and may be unreliable or insecure.",
|
||||
"Sorry, your download timed out :(": "Sorry, your download timed out :(",
|
||||
"Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it": "Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it",
|
||||
"Downloading stream... not long left now!": "Downloading stream... not long left now!",
|
||||
"this is the world's worst loading screen and we shipped our software with it anyway...": "this is the world's worst loading screen and we shipped our software with it anyway...",
|
||||
"Wallet Address": "Wallet Address",
|
||||
"Get New Address": "Get New Address",
|
||||
"Other LBRY users may send credits to you by entering this address on the \"Send\" page.": "Other LBRY users may send credits to you by entering this address on the \"Send\" page.",
|
||||
"You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.": "You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.",
|
||||
"Send Credits": "Send Credits",
|
||||
"Recipient Address": "Recipient Address",
|
||||
"Insufficient balance": "Insufficient balance",
|
||||
"Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.": "Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.",
|
||||
"Transaction successful": "Transaction successful",
|
||||
"Your transaction was successfully placed in the queue.": "Your transaction was successfully placed in the queue.",
|
||||
"Transaction failed": "Transaction failed",
|
||||
"Something went wrong": "Something went wrong",
|
||||
"Find movies, music, games, and more": "Find movies, music, games, and more"
|
||||
}
|
|
@ -17,13 +17,13 @@ class UpgradeModal extends React.Component {
|
|||
return (
|
||||
<Modal
|
||||
isOpen={true}
|
||||
contentLabel="Update available"
|
||||
contentLabel={__("Update available")}
|
||||
type="confirm"
|
||||
confirmButtonLabel="Upgrade"
|
||||
abortButtonLabel="Skip"
|
||||
confirmButtonLabel={__("Upgrade")}
|
||||
abortButtonLabel={__("Skip")}
|
||||
onConfirmed={downloadUpgrade}
|
||||
onAborted={skipUpgrade}>
|
||||
Your version of LBRY is out of date and may be unreliable or insecure.
|
||||
{__("Your version of LBRY is out of date and may be unreliable or insecure.")}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -51,20 +51,20 @@ class VideoPlayButton extends React.Component {
|
|||
icon="icon-play"
|
||||
onClick={this.onWatchClick.bind(this)} />
|
||||
{modal}
|
||||
<Modal contentLabel="Not enough credits" isOpen={modal == 'notEnoughCredits'} onConfirmed={() => { this.closeModal() }}>
|
||||
You don't have enough LBRY credits to pay for this stream.
|
||||
<Modal contentLabel={__("Not enough credits")} isOpen={modal == 'notEnoughCredits'} onConfirmed={() => { this.closeModal() }}>
|
||||
{__("You don't have enough LBRY credits to pay for this stream.")}
|
||||
</Modal>
|
||||
<Modal
|
||||
type="confirm"
|
||||
isOpen={modal == 'affirmPurchase'}
|
||||
contentLabel="Confirm Purchase"
|
||||
contentLabel={__("Confirm Purchase")}
|
||||
onConfirmed={this.onPurchaseConfirmed.bind(this)}
|
||||
onAborted={closeModal}>
|
||||
This will purchase <strong>{title}</strong> for <strong><FilePrice uri={uri} look="plain" /></strong> credits.
|
||||
{__("This will purchase")} <strong>{title}</strong> {__("for")} <strong><FilePrice uri={uri} look="plain" /></strong> {__("credits")}.
|
||||
</Modal>
|
||||
<Modal
|
||||
isOpen={modal == 'timedOut'} onConfirmed={() => { this.closeModal() }} contentLabel="Timed Out">
|
||||
Sorry, your download timed out :(
|
||||
{__("Sorry, your download timed out :(")}
|
||||
</Modal>
|
||||
</div>);
|
||||
}
|
||||
|
@ -100,16 +100,16 @@ class Video extends React.Component {
|
|||
let loadStatusMessage = ''
|
||||
|
||||
if (isLoading) {
|
||||
loadStatusMessage = "Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it"
|
||||
loadStatusMessage = __("Requesting stream... it may sit here for like 15-20 seconds in a really awkward way... we're working on it")
|
||||
} else if (isDownloading) {
|
||||
loadStatusMessage = "Downloading stream... not long left now!"
|
||||
loadStatusMessage = __("Downloading stream... not long left now!")
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={"video " + this.props.className + (isPlaying ? " video--active" : " video--hidden")}>{
|
||||
isPlaying || isLoading ?
|
||||
(!isReadyToPlay ?
|
||||
<span>this is the world's worst loading screen and we shipped our software with it anyway... <br /><br />{loadStatusMessage}</span> :
|
||||
<span>{__("this is the world's worst loading screen and we shipped our software with it anyway...")} <br /><br />{loadStatusMessage}</span> :
|
||||
<VideoPlayer poster={metadata.thumbnail} autoplay={isPlaying} downloadPath={fileInfo.download_path} />) :
|
||||
<div className="video__cover" style={{backgroundImage: 'url("' + metadata.thumbnail + '")'}}>
|
||||
<VideoPlayButton startPlaying={this.startPlaying.bind(this)} {...this.props} />
|
||||
|
|
|
@ -19,18 +19,18 @@ class WalletAddress extends React.Component {
|
|||
return (
|
||||
<section className="card">
|
||||
<div className="card__title-primary">
|
||||
<h3>Wallet Address</h3>
|
||||
<h3>{__("Wallet Address")}</h3>
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<Address address={receiveAddress} />
|
||||
</div>
|
||||
<div className="card__actions">
|
||||
<Link label="Get New Address" button="primary" icon='icon-refresh' onClick={getNewAddress} disabled={gettingNewAddress} />
|
||||
<Link label={__("Get New Address")} button="primary" icon='icon-refresh' onClick={getNewAddress} disabled={gettingNewAddress} />
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<div className="help">
|
||||
<p>Other LBRY users may send credits to you by entering this address on the "Send" page.</p>
|
||||
<p>You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.</p>
|
||||
<p>{__("Other LBRY users may send credits to you by entering this address on the \"Send\" page.")}</p>
|
||||
<p>{__("You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.")}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -20,27 +20,27 @@ const WalletSend = (props) => {
|
|||
<section className="card">
|
||||
<form onSubmit={sendToAddress}>
|
||||
<div className="card__title-primary">
|
||||
<h3>Send Credits</h3>
|
||||
<h3>{__("Send Credits")}</h3>
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<FormRow label="Amount" postfix="LBC" step="0.01" type="number" placeholder="1.23" size="10" onChange={setAmount} value={amount} />
|
||||
<FormRow label={__("Amount")} postfix="LBC" step="0.01" type="number" placeholder="1.23" size="10" onChange={setAmount} value={amount} />
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<FormRow label="Recipient Address" placeholder="bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs" type="text" size="60" onChange={setAddress} value={address} />
|
||||
<FormRow label={__("Recipient Address")} placeholder="bbFxRyXXXXXXXXXXXZD8nE7XTLUxYnddTs" type="text" size="60" onChange={setAddress} value={address} />
|
||||
</div>
|
||||
<div className="card__actions card__actions--form-submit">
|
||||
<Link button="primary" label="Send" onClick={sendToAddress} disabled={!(parseFloat(amount) > 0.0) || !address} />
|
||||
<Link button="primary" label={_("Send")} onClick={sendToAddress} disabled={!(parseFloat(amount) > 0.0) || !address} />
|
||||
<input type='submit' className='hidden' />
|
||||
</div>
|
||||
</form>
|
||||
{modal == 'insufficientBalance' && <Modal isOpen={true} contentLabel="Insufficient balance" onConfirmed={closeModal}>
|
||||
Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.
|
||||
{modal == 'insufficientBalance' && <Modal isOpen={true} contentLabel={__("Insufficient balance")} onConfirmed={closeModal}>
|
||||
{__("Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.")}
|
||||
</Modal>}
|
||||
{modal == 'transactionSuccessful' && <Modal isOpen={true} contentLabel="Transaction successful" onConfirmed={closeModal}>
|
||||
Your transaction was successfully placed in the queue.
|
||||
{modal == 'transactionSuccessful' && <Modal isOpen={true} contentLabel={__("Transaction successful")} onConfirmed={closeModal}>
|
||||
{__("Your transaction was successfully placed in the queue.")}
|
||||
</Modal>}
|
||||
{modal == 'transactionFailed' && <Modal isOpen={true} contentLabel="Transaction failed" onConfirmed={closeModal}>
|
||||
Something went wrong:
|
||||
{modal == 'transactionFailed' && <Modal isOpen={true} contentLabel={__("Transaction failed")} onConfirmed={closeModal}>
|
||||
{__("Something went wrong")}:
|
||||
</Modal>}
|
||||
</section>
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ jsonrpc.call = function (connectionString, method, params, callback, errorCallba
|
|||
connectFailedCallback(e);
|
||||
});
|
||||
xhr.addEventListener('timeout', function() {
|
||||
connectFailedCallback(new Error('XMLHttpRequest connection timed out'));
|
||||
connectFailedCallback(new Error(__('XMLHttpRequest connection timed out')));
|
||||
})
|
||||
}
|
||||
xhr.addEventListener('load', function() {
|
||||
|
@ -50,7 +50,7 @@ jsonrpc.call = function (connectionString, method, params, callback, errorCallba
|
|||
method: method,
|
||||
params: params,
|
||||
code: xhr.status,
|
||||
message: 'Connection to API server failed'
|
||||
message: __('Connection to API server failed')
|
||||
}
|
||||
});
|
||||
document.dispatchEvent(errorEvent);
|
||||
|
|
|
@ -111,7 +111,7 @@ lbry.connect = function() {
|
|||
}, tryNum < 100 ? 200 : 1000);
|
||||
}
|
||||
else {
|
||||
reject(new Error("Unable to connect to LBRY"));
|
||||
reject(new Error(__("Unable to connect to LBRY")));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -422,7 +422,7 @@ lbry._resolveXhrs = {}
|
|||
lbry.resolve = function(params={}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!params.uri) {
|
||||
throw "Resolve has hacked cache on top of it that requires a URI"
|
||||
throw __("Resolve has hacked cache on top of it that requires a URI")
|
||||
}
|
||||
if (params.uri && lbry._claimCache[params.uri] !== undefined) {
|
||||
resolve(lbry._claimCache[params.uri]);
|
||||
|
|
|
@ -34,20 +34,20 @@ lbryio.getExchangeRates = function() {
|
|||
lbryio.call = function(resource, action, params={}, method='get', evenIfDisabled=false) { // evenIfDisabled is just for development, when we may have some calls working and some not
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!lbryio.enabled && !evenIfDisabled && (resource != 'discover' || action != 'list')) {
|
||||
console.log("Internal API disabled");
|
||||
reject(new Error("LBRY internal API is disabled"))
|
||||
console.log(__("Internal API disabled"));
|
||||
reject(new Error(__("LBRY internal API is disabled")))
|
||||
return
|
||||
}
|
||||
|
||||
const xhr = new XMLHttpRequest;
|
||||
|
||||
xhr.addEventListener('error', function (event) {
|
||||
reject(new Error("Something went wrong making an internal API call."));
|
||||
reject(new Error(__("Something went wrong making an internal API call.")));
|
||||
});
|
||||
|
||||
|
||||
xhr.addEventListener('timeout', function() {
|
||||
reject(new Error('XMLHttpRequest connection timed out'));
|
||||
reject(new Error(__('XMLHttpRequest connection timed out')));
|
||||
});
|
||||
|
||||
xhr.addEventListener('load', function() {
|
||||
|
@ -89,7 +89,7 @@ lbryio.call = function(resource, action, params={}, method='get', evenIfDisabled
|
|||
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
xhr.send(querystring.stringify(fullParams));
|
||||
} else {
|
||||
reject(new Error("Invalid method"));
|
||||
reject(new Error(__("Invalid method")));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -138,7 +138,7 @@ lbryio.authenticate = function() {
|
|||
app_id: installation_id,
|
||||
}, 'post').then(function(responseData) {
|
||||
if (!responseData.id) {
|
||||
reject(new Error("Received invalid authentication response."));
|
||||
reject(new Error(__("Received invalid authentication response.")));
|
||||
}
|
||||
lbryio.setAccessToken(installation_id)
|
||||
setCurrentUser()
|
||||
|
|
|
@ -39,12 +39,12 @@ lbryuri.parse = function(uri, requireProto=false) {
|
|||
|
||||
// Validate protocol
|
||||
if (requireProto && !proto) {
|
||||
throw new Error('LBRY URIs must include a protocol prefix (lbry://).');
|
||||
throw new Error(__('LBRY URIs must include a protocol prefix (lbry://).'));
|
||||
}
|
||||
|
||||
// Validate and process name
|
||||
if (!name) {
|
||||
throw new Error('URI does not include name.');
|
||||
throw new Error(__('URI does not include name.'));
|
||||
}
|
||||
|
||||
const isChannel = name.startsWith('@');
|
||||
|
@ -52,11 +52,11 @@ lbryuri.parse = function(uri, requireProto=false) {
|
|||
|
||||
if (isChannel) {
|
||||
if (!channelName) {
|
||||
throw new Error('No channel name after @.');
|
||||
throw new Error(__('No channel name after @.'));
|
||||
}
|
||||
|
||||
if (channelName.length < CHANNEL_NAME_MIN_LEN) {
|
||||
throw new Error(`Channel names must be at least ${CHANNEL_NAME_MIN_LEN} characters.`);
|
||||
throw new Error(__(`Channel names must be at least %s characters.`, CHANNEL_NAME_MIN_LEN));
|
||||
}
|
||||
|
||||
contentName = path;
|
||||
|
@ -64,14 +64,14 @@ lbryuri.parse = function(uri, requireProto=false) {
|
|||
|
||||
const nameBadChars = (channelName || name).match(/[^A-Za-z0-9-]/g);
|
||||
if (nameBadChars) {
|
||||
throw new Error(`Invalid character${nameBadChars.length == 1 ? '' : 's'} in name: ${nameBadChars.join(', ')}.`);
|
||||
throw new Error(__(`Invalid character %s in name: %s.`, nameBadChars.length == 1 ? '' : 's', nameBadChars.join(', ') ));
|
||||
}
|
||||
|
||||
// Validate and process modifier (claim ID, bid position or claim sequence)
|
||||
let claimId, claimSequence, bidPosition;
|
||||
if (modSep) {
|
||||
if (!modVal) {
|
||||
throw new Error(`No modifier provided after separator ${modSep}.`);
|
||||
throw new Error(__(`No modifier provided after separator %s.`, modSep));
|
||||
}
|
||||
|
||||
if (modSep == '#') {
|
||||
|
@ -84,31 +84,31 @@ lbryuri.parse = function(uri, requireProto=false) {
|
|||
}
|
||||
|
||||
if (claimId && (claimId.length > CLAIM_ID_MAX_LEN || !claimId.match(/^[0-9a-f]+$/))) {
|
||||
throw new Error(`Invalid claim ID ${claimId}.`);
|
||||
throw new Error(__(`Invalid claim ID %s.`, claimId));
|
||||
}
|
||||
|
||||
if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]*$/)) {
|
||||
throw new Error('Claim sequence must be a number.');
|
||||
throw new Error(__('Claim sequence must be a number.'));
|
||||
}
|
||||
|
||||
if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]*$/)) {
|
||||
throw new Error('Bid position must be a number.');
|
||||
throw new Error(__('Bid position must be a number.'));
|
||||
}
|
||||
|
||||
// Validate and process path
|
||||
if (path) {
|
||||
if (!isChannel) {
|
||||
throw new Error('Only channel URIs may have a path.');
|
||||
throw new Error(__('Only channel URIs may have a path.'));
|
||||
}
|
||||
|
||||
const pathBadChars = path.match(/[^A-Za-z0-9-]/g);
|
||||
if (pathBadChars) {
|
||||
throw new Error(`Invalid character${count == 1 ? '' : 's'} in path: ${nameBadChars.join(', ')}`);
|
||||
throw new Error(__(`Invalid character %s in path: %s`,count == 1 ? '' : 's',nameBadChars.join(', ')));
|
||||
}
|
||||
|
||||
contentName = path;
|
||||
} else if (pathSep) {
|
||||
throw new Error('No path provided after /');
|
||||
throw new Error(__('No path provided after /'));
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -135,7 +135,7 @@ lbryuri.build = function(uriObj, includeProto=true, allowExtraProps=false) {
|
|||
if (!name) {
|
||||
name = channelNameFormatted;
|
||||
} else if (name !== channelNameFormatted) {
|
||||
throw new Error('Received a channel content URI, but name and channelName do not match. "name" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.');
|
||||
throw new Error(__('Received a channel content URI, but name and channelName do not match. \"name\" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ lbryuri.build = function(uriObj, includeProto=true, allowExtraProps=false) {
|
|||
path = contentName;
|
||||
}
|
||||
if (path && path !== contentName) {
|
||||
throw new Error('path and contentName do not match. Only one is required; most likely you wanted contentName.');
|
||||
throw new Error(__('Path and contentName do not match. Only one is required; most likely you wanted contentName.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ function getServers() {
|
|||
|
||||
function call(method, params, callback, errorCallback) {
|
||||
if (connectTryNum >= maxQueryTries) {
|
||||
errorCallback(new Error(`Could not connect to Lighthouse server. Last server attempted: ${server}`));
|
||||
errorCallback(new Error(__(`Could not connect to Lighthouse server. Last server attempted: %s`, server)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class DeveloperPage extends React.Component {
|
|||
handleForceUpgradeClick() {
|
||||
let upgradeSent = false;
|
||||
if (!this.state.upgradePath) {
|
||||
alert('Please select a file to upgrade from');
|
||||
alert(__('Please select a file to upgrade from'));
|
||||
} else {
|
||||
try {
|
||||
const stats = fs.lstatSync(this.state.upgradePath);
|
||||
|
|
|
@ -24,7 +24,7 @@ export class RewardTile extends React.Component {
|
|||
</div>
|
||||
<div className="card__actions">
|
||||
{this.props.claimed
|
||||
? <span><Icon icon="icon-check" /> Reward claimed.</span>
|
||||
? <span><Icon icon="icon-check" /> {__("Reward claimed.")}</span>
|
||||
: <RewardLink {...this.props} />}
|
||||
</div>
|
||||
<div className="card__content">{this.props.description}</div>
|
||||
|
@ -64,9 +64,9 @@ export class RewardsPage extends React.Component {
|
|||
<SubHeader />
|
||||
<div>
|
||||
{!this.state.userRewards
|
||||
? (this.state.failed ? <div className="empty">Failed to load rewards.</div> : '')
|
||||
? (this.state.failed ? <div className="empty">{__("Failed to load rewards.")}</div> : '')
|
||||
: this.state.userRewards.map(({reward_type, reward_title, reward_description, transaction_id, reward_amount}) => {
|
||||
return <RewardTile key={reward_type} onRewardClaim={this.loadRewards} type={reward_type} title={reward_title} description={reward_description} claimed={!!transaction_id} value={reward_amount} />;
|
||||
return <RewardTile key={reward_type} onRewardClaim={this.loadRewards} type={reward_type} title={__(reward_title)} description={__(reward_description)} claimed={!!transaction_id} value={reward_amount} />;
|
||||
})}
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -7,13 +7,13 @@ import {
|
|||
|
||||
function rewardMessage(type, amount) {
|
||||
return {
|
||||
new_developer: `You earned ${amount} for registering as a new developer.`,
|
||||
new_user: `You earned ${amount} LBC new user reward.`,
|
||||
confirm_email: `You earned ${amount} LBC for verifying your email address.`,
|
||||
new_channel: `You earned ${amount} LBC for creating a publisher identity.`,
|
||||
first_stream: `You earned ${amount} LBC for streaming your first video.`,
|
||||
many_downloads: `You earned ${amount} LBC for downloading some of the things.`,
|
||||
first_publish: `You earned ${amount} LBC for making your first publication.`,
|
||||
new_developer: __(`You earned %s for registering as a new developer.`, amount),
|
||||
new_user: __(`You earned %s LBC new user reward.`, amount),
|
||||
confirm_email: __(`You earned %s LBC for verifying your email address.`, amount),
|
||||
new_channel: __(`You earned %s LBC for creating a publisher identity.`, amount),
|
||||
first_stream: __(`You earned %s LBC for streaming your first video.`, amount),
|
||||
many_downloads: __(`You earned %s LBC for downloading some of the things.`, amount),
|
||||
first_publish: __(`You earned %s LBC for making your first publication.`, amount),
|
||||
}[type];
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ rewards.claimReward = function (type) {
|
|||
|
||||
function requestReward(resolve, reject, params) {
|
||||
if (!lbryio.enabled) {
|
||||
reject(new Error("Rewards are not enabled."))
|
||||
reject(new Error(__("Rewards are not enabled.")))
|
||||
return;
|
||||
}
|
||||
lbryio.call('reward', 'new', params, 'post').then(({reward_amount}) => {
|
||||
|
@ -96,7 +96,7 @@ rewards.claimReward = function (type) {
|
|||
// Display global notice
|
||||
const action = doShowSnackBar({
|
||||
message,
|
||||
linkText: "Show All",
|
||||
linkText: __("Show All"),
|
||||
linkTarget: "/rewards",
|
||||
isError: false,
|
||||
})
|
||||
|
@ -125,7 +125,7 @@ rewards.claimReward = function (type) {
|
|||
params.transaction_id = claim.txid;
|
||||
requestReward(resolve, reject, params)
|
||||
} else {
|
||||
reject(new Error("Please create a channel identity first."))
|
||||
reject(new Error(__("Please create a channel identity first.")))
|
||||
}
|
||||
}).catch(reject)
|
||||
break;
|
||||
|
@ -140,8 +140,8 @@ rewards.claimReward = function (type) {
|
|||
requestReward(resolve, reject, params)
|
||||
} else {
|
||||
reject(claims.length ?
|
||||
new Error("Please publish something and wait for confirmation by the network to claim this reward.") :
|
||||
new Error("Please publish something to claim this reward."))
|
||||
new Error(__("Please publish something and wait for confirmation by the network to claim this reward.")) :
|
||||
new Error(__("Please publish something to claim this reward.")))
|
||||
}
|
||||
}).catch(reject)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue