Merge remote-tracking branch 'origin/i18n' into i18n

This commit is contained in:
Mayesters 2017-05-28 18:42:36 +02:00
commit 449ef335a5
12 changed files with 381 additions and 28 deletions

View file

@ -305,5 +305,7 @@
"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"
}
"Find movies, music, games, and more": "Find movies, music, games, and more",
"Wallet": "Wallet",
"Looking up version info": "Looking up version info"
}

311
app/locales/rs.json Normal file
View file

@ -0,0 +1,311 @@
{
"Edit": "RS_Edit",
"Help": "RS_Help",
"Developer": "RS_Developer",
"Reload": "RS_Reload",
"Toggle Developer Tools": "RS_Toggle Developer Tools",
"Inspect Element": "RS_Inspect Element",
"connectionString": "RS_connectionString",
"Method": "RS_Method",
"Parameters": "RS_Parameters",
"Error code": "RS_Error code",
"Error message": "RS_Error message",
"Error data": "RS_Error data",
"Home": "RS_Home",
"Publish": "RS_Publish",
"This LBC remains yours and the deposit can be undone at any time.": "RS_This LBC remains yours and the deposit can be undone at any time.",
"Content": "RS_Content",
"What are you publishing?": "RS_What are you publishing?",
"Access": "RS_Access",
"Select a URL for this publish.": "RS_Select a URL for this publish.",
"How much does this content cost?": "RS_How much does this content cost?",
"Price": "RS_Price",
"Free": "RS_Free",
"Choose price...": "RS_Choose price...",
"US Dollars": "RS_US Dollars",
"LBRY credits": "RS_LBRY credits",
"Public Domain": "RS_Public Domain",
"Creative Commons Attribution 4.0 International": "RS_Creative Commons Attribution 4.0 International",
"Creative Commons Attribution-ShareAlike 4.0 International": "RS_Creative Commons Attribution-ShareAlike 4.0 International",
"Creative Commons Attribution-NoDerivatives 4.0 International": "RS_Creative Commons Attribution-NoDerivatives 4.0 International",
"Creative Commons Attribution-NonCommercial 4.0 International": "RS_Creative Commons Attribution-NonCommercial 4.0 International",
"Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International": "RS_Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International",
"Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International": "RS_Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International",
"Copyrighted...": "RS_Copyrighted...",
"Other...": "RS_Other...",
"Identity": "RS_Identity",
"Who created this content?": "RS_Who created this content?",
"Anonymous": "RS_Anonymous",
"New identity...": "RS_New identity...",
"Address": "RS_Address",
"Where should this content permanently reside?": "RS_Where should this content permanently reside?",
"Read more": "RS_Read more",
"Terms of Service": "RS_Terms of Service",
"Deposit": "RS_Deposit",
"This URL is unused.": "RS_This URL is unused.",
"LBRY names must contain only letters, numbers and dashes.": "RS_LBRY names must contain only letters, numbers and dashes.",
"Title": "RS_Title",
"Thumbnail URL": "RS_Thumbnail URL",
"Description": "RS_Description",
"Description of your content": "RS_Description of your content",
"Language": "RS_Language",
"English": "RS_English",
"Chinese": "RS_Chinese",
"French": "RS_French",
"German": "RS_German",
"Japanese": "RS_Japanese",
"Russian": "RS_Russian",
"Spanish": "RS_Spanish",
"Maturity": "RS_Maturity",
"All Ages": "RS_All Ages",
"Adults Only": "RS_Adults Only",
"Cancel": "RS_Cancel",
"File published": "RS_File published",
"I agree to the": "RS_I agree to the",
"LBRY terms of service": "RS_LBRY terms of service",
"Your file has been published to LBRY at the address": "RS_Your file has been published to LBRY at the address",
"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.": "RS_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.",
"Error publishing file": "RS_Error publishing file",
"The following error occurred when attempting to publish your file": "RS_The following error occurred when attempting to publish your file",
"A deposit of at least \"%s\" credit is required to win \"%s\". However, you can still get a permanent URL for any amount.": {
"one": "RS_A deposit of at least \"%s\" credit is required to win \"%s\". However, you can still get a permanent URL for any amount.",
"other": "RS_A deposit of at least \"%s\" credits is required to win \"%s\". However, you can still get a permanent URL for any amount."
},
"Connecting": "RS_Connecting",
"Discover": "RS_Discover",
"Fetching content": "RS_Fetching content",
"What's this?": "RS_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!": "RS_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": "RS_LBRY is Closed",
"Click here to start LBRY": "RS_Click here to start LBRY",
"Failed to load landing content.": "RS_Failed to load landing content.",
"Settings": "RS_Settings",
"Welcome to LBRY": "RS_Welcome to LBRY",
"Downloads & Purchases": "RS_Downloads & Purchases",
"Downloaded": "RS_Downloaded",
"Published": "RS_Published",
"Publishes": "RS_Publishes",
"Overview": "RS_Overview",
"Send": "RS_Send",
"Receive": "RS_Receive",
"Rewards": "RS_Rewards",
"Search results for %s": "RS_Search results for %s",
"Search": "RS_Search",
"Your email is still not verified.": "RS_Your email is still not verified.",
"Next": "RS_Next",
"Email": "RS_Email",
"Verification Code": "RS_Verification Code",
"A verification code is required to access this version.": "RS_A verification code is required to access this version.",
"Verify": "RS_Verify",
"No code?": "RS_No code?",
"Click here": "RS_Click here",
"Authentication": "RS_Authentication",
"LBRY Early Access": "RS_LBRY Early Access",
"Preparing for first access": "RS_Preparing for first access",
"Welcome to LBRY.": "RS_Welcome to LBRY.",
"Using LBRY is like dating a centaur. Totally normal up top, and <em>way different</em> underneath.": "RS_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.": "RS_Up top, LBRY is similar to popular media sites.",
"Below, LBRY is controlled by users -- you -- via blockchain and decentralization.": "RS_Below, LBRY is controlled by users -- you -- via blockchain and decentralization.",
"Thank you for making content freedom possible! Here's a nickel, kid.": "RS_Thank you for making content freedom possible! Here's a nickel, kid.",
"Developer Settings": "RS_Developer Settings",
"Show developer menu": "RS_Show developer menu",
"Use custom search servers": "RS_Use custom search servers",
"Custom search servers (one per line)": "RS_Custom search servers (one per line)",
"Force Upgrade": "RS_Force Upgrade",
"OK": "RS_OK",
"Show More...": "RS_Show More...",
"Show Less": "RS_Show Less",
"Starting daemon": "RS_Starting daemon",
"Waiting for name resolution": "RS_Waiting for name resolution",
"Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.": "RS_Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.",
"Claim Reward": "RS_Claim Reward",
"Claiming...": "RS_Claiming...",
"This is an estimate and does not include data fees": "RS_This is an estimate and does not include data fees",
"free": "RS_free",
"Reward Claim Error": "RS_Reward Claim Error",
"This field is required": "RS_This field is required",
"Choose File": "RS_Choose File",
"No File Chosen": "RS_No File Chosen",
"Choose Directory": "RS_Choose Directory",
"Downloading Update": "RS_Downloading Update",
"Click \"Begin Upgrade\" to start the upgrade process.": "RS_Click \"Begin Upgrade\" to start the upgrade process.",
"The app will close, and you will be prompted to install the latest version of LBRY.": "RS_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.": "RS_After the install is complete, please reopen the app.",
"Begin Upgrade": "RS_Begin Upgrade",
"API connection string": "RS_API connection string",
"We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.": "RS_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": "RS_You haven't downloaded anything from LBRY yet. Go",
"search for your first download": "RS_search for your first download",
"Loading": "RS_Loading",
" credits": "RS_ credits",
"It looks like you haven't published anything to LBRY yet. Go": "RS_It looks like you haven't published anything to LBRY yet. Go",
"share your beautiful cats with the world": "RS_share your beautiful cats with the world",
"report": "RS_report",
"Content-Type": "RS_Content-Type",
"Author": "RS_Author",
"License": "RS_License",
"Read the FAQ": "RS_Read the FAQ",
"Our FAQ answers many common questions.": "RS_Our FAQ answers many common questions.",
"Get Live Help": "RS_Get Live Help",
"Live help is available most hours in the": "RS_Live help is available most hours in the",
"channel of our Slack chat room.": "RS_channel of our Slack chat room.",
"Join Our Slack": "RS_Join Our Slack",
"Report a Bug": "RS_Report a Bug",
"Did you find something wrong?": "RS_Did you find something wrong?",
"Submit a Bug Report": "RS_Submit a Bug Report",
"Thanks! LBRY is made by its users.": "RS_Thanks! LBRY is made by its users.",
"Report": "RS_Report",
"About": "RS_About",
"A newer version of LBRY is available.": "RS_A newer version of LBRY is available.",
"Download LBRY %s now!": "RS_Download LBRY %s now!",
"Your copy of LBRY is up to date.": "RS_Your copy of LBRY is up to date.",
"daemon (lbrynet)": "RS_daemon (lbrynet)",
"wallet (lbryum)": "RS_wallet (lbryum)",
"interface": "RS_interface",
"Platform": "RS_Platform",
"Installation ID": "RS_Installation ID",
"Search Results for": "RS_Search Results for",
"These search results are provided by LBRY, Inc.": "RS_These search results are provided by LBRY, Inc.",
"Exact URL": "RS_Exact URL",
"This is the resolution of a LBRY URL and not controlled by LBRY Inc.": "RS_This is the resolution of a LBRY URL and not controlled by LBRY Inc.",
"Download Directory": "RS_Download Directory",
"LBRY downloads will be saved here.": "RS_LBRY downloads will be saved here.",
"Bandwidth Limits": "RS_Bandwidth Limits",
"Max Upload": "RS_Max Upload",
"Unlimited": "RS_Unlimited",
"Up to": "RS_Up to",
"Max Download": "RS_Max Download",
"Show unavailable content in search results": "RS_Show unavailable content in search results",
"Show NSFW content": "RS_Show NSFW content",
"NSFW content may include nudity, intense sexuality, profanity, or other adult content. By displaying NSFW content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ": "RS_NSFW content may include nudity, intense sexuality, profanity, or other adult content. By displaying NSFW content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ",
"Share Diagnostic Data": "RS_Share Diagnostic Data",
"Help make LBRY better by contributing diagnostic data about my usage": "RS_Help make LBRY better by contributing diagnostic data about my usage",
"Choose limit...": "RS_Choose limit...",
"Loading magic decentralized data...": "RS_Loading magic decentralized data...",
"There's nothing at this location.": "RS_There's nothing at this location.",
"Report an Issue": "RS_Report an Issue",
"Please describe the problem you experienced and any information you think might be useful to us. Links to screenshots are great!": "RS_Please describe the problem you experienced and any information you think might be useful to us. Links to screenshots are great!",
"Description of your issue": "RS_Description of your issue",
"Submit Report": "RS_Submit Report",
"Developer?": "RS_Developer?",
"You can also": "RS_You can also",
"submit an issue on GitHub": "RS_submit an issue on GitHub",
"Bug report submitted": "RS_Bug report submitted",
"Your bug report has been submitted! Thank you for your feedback.": "RS_Your bug report has been submitted! Thank you for your feedback.",
"Balance": "RS_Balance",
"Open in Folder": "RS_Open in Folder",
"Checking availability": "RS_Checking availability",
"Confirm Purchase": "RS_Confirm Purchase",
"This will purchase": "RS_This will purchase",
"for": "RS_for",
"credits": "RS_credits",
"Not enough credits": "RS_Not enough credits",
"You don't have enough LBRY credits to pay for this stream.": "RS_You don't have enough LBRY credits to pay for this stream.",
"Download failed": "RS_Download failed",
"LBRY was unable to download the stream": "RS_LBRY was unable to download the stream",
"Remove": "RS_Remove",
"Are you sure you'd like to remove": "RS_Are you sure you'd like to remove",
"from LBRY?": "RS_from LBRY?",
"Delete this file from my computer": "RS_Delete this file from my computer",
"Download": "RS_Download",
"Content unavailable.": "RS_Content unavailable.",
"Why?": "RS_Why?",
"The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment.": "RS_The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment.",
"Try Anyway": "RS_Try Anyway",
"Open": "RS_Open",
"Remove...": "RS_Remove...",
"% complete": "RS_% complete",
"Loading...": "RS_Loading...",
"Empty claim or metadata info.": "RS_Empty claim or metadata info.",
"This content is Not Safe For Work. To view adult content, please change your": "RS_This content is Not Safe For Work. To view adult content, please change your",
"This address contains no content.": "RS_This address contains no content.",
"Sort by": "RS_Sort by",
"Date": "RS_Date",
"File name": "RS_File name",
"Looking up the Dewey Decimals": "RS_Looking up the Dewey Decimals",
"No one has checked anything in for %s yet.": "RS_No one has checked anything in for %s yet.",
"Be the first": "RS_Be the first",
"Refreshing the Dewey Decimals": "RS_Refreshing the Dewey Decimals",
"This location is unused.": "RS_This location is unused.",
"Put something here!": "RS_Put something here!",
"Transaction History": "RS_Transaction History",
"You have no transactions.": "RS_You have no transactions.",
"Loading transactions": "RS_Loading transactions",
"Amount": "RS_Amount",
"Time": "RS_Time",
"Transaction": "RS_Transaction",
"You earned %s for registering as a new developer.": "RS_You earned %s for registering as a new developer.",
"You earned %s LBC new user reward.": "RS_You earned %s LBC new user reward.",
"You earned %s LBC for verifying your email address.": "RS_You earned %s LBC for verifying your email address.",
"You earned %s LBC for creating a publisher identity.": "RS_You earned %s LBC for creating a publisher identity.",
"You earned %s LBC for streaming your first video.": "RS_You earned %s LBC for streaming your first video.",
"You earned %s LBC for downloading some of the things.": "RS_You earned %s LBC for downloading some of the things.",
"You earned %s LBC for making your first publication.": "RS_You earned %s LBC for making your first publication.",
"Your First Nickel": "RS_Your First Nickel",
"First Publish": "RS_First Publish",
"We're Going Streaming": "RS_We're Going Streaming",
"Channel Surfing": "RS_Channel Surfing",
"Many Views": "RS_Many Views",
"Hot Right Now": "RS_Hot Right Now",
"A welcome bonus for being at the vanguard of content freedom.": "RS_A welcome bonus for being at the vanguard of content freedom.",
"The first view is on us.": "RS_The first view is on us.",
"Up the quad, and to the gymanasium. Press play. Everybody's doing it.": "RS_Up the quad, and to the gymanasium. Press play. Everybody's doing it.",
"Claim your channel! Create an identity used to securely publish content.": "RS_Claim your channel! Create an identity used to securely publish content.",
"Watch a bunch of stuff... who knows how much?": "RS_Watch a bunch of stuff... who knows how much?",
"Watch the latest featured content.": "RS_Watch the latest featured content.",
"Rewards are not enabled.": "RS_Rewards are not enabled.",
"Failed to load rewards.": "RS_Failed to load rewards.",
"Reward claimed.": "RS_Reward claimed.",
"Show All": "RS_Show All",
"Please create a channel identity first.": "RS_Please create a channel identity first.",
"Please publish something and wait for confirmation by the network to claim this reward.": "RS_Please publish something and wait for confirmation by the network to claim this reward.",
"Please publish something to claim this reward.": "RS_Please publish something to claim this reward.",
"Could not connect to Lighthouse server. Last server attempted: %s": "RS_Could not connect to Lighthouse server. Last server attempted: %s",
"LBRY URIs must include a protocol prefix (lbry://).": "RS_LBRY URIs must include a protocol prefix (lbry://).",
"URI does not include name.": "RS_URI does not include name.",
"No channel name after @.": "RS_No channel name after @.",
"Channel names must be at least %s characters.": "RS_Channel names must be at least %s characters.",
"Invalid character %s in name: %s.": "RS_Invalid character %s in name: %s.",
"No modifier provided after separator %s.": "RS_No modifier provided after separator %s.",
"Invalid claim ID %s.": "RS_Invalid claim ID %s.",
"Claim sequence must be a number.": "RS_Claim sequence must be a number.",
"Bid position must be a number.": "RS_Bid position must be a number.",
"Only channel URIs may have a path.": "RS_Only channel URIs may have a path.",
"Invalid character %s in path: %s": "RS_Invalid character %s in path: %s",
"No path provided after /": "RS_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.": "RS_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.": "RS_Path and contentName do not match. Only one is required; most likely you wanted contentName.",
"Internal API disabled": "RS_Internal API disabled",
"LBRY internal API is disabled": "RS_LBRY internal API is disabled",
"Something went wrong making an internal API call.": "RS_Something went wrong making an internal API call.",
"XMLHttpRequest connection timed out": "RS_XMLHttpRequest connection timed out",
"Invalid method": "RS_Invalid method",
"Received invalid authentication response.": "RS_Received invalid authentication response.",
"Unable to connect to LBRY": "RS_Unable to connect to LBRY",
"Resolve has hacked cache on top of it that requires a URI": "RS_Resolve has hacked cache on top of it that requires a URI",
"Connection to API server failed": "RS_Connection to API server failed",
"Please select a file to upgrade from": "RS_Please select a file to upgrade from",
"Update available": "RS_Update available",
"Upgrade": "RS_Upgrade",
"Skip": "RS_Skip",
"Your version of LBRY is out of date and may be unreliable or insecure.": "RS_Your version of LBRY is out of date and may be unreliable or insecure.",
"Sorry, your download timed out :(": "RS_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": "RS_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!": "RS_Downloading stream... not long left now!",
"this is the world's worst loading screen and we shipped our software with it anyway...": "RS_this is the world's worst loading screen and we shipped our software with it anyway...",
"Wallet Address": "RS_Wallet Address",
"Get New Address": "RS_Get New Address",
"Other LBRY users may send credits to you by entering this address on the \"Send\" page.": "RS_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.": "RS_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": "RS_Send Credits",
"Recipient Address": "RS_Recipient Address",
"Insufficient balance": "RS_Insufficient balance",
"Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.": "RS_Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.",
"Transaction successful": "RS_Transaction successful",
"Your transaction was successfully placed in the queue.": "RS_Your transaction was successfully placed in the queue.",
"Transaction failed": "RS_Transaction failed",
"Something went wrong": "RS_Something went wrong",
"Find movies, music, games, and more": "RS_Find movies, music, games, and more",
"Wallet": "RS_Wallet",
"Looking up version info": "RS_Looking up version info"
}

