extremely basic i18n

This commit is contained in:
Jeremy Kauffman 2016-06-01 12:15:35 -04:00
parent 60029089d9
commit 56a00c8c63
19 changed files with 107 additions and 403 deletions

View file

@ -24,7 +24,7 @@ class Autoloader
public static function reload($reload = false) public static function reload($reload = false)
{ {
$key = 'lbry-classes-4'; $key = 'lbry-classes-5';
if (ini_get('apc.enabled') && !$reload) if (ini_get('apc.enabled') && !$reload)
{ {
$classes = apc_fetch($key, $success); $classes = apc_fetch($key, $success);

View file

@ -49,6 +49,10 @@ class Controller
return ContentActions::executeHome(); return ContentActions::executeHome();
case '/fund': case '/fund':
return CreditActions::executeFund(); return CreditActions::executeFund();
case '/fund-after':
return ['fund/fund-after'];
case '/goals':
return ['fund/goals'];
case '/get': case '/get':
case '/windows': case '/windows':
case '/ios': case '/ios':

View file

@ -15,7 +15,7 @@ class ContentActions extends Actions
public static function executeHome() public static function executeHome()
{ {
return ['page/home', [ return ['content/home', [
'totalUSD' => CreditApi::getTotalDollarSales(), 'totalUSD' => CreditApi::getTotalDollarSales(),
'totalPeople' => CreditApi::getTotalPeople() 'totalPeople' => CreditApi::getTotalPeople()
]]; ]];

8
data/i18n/en.yaml Normal file
View file

@ -0,0 +1,8 @@
global:
tagline: Play, Share, Earn.
sentence: Watch, read and play in a decentralized digital library controlled by the community.
email:
disclaimer: You will receive 1-2 messages a month, only from LBRY, Inc. and only about LBRY. You can easily unsubscribe at any time.
download:
main:
title: LBRY for %os%

5
data/i18n/pt.yaml Normal file
View file

@ -0,0 +1,5 @@
tagline: Play, Compartilhar, ganhem.
sentence: Assistir, ler e jogar em uma biblioteca digital descentralizada controlado pela comunidade.
download:
main:
title: LBRY para %os%

View file

@ -5,7 +5,7 @@
*/ */
function __($msg, $args = []) function __($msg, $args = [])
{ {
return strtr($msg, $args); return strtr(i18n::translate($msg), $args);
} }
/** /**
@ -15,9 +15,43 @@ function __($msg, $args = [])
*/ */
class i18n class i18n
{ {
public static function register() /*needed to trigger class include, presumably setup would happen here*/ protected static
$language = null,
$translations = [],
$country = null;
public static function register($culture = null) /*needed to trigger class include, presumably setup would happen here*/
{ {
setlocale(LC_MONETARY, 'en_US.UTF-8'); if ($culture === null)
{
$urlTokens = $_SERVER['HTTP_HOST'] ? explode('.', $_SERVER['HTTP_HOST']) : [];
$code = $urlTokens ? reset($urlTokens) : 'en';
switch($code)
{
case 'pt':
$culture = 'pt_PT'; break;
case 'en':
case 'www':
default:
$culture = 'en_US';
}
}
list($language, $country) = explode('_', $culture);
static::$language = $language;
static::$country = $country;
setlocale(LC_MONETARY, $culture . '.UTF-8');
}
public static function getLanguage()
{
return static::$language;
}
public static function getCountry()
{
return static::$country;
} }
public static function formatCurrency($amount, $currency = 'USD') public static function formatCurrency($amount, $currency = 'USD')
@ -29,4 +63,31 @@ class i18n
{ {
return '<span class="formatted-credits">' . number_format($amount, 1) . ' LBC</span>'; return '<span class="formatted-credits">' . number_format($amount, 1) . ' LBC</span>';
} }
public static function translate($token, $language = null)
{
$language = $language === null ? static::$language : $language;
if (!isset(static::$translations[$language]))
{
$path = ROOT_DIR . '/data/i18n/' . $language . '.yaml';
static::$translations[$language] = file_exists($path) ? Spyc::YAMLLoadString(file_get_contents($path)) : [];
}
$scope = static::$translations[$language];
foreach(explode('.', $token) as $level)
{
if (isset($scope[$level]))
{
$scope = $scope[$level];
}
else
{
$scope = [];
}
}
if (!$scope && $language != 'en')
{
return static::translate($token, 'en');
}
return $scope ?: $token;
}
} }

View file

@ -50,7 +50,8 @@ class View
throw $e; throw $e;
} }
return ob_get_clean();
return static::interpolateTokens(ob_get_clean());
} }
public static function exists($template) public static function exists($template)
@ -108,4 +109,11 @@ class View
$css = $scssCompiler->compile(file_get_contents(ROOT_DIR.'/web/scss/all.scss')); $css = $scssCompiler->compile(file_get_contents(ROOT_DIR.'/web/scss/all.scss'));
file_put_contents(ROOT_DIR.'/web/css/all.css', $css); file_put_contents(ROOT_DIR.'/web/css/all.css', $css);
} }
protected static function interpolateTokens($html)
{
return preg_replace_callback('/{{[\w\.]+}}/is', function($m) {
return i18n::translate(trim($m[0], '}{'));
}, $html);
}
} }

