From 0e269dcae4dedde6b98d96aa84ae4538783d18ed Mon Sep 17 00:00:00 2001
From: Sean Yesmunt <sean@lbry.io>
Date: Mon, 29 Mar 2021 09:59:33 -0400
Subject: [PATCH] add more strings

---
 component/twitter.jsx |  5 +++--
 i18n.js               | 31 +++++++++++++++++++++++++++++++
 pages/index.js        | 28 ++++++++++++----------------
 3 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/component/twitter.jsx b/component/twitter.jsx
index 5f086a6..4be92b8 100644
--- a/component/twitter.jsx
+++ b/component/twitter.jsx
@@ -1,6 +1,7 @@
 import React from 'react';
+import { m } from '../i18n';
 
-export function Twitter() {
+export function Twitter({ i18n }) {
   const [tweets, setTweets] = React.useState();
   const [error, setError] = React.useState();
   React.useEffect(() => {
@@ -28,7 +29,7 @@ export function Twitter() {
 
   return (
     <div className="content">
-      <h2 className="content__section-title">What are people saying?</h2>
+      <h2 className="content__section-title">{i18n(m.twitter_title)}</h2>
       <div className="twitter">
         {!error && !tweets && (
           <div className="tweets tweets--static">
diff --git a/i18n.js b/i18n.js
index fa4b4ea..47c9a9a 100644
--- a/i18n.js
+++ b/i18n.js
@@ -27,6 +27,19 @@ export const m = {
   email_input_button_loading: 'email_input_button_loading',
   email_success: 'email_success',
   email_error: 'email_error',
+  try_lbry_title: 'try_lbry_title',
+  try_lbry_subtitle: 'try_lbry_subtitle',
+  try_lbry_desktop_link: 'try_lbry_desktop_link',
+  try_lbry_desktop_help: 'try_lbry_desktop_help',
+  try_odysee_help: 'try_odysee_help',
+  contact_title: 'contact_title',
+  contact_press: 'contact_press',
+  contact_legal: 'contact_legal',
+  contact_other_email: 'contact_other_email',
+  contact_discord: 'contact_discord',
+
+  donate_title: 'donate_title',
+  donate_subtitle: 'donate_subtitle',
 };
 
 const en = {
@@ -58,6 +71,8 @@ const en = {
   share_story_title: 'Share this story',
   share_story_subtitle: 'Post to social media to spread awareness.',
 
+  twitter_title: 'What are people saying?',
+
   petition_title: 'Sign the petition',
   petition_subtitle:
     'Tell the SEC that cryptocurrency must remain legal and free.',
@@ -74,6 +89,22 @@ const en = {
   email_input_button_loading: 'Submitting',
   email_success: 'Thank you! We will keep you in the loop.',
   email_error: 'Sorry, there was an error. Please try again.',
+
+  try_lbry_title: 'Try LBRY',
+  try_lbry_subtitle:
+    'If the government and big tech want it gone, it must be good.',
+  try_lbry_desktop_link: 'LBRY Desktop',
+  try_lbry_desktop_help: 'decentralized and open-source',
+  try_odysee_help: 'easiest to use',
+
+  contact_title: 'Contact us',
+  contact_press: 'Press inquiries',
+  contact_legal: 'Legal',
+  contact_other_email: 'Other email',
+  contact_discord: 'Discord (not run by LBRY Inc)',
+
+  donate_title: 'Donate',
+  donate_subtitle: 'If you want to go far, go together.',
 };
 
 const es = {};
diff --git a/pages/index.js b/pages/index.js
index 641463a..557825a 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -146,44 +146,42 @@ export default function Home() {
         <Email i18n={__} />
 
         <div className="content">
-          <h2 className="content__section-title">Try LBRY</h2>
-          <div className="content__subtitle">
-            If the government and big tech want it gone, it must be good.
-          </div>
+          <h2 className="content__section-title">{__(m.try_lbry_title)}</h2>
+          <div className="content__subtitle">{__(m.try_lbry_subtitle)}</div>
           <p>
             <div className="lbry__try">
               <a href="https://lbry.com/get" className="link">
-                LBRY Desktop
+                {__(m.try_lbry_desktop_link)}
               </a>{' '}
-              (decentralized and open-source)
+              ({__(m.try_lbry_desktop_help)})
             </div>
             <div className="lbry__try">
               <a href="https://odysee.com" className="link">
                 Odysee
               </a>{' '}
-              (easiest to use)
+              ({__(m.try_odysee_help)})
             </div>
           </p>
         </div>
 
         <div className="content">
           <h2 className="content__section-title" id="contact">
-            Contact Us
+            {__(m.contact_title)}
           </h2>
           <p>
-            Press inquiries:{' '}
+            {__(m.contact_press)}:{' '}
             <a className="link" href="mailto:press@lbry.com">
               press@lbry.com
             </a>
           </p>
           <p>
-            Legal:{' '}
+            {__(m.contact_legal)}:{' '}
             <a className="link" href="mailto:legal@lbry.com">
               legal@lbry.com
             </a>
           </p>
           <p>
-            Other email:{' '}
+            {__(m.contact_other_email)}:{' '}
             <a className="link" href="mailto:savecrypto@lbry.com">
               savecrypto@lbry.com
             </a>
@@ -195,7 +193,7 @@ export default function Home() {
             </a>
           </p>
           <p>
-            Discord (not run by LBRY Inc):{' '}
+            {__(m.contact_discord)}:{' '}
             <a className="link" href="https://chat.lbry.org">
               LBRY Discord
             </a>
@@ -204,11 +202,9 @@ export default function Home() {
 
         <div className="content">
           <h2 className="content__section-title" id="donate">
-            Donate
+            {__(m.donate_title)}
           </h2>
-          <div className="content__subtitle">
-            If you want to go far, go together.
-          </div>
+          <div className="content__subtitle">{__(m.contact_subtitle)}</div>
 
           <div>
             <div className="donate">