View file

@ -214,22 +214,16 @@ export function doPurchaseUri(uri) {
const state = getState()
const balance = selectBalance(state)
const fileInfo = selectFileInfoForUri(state, { uri })
const costInfo = selectCostInfoForUri(state, { uri })
const downloadingByUri = selectUrisDownloading(state)
const alreadyDownloading = !!downloadingByUri[uri]
const { cost } = costInfo
// BUG if you delete a file from the file system system you're going to be
// asked to pay for it again. We need to check if the file is in the blobs
// here and then dispatch doLoadVideo() which will reconstruct it again from
// the blobs. Or perhaps there's another way to see if a file was already
// purchased?
// we already fully downloaded the file.
if (fileInfo && fileInfo.completed) {
// If written_bytes is false that means the user has deleted/moved the
// file manually on their file system, so we need to dispatch a
// doLoadVideo action to reconstruct the file from the blobs
if (!fileInfo.written_bytes) dispatch(doLoadVideo(uri))
// we already fully downloaded the file. If completed is true but
// writtenBytes is false then we downloaded it before but deleted it again,
// which means it needs to be reconstructed from the blobs by dispatching
// doLoadVideo.
if (fileInfo && fileInfo.completed && !!fileInfo.writtenBytes) {
return Promise.resolve()
}
@ -238,6 +232,9 @@ export function doPurchaseUri(uri) {
return Promise.resolve()
}
const costInfo = selectCostInfoForUri(state, { uri })
const { cost } = costInfo
// the file is free or we have partially downloaded it
if (cost <= 0.01 || (fileInfo && fileInfo.download_directory)) {
dispatch(doLoadVideo(uri))

View file

@ -20,7 +20,7 @@ class App extends React.Component {
lbry.balanceSubscribe((balance) => {
this.props.updateBalance(balance)
})
}
}y
render() {
const {

View file

@ -13,7 +13,8 @@ import {
import Header from './view'
const select = (state) => ({
balance: lbry.formatCredits(selectBalance(state), 1)
balance: lbry.formatCredits(selectBalance(state), 1),
publish: __("Publish"),
})
const perform = (dispatch) => ({

View file

@ -6,7 +6,8 @@ export const Header = (props) => {
const {
balance,
back,
navigate
navigate,
publish,
} = props
return <header id="header">
@ -17,13 +18,13 @@ export const Header = (props) => {
<Link onClick={() => navigate('/discover')} button="alt button--flat" icon="icon-home" />
</div>
<div className="header__item header__item--wunderbar">
<WunderBar/>
<WunderBar />
</div>
<div className="header__item">
<Link onClick={() => navigate('/wallet')} button="text" icon="icon-bank" label={balance} ></Link>
</div>
<div className="header__item">
<Link onClick={() => navigate('/publish')} button="primary button--flat" icon="icon-upload" label={__("Publish")} />
<Link onClick={() => navigate('/publish')} button="primary button--flat" icon="icon-upload" label={publish} />
</div>
<div className="header__item">
<Link onClick={() => navigate('/downloaded')} button="alt button--flat" icon="icon-folder" />

View file

@ -43,9 +43,11 @@ class VideoPlayButton extends React.Component {
}
*/
const disabled = isLoading || fileInfo === undefined || (fileInfo === null && (!costInfo || costInfo.cost === undefined))
return (<div>
<Link button={ button ? button : null }
disabled={isLoading || fileInfo === undefined || (fileInfo === null && (!costInfo || costInfo.cost === undefined))}
disabled={disabled}
label={label ? label : ""}
className="video__play-button"
icon="icon-play"

View file

@ -18,6 +18,7 @@ let lbry = {
useCustomLighthouseServers: false,
customLighthouseServers: [],
showDeveloperMenu: false,
language: 'en',
}
};

View file

@ -3,9 +3,10 @@ import ReactDOM from 'react-dom';
import lbry from './lbry.js';
import lbryio from './lbryio.js';
const i18n = require('y18n')({directory: 'app/locales'});
const i18n = require('y18n')({directory: 'app/locales'/*, locale: lbry.getClientSetting('language')*/});
window.__ = i18n.__;
window.__n = i18n.__n;
window.i18n = i18n;
import lighthouse from './lighthouse.js';
import App from 'component/app/index.js';

View file

@ -93,14 +93,15 @@ class HelpPage extends React.Component {
<div className="meta">{__("Thanks! LBRY is made by its users.")}</div>
</div>
</section>
<section className="card">
{!ver ? null :
<section className="card">
<div className="card__title-primary"><h3>{__("About")}</h3></div>
<div className="card__content">
<div className="card__content">
{this.state.appVersionInfo ?
(ver.lbrynet_update_available || ver.lbryum_update_available ?
(ver.lbrynet_update_available || ver.lbryum_update_available ?
<p>{__("A newer version of LBRY is available.")} <Link href={newVerLink} label={__("Download LBRY %s now!"), ver.remote_lbrynet} /></p>
: <p>{__("Your copy of LBRY is up to date.")}</p>) : null}
{ ver ?
{ ver ?
<table className="table-standard">
<tbody>
<tr>
@ -125,10 +126,11 @@ class HelpPage extends React.Component {
</tr>
</tbody>
</table> :
<BusyMessage message="Looking up version info" />
<BusyMessage message={__("Looking up version info")} />
}
</div>
</section>
}
</main>
);
}

View file

@ -3,10 +3,11 @@ import {FormField, FormRow} from 'component/form.js';
import SubHeader from 'component/subHeader'
import lbry from 'lbry.js';
class SettingsPage extends React.Component {
constructor(props) {
super(props);
const daemonSettings = this.props.daemonSettings
this.state = {
@ -14,6 +15,7 @@ class SettingsPage extends React.Component {
isMaxDownload: daemonSettings && daemonSettings.max_download != 0,
showNsfw: lbry.getClientSetting('showNsfw'),
showUnavailable: lbry.getClientSetting('showUnavailable'),
language: lbry.getClientSetting('language'),
}
}
@ -68,6 +70,12 @@ class SettingsPage extends React.Component {
lbry.setClientSetting('showNsfw', event.target.checked);
}
onLanguageChange(language) {
lbry.setClientSetting('language', language);
i18n.setLocale(language);
this.setState({language: language})
}
onShowUnavailableChange(event) {
}
@ -185,6 +193,30 @@ class SettingsPage extends React.Component {
helper={__("NSFW content may include nudity, intense sexuality, profanity, or other adult content. By displaying NSFW content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ")} />
</div>
</section>
<section className="card">
<div className="card__content">
<h3>{__("Language")}</h3>
</div>
<div className="card__content">
<div className="form-row">
<FormField type="radio"
name="language"
label={__("English")}
onChange={() => { this.onLanguageChange('en') }}
defaultChecked={this.state.language=='en'} />
</div>
<div className="form-row">
<FormField type="radio"
name="language"
label="Serbian"
onChange={() => { this.onLanguageChange('rs') }}
defaultChecked={this.state.language=='rs'} />
</div>
</div>
</section>
<section className="card">
<div className="card__content">
<h3>{__("Share Diagnostic Data")}</h3>

View file

@ -47,10 +47,13 @@ export const selectPageTitle = createSelector(
case 'report':
return __('Report')
case 'wallet':
return __("Wallet")
case 'send':
return __("Send")
case 'receive':
return __("Receive")
case 'rewards':
return page.charAt(0).toUpperCase() + page.slice(1)
return __("Rewards")
case 'show':
return lbryuri.normalize(params.uri)
case 'downloaded':