View file

@ -7,10 +7,8 @@
<div class="cover cover-dark"> <div class="cover cover-dark">
<div class="content content-wide content-dark"> <div class="content content-wide content-dark">
<div class="text-center"> <div class="text-center">
<h1 class="cover-title">Play, Share, Earn.</h1> <h1 class="cover-title">{{tagline}}</h1>
<h2 class="cover-subtitle" style="max-width: 600px; margin-left: auto; margin-right: auto"> <h2 class="cover-subtitle" style="max-width: 600px; margin-left: auto; margin-right: auto">{{sentence}}</h2>
Watch, read and play in a decentralized digital library controlled by the community.
</h2>
</div> </div>
<?php /* <?php /*

View file

@ -5,7 +5,7 @@
<main class="column-fluid"> <main class="column-fluid">
<div class="span7"> <div class="span7">
<div class="cover cover-dark cover-dark-grad content content-stretch content-dark"> <div class="cover cover-dark cover-dark-grad content content-stretch content-dark">
<h1>LBRY for <?php echo $osTitle ?> <span class="<?php echo $osIcon ?>"></span></h1> <h1><?php echo strtr(__('download.main.title'), ['%os%' => $osTitle]) ?> <span class="<?php echo $osIcon ?>"></span></h1>
<?php if ($downloadHtml): ?> <?php if ($downloadHtml): ?>
<?php echo View::render('download/_betaNotice') ?> <?php echo View::render('download/_betaNotice') ?>
<?php echo $downloadHtml ?> <?php echo $downloadHtml ?>

View file

@ -25,8 +25,7 @@
<?php endif ?> <?php endif ?>
<?php if (isset($meta) && $meta): ?> <?php if (isset($meta) && $meta): ?>
<div class="meta"> <div class="meta">
<?php echo __('You will receive 1-2 messages a month, only from LBRY, Inc. and only about LBRY.') ?> {{email.disclaimer}}
<?php echo __('You can easily unsubscribe at any time.') ?>
</div> </div>
<?php endif ?> <?php endif ?>
</div> </div>

View file

@ -1,65 +0,0 @@
<?php Response::setMetaDescription('Documentation on LBRY, a decentralized content distribution network.') ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main>
<div class="content">
<h1>Docs</h1>
<h3>Layer 1: Protocol</h3>
<p>While the protocol is one comprehensive set of rules, it is easier to understand as two parts.</p>
<h4>Part A: The LBRY Blockchain</h4>
<p>A <em>blockchain</em>, or <em>distributed ledger</em> is the key innovation behind the Bitcoin network. Blockchains solved the very complicated technological problem of having a bunch of distributed, disparate entities all agree on a rivalrous state of affairs (like how much money they owe each other).</p>
<p>Like Bitcoin, the LBRY blockchain maintain balances -- in this case, balances of <em>LBC</em>, LBRYs unit of credit. More importantly, the LBRY blockchain also provides a decentralized lookup and metadata storage system. The LBRY blockchain supports a specific set of commands that allows anyone to bid (in LBC) to control a LBRY <em>name</em>, which is a lot like a domain name. Whoever controls a name gets to describe what it contains, what it costs to access, who to pay, and where to find it. These names are sold in a continuous running auction. We will talk more about this system a little later on.</p>
<p>If youre a programmer, you might recognize the LBRY blockchain as a <em>key-value store</em>. Each key, or name, corresponds to a value, or a metadata entry. Whichever party or parties bid the most LBC gets to control the metadata returned by a key lookup.</p>
<p>Here is a sample key-value entry in the LBRY blockchain. Here, wonderfullife is the key, and the rest of the description is the value.</p>
<div class="code-bash">
<code><pre style="white-space: pre-wrap;">
<span class="code-bash-kw1">wonderfullife</span> : {
<span class="code-bash-kw2">title</span>: "Its a Wonderful Life",
<span class="code-bash-kw2">description</span>: "An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.",
<span class="code-bash-kw2">thumbnail</span>: "http://i.imgur.com/MW45x88.jpg",
<span class="code-bash-kw2">license</span>: "public domain",
<span class="code-bash-kw2">price</span>: 0, <span class="code-bash-comment">//free!</span>
<span class="code-bash-kw2">publisher</span>: "A Fan Of George Bailey", <span class="code-bash-comment">//simplification</span>
<span class="code-bash-kw2">sources</span>: { <span class="code-bash-comment">//extensible, variable list</span>
<span class="code-bash-kw2">lbry_hash</span> : &lt;unique id&gt;,
<span class="code-bash-kw2">url</span> : &lt;url&gt;
}
}</pre></code>
</div>
<div class="meta text-center content-inset"><p>A slightly simplified sample entry of metadata in the LBRY blockchain. Whichever party or parties bid the most in an ongoing auction control what a name returns.</p></div>
<p>Other than the usage of the LBRY blockchain to store names and metadata, there are only minor differences between the blockchains of LBRY and Bitcoin, and the changes are generally consensus improvements. Weve buffed the hashing algorithm, smoothed the block reward function, increased the block size, increased the total number of credits, and prepared for offchain settlement.</p>
<p>The LBRY blockchain simply maintains LBC balances and a content namespace/catalogue. The next part, LBRYnet, specifies what to do with this data. To compare to the existing web, the blockchain is like the domain system (it maintains a listing of what is available), while the next piece makes it possible to actually fetch and pay for content.</p>
<footer> If youre a Bitcoiner wondering why we dont use the Bitcoin blockchain, you can read a detailed answer to that question <a href="https://blog.lbry.io/why-doesnt-lbry-just-use-bitcoin/">here</a>.</footer>
<h4>Part B: The Data Network (LBRYNet)</h4>
<p>LBRYNet is the layer that makes the LBRY blockchain useful beyond a simple payment system. It says what to do with the information available in the LBRY blockchain, how to issue payments, how to look up a content identifier, and so on. </p>
<p>To use the LBRY network, a users computer needs the capacity to speak LBRY. That layer is LBRYNet. Just as your computer has a library that enables it to understand HTTP, DNS, and other languages and protocols, LBRYNet is the piece of software that allows your computer to understand how to interact with the LBRY network.</p>
<p>To understand what role LBRYNet plays, lets drill a little more into a sample user interaction. Once a user has affirmed access and purchase, such as in step 5 of our Sample Use above, the following happens:</p>
<ol>
<li>LBRYNet issues a lookup for the name associated with the content. If the client does not have a local copy of the blockchain, this lookup is broadcast to miners or to a service provider. This lookup acquires the metadata associated with the name.</li>
<li>LBRYNet issues any required payments, as instructed by metadata entries.
<ol>
<li>If the content is set to free, nothing happens here.</li>
<li>If the content is set to have a price in LBC, the client must issue a payment in LBC to the specified address. If the content is published encrypted, LBRYNet will not allow access until this payment has been issued.</li>
<li>If the content is set to have another payment method, the seller must run or use a service that provides a private server enforcing payment and provisioning accessing keys.</li>
</ol>
</li>
<li>Simultaneous to #2, LBRYNet uses the metadata to download the content itself.
<ol>
<li>The metadata allows chunks to be discovered and assembled in a BitTorrent-like fashion. However, unlike BitTorrent, chunks do not individually identify themselves as part of a greater whole. Chunks are just arbitrary pieces of data.</li>
<li>If LBRYNet cannot find nodes offering chunks for free, it will offer payments for chunks to other hosts with those chunks.</li>
<li>This payment is not done via proof-of-bandwidth, or third-party escrow. Instead, LBRYNet uses reputation, trust, and small initial payments to ensure reliable hosts. </li>
<li>If content is not published directly to LBRY, the metadata can instruct other access methods, such as a Netflix URL. This allows us to catalogue content not yet available on LBRY as well as offer legacy and extensibility purposes.</li>
</ol>
</li>
</ol>
</div>
</main>
<?php echo View::render('nav/footer') ?>

View file

@ -1,70 +0,0 @@
<?php Response::setMetaDescription('Download or install the latest version of LBRY.') ?>
<?php Response::setMetaTitle(__('Learn About LBRY')) ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main class="column-fluid">
<div class="span4">
<div class="cover cover-column cover-light-alt cover-light-alt-grad">
<div class="content content-light">
<h1><?php echo __('What?') ?></h1>
<div class="spacer1">
<div class="spacer1">
<a href="/img/lbry-ui.png">
<img src="/img/lbry-ui.png" alt="Screenshot of a LBRY browser"/>
</a>
</div>
<p><em>Puts on jargon hat.</em></p>
<p>
LBRY is a decentralized, censorship-resistant, open-source, peer-to-peer information marketplace and discovery protocol.
</p>
<p><em>Removes jargon hat.</em></p>
<p>
LBRY is a new way for people to publish and share content with each other.
</p>
<p>
Our goal is to provide a single box that allows anyone anywhere to find and purchase digital content from anyone else.
</p>
</div>
<a href="/what" class="btn-primary"><?php echo __('More About LBRY') ?></a>
</div>
</div>
</div>
<div class="span4">
<div class="cover cover-column cover-dark cover-dark-grad ">
<div class="content content-dark">
<h1><?php echo __('Why?') ?></h1>
<div class="spacer1">
<p><?php echo __('Current systems benefit huge corporations that add little but extract a lot.') ?></p>
<p>
<?php echo __('We don\'t like it when middlemen, greedy rent-seekers, and kleptocrats win.') ?></p>
</p>
<p><?php echo __('We think a better world is one in which artists and consumers are directly connected.') ?></p>
</div>
<div class="spacer1">
<a href="/why" class="btn-alt"><?php echo __('Why Make LBRY') ?></a>
</div>
<div>
<img src="/img/smbc-comic.png" />
</div>
<div class="meta text-center">
Credit <a href="//www.smbc-comics.com/" class="link-primary">SMBC</a>.
</div>
</div>
</div>
</div>
<div class="span4">
<div class="cover cover-column cover-light">
<div class="content">
<h1><?php echo __('Who?') ?></h1>
<div class="spacer1">
<p><?php echo __('LBRY promises an awful lot.') ?> <?php echo __('Can you trust us to deliver?') ?></p>
<p><?php echo __('Learn more about the relentless rebels changing the internet.') ?></p>
</div>
<div class="spacer1">
<a href="/team" class="btn-alt"><?php echo __('About The Team') ?></a>
</div>
<img src="/img/cover-team.jpg" alt="<?php echo __('LBRY Founders') ?>" />
</div>
</div>
</div>
</main>
<?php echo View::render('nav/footer') ?>

View file

@ -1,7 +1,6 @@
<?php Response::setMetaDescription(__('Learn more about LBRY, the technology that puts you back in control of the internet.')) ?> <?php Response::setMetaDescription(__('Learn more about LBRY, the technology that puts you back in control of the internet.')) ?>
<?php Response::setMetaTitle(__('Learn About LBRY')) ?> <?php Response::setMetaTitle(__('Learn About LBRY')) ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?> <?php echo View::render('nav/header', ['isDark' => false]) ?>
<main class="column-fluid "> <main class="column-fluid ">
<div class="span6"> <div class="span6">
<div class="cover cover-light content"> <div class="cover cover-light content">

View file

@ -1,47 +0,0 @@
<?php Response::setMetaDescription('Publish your content on the world\'s first platform that leaves creators in control.') ?>
<?php Response::setMetaTitle(__('Publish')) ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main >
<div class="content">
<h1><?php echo __('Publish') ?></h1>
<p>Own or create content? Release your work on LBRY and be ahead of the curve.</p>
</div>
<div class="hero hero-pattern spacer2">
<div class="hero-content">
<h2 class="hero-title text-center">Publish instantly, everywhere, for free.</h2>
<div class="row-fluid hero-tile-row">
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-mega icon-cloud"></span>
</div>
<h3>Global, Robust Distribution</h3>
<p>
LBRY uses ground-breaking technology to make your content instantly available worldwide,
with no ability for us or anyone else to remove or censor your content.
</p>
</div>
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-mega icon-star"></span>
</div>
<h3>Creators in Control</h3>
<p>Update your content at any time. Change the price. Change the title. Publish, unpublish. You and only you can do this in LBRY.</p>
</div>
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-money icon-mega"></span>
</div>
<h3>More, Better Profit</h3>
<p>Any price you charge for content settles near-instantly into an account only you control. You receive 100% of the price.</p>
</div>
</div>
</div>
</div>
<div class="content">
<h2 id="publish-form"><?php echo __('Join LBRY') ?></h2>
<p>LBRY is currently in alpha testing, preparing for a public release.</p>
<iframe id="feedback-form-iframe" src="https://docs.google.com/forms/d/17yrFsY1W86N9hfNt1batFbySY-1z-tq0wDjFjXKjgp8/viewform?embedded=true"
width="760" height="1200" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
</div>
</main>
<?php echo View::render('nav/footer') ?>

View file

@ -0,0 +1,10 @@
<?php Response::setMetaDescription('WHAT WHAT') ?>
<?php NavActions::setNavUri('/get') ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main>
<div class="content">
<div class='prefinery-form-embed'></div>
</div>
</main>
<script type="text/javascript">var _pfy = _pfy || [];(function(){function pfy_load(){var pfys=document.createElement('script');pfys.type='text/javascript';pfys.async=true;pfys.src='https://lbry.prefinery.com/widget/v2/whzquod5.js';var pfy=document.getElementsByTagName('script')[0];pfy.parentNode.insertBefore(pfys,pfy);}if (window.attachEvent){window.attachEvent('onload',pfy_load);}else{window.addEventListener('load',pfy_load,false);}})();</script>
<?php echo View::render('nav/footer') ?>

View file

@ -1,99 +0,0 @@
<?php Response::setMetaDescription('Access information and content in ways you never dreamed possible. Earn credits for your unused bandwidth and diskspace.') ?>
<?php NavActions::setNavUri('/learn') ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main>
<div class="hero hero-pattern spacer2">
<div class="hero-content text-center">
<h2 class="hero-title">A revolution in accessing and publishing information.</h2>
<div class="row-fluid hero-tile-row">
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-money icon-mega"></span>
</div>
<h4>
<strong>Hosts</strong> earn credits for providing bandwidth and disk space.
</h4>
</div>
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-mega icon-gears"></span>
</div>
<h4>
<strong>Miners</strong> earn credits for securing balances and metadata.
</h4>
</div>
<div class="span4 hero-tile">
<div class="spacer1">
<span class="icon-chain-broken icon-mega"></span>
</div>
<h4>
<strong>Patrons</strong> spend credits to access content without gatekeepers.
</h4>
</div>
</div>
</div>
</div>
<div class="content">
<h1>What is LBRY?</h1>
<div class="spacer2">
<p>LBRY allows anyone to publish content to a location like this:</p>
<p class="text-center"><code>lbry://wonderfullife</code></p>
<p>Others can access this resource, either for free or for credits. Let's look at an example:</p>
<ol>
<li>Ernest wants to release his comedy-horror film, "Ernie Goes To Guantanamo Bay".</li>
<li>The content is encrypted and sliced into many pieces. These pieces are stored by <strong>hosts</strong>.</li>
<li>Ernest reserves <code>lbry://erniebythebay</code>, a shortname pointing to his content.</li>
<li>When Ernest reserves the location, he also submits metadata, such as a description and thumbnail. This information is stored by <strong>miners</strong> in the LBRY blockchain.</li>
<li>Hilary, a <strong>patron</strong>, browses the LBRY network and wants to watch the movie.
Her LBRY client collects the pieces from the <strong>hosts</strong> and reassembles them.</li>
<li>Hilary pays Ernest for the decryption key, allowing her to watch the film.</li>
</ol>
</div>
</div>
<div class="hero hero-pattern">
<div class="hero-content">
<h2 class="text-center hero-title">If BitTorrent + BitCoin Had a Baby</h2>
<div class="row-fluid hero-tile-row">
<div class="span4 hero-tile">
<span class="icon-mega icon-cloud"></span>
<h3>Decentralized Metadata</h3>
<p>Information about content is embedded in a blockchain, eliminating centralized failure points. Metadata and data are completely decoupled so that <strong>hosts</strong> never see metadata and <strong>miners</strong> never see data.</p>
</div>
<div class="span4 hero-tile">
<span class="icon-mega icon-shopping-cart"></span>
<h3>Marketized Data-Transfer</h3>
<p><strong>Patrons</strong> request content for free or offer credits for faster speeds or access. <strong>Hosts</strong> share or sell surplus bandwidth and disk space.</p>
</div>
<div class="span4 hero-tile">
<span class="icon-mega icon-link"></span>
<h3>Memorable URIs</h3>
<p>
<strong>Publishers</strong> can choose friendly resource indicators like <code>lbry://wonderfullife</code> instead of ugly BitTorrent magnet URIs.
URIs are <em>reserved</em> rather than owned, creating strong incentive for rights holders to use LBRY.
</p>
</div>
</div>
<div class="row-fluid hero-tile-row">
<div class="span4 hero-tile">
<span class="icon-mega icon-usd" style="font-size: 180px"></span>
<h3>Payments to Publishers</h3>
<p><strong>Publishers</strong> may embed an address to receive payment for data. Publishers can also create assurance contracts<sup><a href="//en.wikipedia.org/wiki/Assurance_contract">?</a></sup> for new content.</p>
</div>
<div class="span4 hero-tile">
<span class="icon-mega icon-lock"></span>
<h3>Improved Privacy</h3>
<p>LBRY uses novel techniques to protect publishers, providers, and consumers.
<strong>Hosts</strong> only have small portions of an encrypted file with no information of the contents.
</p>
</div>
<div class="span4 hero-tile">
<span class="icon-mega icon-code"></span>
<h3>Designed for Developers</h3>
<p>LBRY is designed to allow others to create applications powered by its distributed, robust data store.</p>
</div>
</div>
</div>
</div>
<?php echo View::render('nav/learnFooter') ?>
</main>
<?php echo View::render('nav/footer') ?>

View file

@ -1,107 +0,0 @@
<?php NavActions::setNavUri('/learn') ?>
<?php Response::setMetaImage('//lbry.io/img/xkcd-comic.png') ?>
<?php Response::setMetaDescription('Learn about the inspiration behind LBRY\'s revolutionary content distribution system.') ?>
<?php echo View::render('nav/header', ['isDark' => false]) ?>
<main>
<div class="hero hero-quote hero-img spacer2" style="background-image: url(/img/cover-jcole.jpg)">
<div class="hero-content-wrapper">
<div class="hero-content">
<blockquote>
<p>If you made the music, and you made the art, and you put it into the world, I should be able to use it. I'ma pay you, I'ma give you a percentage, but... you was inspired by the world; allow the world to be inspired by your [work] and to use your [work].</p>
</blockquote>
<cite>J. Cole, <em><a href="https://www.youtube.com/watch?v=UMCGOAGb4Y0&amp;t=470s">Note to Self</a></em></cite>
</div>
</div>
</div>
<div class="content"><h1>Why?</h1></div>
<div class="content spacer2">
<h3>The World We Live In</h3>
<p>Annual internet video traffic is approximately 500 exabytes (500,000,000,000 GB)<sup><a href="http://www.cisco.com/c/en/us/solutions/collateral/service-provider/ip-ngn-ip-next-generation-network/white_paper_c11-481360.html">1</a></sup>.
Every second, over 10,000 hours of video are streamed.
The technical term for the quantity of videos people watch every year is a million jillion. You know this.</p>
<p>What you may not know: <em>video distribution is fundamentally flawed</em>.</p>
<p>
The fatal flaw of existing systems is their centralized, top-down design. The consequences:
</p>
<ol>
<li><p><strong>Increased costs to consumers.</strong> Providers bear significant infrastructure costs, regulatory and compliance costs,
and must create complex systems to govern a simple process (copying a number).</p></li>
<li><p><strong>Terrible consumer experience.</strong>
Centralization leads to fragmentation, as providers compete to lock numbers in digit dungeons.</p>
</li>
<li>
<p><strong>Poor producer experience.</strong>
The primary want of a producer is to be paid for making things. Instead, producers frequently lose control of their content and
lose profits to the inefficiency of current systems.</p>
</li>
</ol>
<p>Similar issues of economics and experience exist for consumers and producers of information of all kinds (e.g. news, facts), not just videos.</p>
<p>LBRY solves these problems and throws in some other sweet innovations just for funsies.</p>
</div>
<div class="hero hero-quote hero-img spacer2" style="background-image: url(/img/cover-swartz.jpg)">
<div class="hero-content-wrapper">
<div class="hero-content">
<blockquote>
<p>Information is power.</p>
<p>But like all power, there are those who want to keep it for themselves.
</blockquote>
<cite>Aaron Swartz</cite>
</div>
</div>
</div>
<div class="content spacer2">
<h3>An Alternative</h3>
<p>LBRY avoids the mistakes of centralization and middlemen. It says:</p>
<ol>
<li>
<p>
<strong>Information isn't a thing</strong>
Things are physical and exist in the world. When I have a thing, you can't. Economists call this <em>rivalry</em><sup><a href="//en.wikipedia.org/wiki/Rivalry_%28economics%29">?</a></sup>.
</p>
<p>
Information is non-rival. Information is just a number. There is nothing easier to replicate than information.
LBRY embraces (and adores) this reality.
</p>
<p>
LBRY breaks information into thousands of identifiable tiny pieces and spreads them throughout the internet, reducing costs
for both providers and consumers.
</p>
<div class="spacer2">
<img src="/img/xkcd-comic.png" alt="XKCD #1228 Prometheus"/>
<div class="meta text-center"><a href="https://xkcd.com/1228/">XKCD #1228</a></div>
</div>
</li>
<li>
<p>
<strong>Connecting creators and consumers directly is best.</strong>
Do we need middlemen spending billions to extract their rent and police others?
A better system allows consumers to easily and directly pay content creators.
We want to eliminate extortionists charging tolls.
</p>
<p>
On LBRY, publishers sell directly to patrons. Publishers can charge a set fee per decryption key for content or create an assurance contract for unpublished content.
</p>
</li>
<li>
<p><strong>It's Up to Us.</strong> A smart guy once said that power corrupts and absolute power corrupts absolutely.</p>
<p>
LBRY leaves no one in charge (including us). It puts power in the hands of individuals and users rather than corporations and executives.
</p>
<p>We think that world will be more creative, more charitable, and more fair. We hope you'll join us in creating it.</p>
</li>
</ol>
<h3>What LBRY Isn't</h3>
<p>LBRY's fully decentralized nature makes restricting content impossible. Since LBRY also aims to unseat gigantic, established media players,
we fear it may attract undeserved legal attention. So we'd like to be clear from day one:</p>
<p>
<strong>LBRY is not about facilitating piracy.</strong>
LBRY is about creating a network where creators and patrons can directly interact without relying on anyone in the middle. We've made choices
about publisher identities and how addresses are reserved that are specifically designed to combat undue profiteering.</p>
</div>
<?php echo View::render('nav/learnFooter') ?>
</main>
<?php echo View::render('nav/footer') ?>
<?php /* It is inspired by Bitcoin, BitTorrent, and&nbsp;a comment by Julian Assange<sup><a class="link-primary" href="https://wikileaks.org/Transcript-Meeting-Assange-Schmidt.html#731">1</a></sup>.</p> */ ?>