From d30d4353e81c2b36a11fc299b0aef4640ed7a80e Mon Sep 17 00:00:00 2001 From: Intnick Date: Fri, 26 May 2017 02:16:25 +0200 Subject: [PATCH] moved the import of y18n component before some other imports; translations for auth developer --- app/locales/en.json | 70 +++++++++++++++++++- ui/js/component/auth.js | 80 +++++++++++------------ ui/js/component/common.js | 6 +- ui/js/component/downloadingModal/view.jsx | 14 ++-- ui/js/component/errorModal/view.jsx | 18 ++--- ui/js/component/file-selector.js | 6 +- ui/js/component/form.js | 4 +- ui/js/component/modal.js | 13 ++-- ui/js/component/reward-link.js | 8 +-- ui/js/component/splash.js | 8 +-- ui/js/main.js | 12 ++-- ui/js/page/channel/view.jsx | 8 +-- ui/js/page/developer.js | 10 +-- ui/js/page/discover/view.jsx | 4 +- ui/js/page/fileListDownloaded/view.jsx | 4 +- ui/js/page/fileListPublished/view.jsx | 4 +- ui/js/page/filePage/view.jsx | 14 ++-- ui/js/page/start.js | 4 +- ui/js/selectors/app.js | 40 ++++++------ 19 files changed, 200 insertions(+), 127 deletions(-) diff --git a/app/locales/en.json b/app/locales/en.json index c725e2624..7c4e78d5e 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -75,5 +75,73 @@ "Discover": "Discover", "Fetching content": "Fetching content", "What's this?": "What's this?", - "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!": "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!" + "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!": "Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names \"one,\" \"two,\" \"three,\" \"four\" and \"five\" to put your content here!", + "LBRY is Closed": "LBRY is Closed", + "Click here to start LBRY": "Click here to start LBRY", + "Failed to load landing content.": "Failed to load landing content.", + "Settings": "Settings", + "Welcome to LBRY": "Welcome to LBRY", + "Downloads & Purchases": "Downloads & Purchases", + "Downloaded": "Downloaded", + "Published": "Published", + "Publishes": "Publishes", + "Overview": "Overview", + "Send": "Send", + "Receive": "Receive", + "Rewards": "Rewards", + "Search results for %s": "Search results for %s", + "Search": "Search", + "Your email is still not verified.": "Your email is still not verified.", + "Next": "Next", + "Email": "Email", + "Verification Code": "Verification Code", + "A verification code is required to access this version.": "A verification code is required to access this version.", + "Verify": "Verify", + "No code?": "No code?", + "Click here": "Click here", + "Authentication": "Authentication", + "LBRY Early Access": "LBRY Early Access", + "Preparing for first access": "Preparing for first access", + "Welcome to LBRY.": "Welcome to LBRY.", + "Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.": "Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.", + "Up top, LBRY is similar to popular media sites.": "Up top, LBRY is similar to popular media sites.", + "Below, LBRY is controlled by users -- you -- via blockchain and decentralization.": "Below, LBRY is controlled by users -- you -- via blockchain and decentralization.", + "Thank you for making content freedom possible! Here's a nickel, kid.": "Thank you for making content freedom possible! Here's a nickel, kid.", + "Developer Settings": "Developer Settings", + "Show developer menu": "Show developer menu", + "Use custom search servers": "Use custom search servers", + "Custom search servers (one per line)": "Custom search servers (one per line)", + "Force Upgrade": "Force Upgrade", + "OK": "OK", + "Show More...": "Show More...", + "Show Less": "Show Less", + "Starting daemon": "Starting daemon", + "Waiting for name resolution": "Waiting for name resolution", + "Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.": "Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.", + "Claim Reward": "Claim Reward", + "Claiming...": "Claiming...", + "This is an estimate and does not include data fees": "This is an estimate and does not include data fees", + "free": "free", + "Reward Claim Error": "Reward Claim Error", + "This field is required": "This field is required", + "Choose File": "Choose File", + "No File Chosen": "No File Chosen", + "Choose Directory": "Choose Directory", + "Downloading Update": "Downloading Update", + "Click \"Begin Upgrade\" to start the upgrade process.": "Click \"Begin Upgrade\" to start the upgrade process.", + "The app will close, and you will be prompted to install the latest version of LBRY.": "The app will close, and you will be prompted to install the latest version of LBRY.", + "After the install is complete, please reopen the app.": "After the install is complete, please reopen the app.", + "Begin Upgrade": "Begin Upgrade", + "API connection string": "API connection string", + "We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.": "We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.", + "You haven't downloaded anything from LBRY yet. Go": "You haven't downloaded anything from LBRY yet. Go", + "search for your first download": "search for your first download", + "Loading": "Loading", + " credits": " credits", + "It looks like you haven't published anything to LBRY yet. Go": "It looks like you haven't published anything to LBRY yet. Go", + "share your beautiful cats with the world": "share your beautiful cats with the world", + "report": "report", + "Content-Type": "Content-Type", + "Author": "Author", + "License": "License" } \ No newline at end of file diff --git a/ui/js/component/auth.js b/ui/js/component/auth.js index df9262672..afe6b8066 100644 --- a/ui/js/component/auth.js +++ b/ui/js/component/auth.js @@ -55,11 +55,11 @@ class SubmitEmailStage extends React.Component { return (
{ this.handleSubmit(event) }}> - { this._emailRow = ref }} type="text" label="Email" placeholder="scrwvwls@lbry.io" + { this._emailRow = ref }} type="text" label={__("Email")} placeholder="scrwvwls@lbry.io" name="email" value={this.state.email} onChange={(event) => { this.handleEmailChanged(event) }} />
- { this.handleSubmit(event) }} /> + { this.handleSubmit(event) }} />
@@ -102,7 +102,7 @@ class ConfirmEmailStage extends React.Component { if (userEmail.is_verified) { this.props.setStage("welcome") } else { - onSubmitError(new Error("Your email is still not verified.")) //shouldn't happen? + onSubmitError(new Error(__("Your email is still not verified."))) //shouldn't happen? } }, onSubmitError); } @@ -111,14 +111,14 @@ class ConfirmEmailStage extends React.Component { return (
{ this.handleSubmit(event) }}> - { this._codeRow = ref }} type="text" + { this._codeRow = ref }} type="text" name="code" placeholder="a94bXXXXXXXXXXXXXX" value={this.state.code} onChange={(event) => { this.handleCodeChanged(event) }} - helper="A verification code is required to access this version."/> + helper={__("A verification code is required to access this version.")}/>
- { this.handleSubmit(event)}} /> + { this.handleSubmit(event)}} />
- No code? { this.props.setStage("nocode")}} label="Click here" />. + {__("No code?")} { this.props.setStage("nocode")}} label={__("Click here")} />.
@@ -150,26 +150,26 @@ class WelcomeStage extends React.Component { render() { return ( !this.state.hasReward ? - +
-

Welcome to LBRY.

-

Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.

-

Up top, LBRY is similar to popular media sites.

-

Below, LBRY is controlled by users -- you -- via blockchain and decentralization.

-

Thank you for making content freedom possible! Here's a nickel, kid.

+

{__("Welcome to LBRY.")}

+

{__("Using LBRY is like dating a centaur. Totally normal up top, and way different underneath.")}

+

{__("Up top, LBRY is similar to popular media sites.")}

+

{__("Below, LBRY is controlled by users -- you -- via blockchain and decentralization.")}

+

{__("Thank you for making content freedom possible! Here's a nickel, kid.")}

{ this.onRewardClaim(event) }} onRewardFailure={() => this.props.setStage(null)} onConfirmed={() => { this.props.setStage(null) }} />
: - { this.props.setStage(null) }}> + { this.props.setStage(null) }}>
-

About Your Reward

-

You earned a reward of LBRY credits, or LBC.

-

This reward will show in your Wallet momentarily, probably while you are reading this message.

-

LBC is used to compensate creators, to publish, and to have say in how the network works.

-

No need to understand it all just yet! Try watching or downloading something next.

-

Finally, know that LBRY is an early beta and that it earns the name.

+

{__("About Your Reward")}

+

{__("You earned a reward of ")} {__("LBRY credits, or \"LBC\".")}

+

{__("This reward will show in your Wallet momentarily, probably while you are reading this message.")}

+

{__("LBC is used to compensate creators, to publish, and to have say in how the network works.")}

+

{__("No need to understand it all just yet! Try watching or downloading something next.")}

+

{__("Finally, know that LBRY is an early beta and that it earns the name.")}

); @@ -178,16 +178,16 @@ class WelcomeStage extends React.Component { const ErrorStage = (props) => { return
-

An error was encountered that we cannot continue from.

-

At least we're earning the name beta.

- { props.errorText ?

Message: {props.errorText}

: '' } - { window.location.reload() } } /> +

{__("An error was encountered that we cannot continue from.")}

+

{__("At least we're earning the name beta.")}

+ { props.errorText ?

{__("Message:")} {props.errorText}

: '' } + { window.location.reload() } } />
} const PendingStage = (props) => { return
-

Preparing for first access

+

{__("Preparing for first access")}

} @@ -230,20 +230,20 @@ class CodeRequiredStage extends React.Component { return (
-

Access to LBRY is restricted as we build and scale the network.

-

There are two ways in:

-

Own LBRY Credits

-

If you own at least 1 LBC, you can get in right now.

+

{__("Access to LBRY is restricted as we build and scale the network.")}

+

{__("There are two ways in:")}

+

{__("Own LBRY Credits")}

+

{__("If you own at least 1 LBC, you can get in right now.")}

{ setLocal('auth_bypassed', true); this.props.setStage(null); }} - disabled={disabled} label="Let Me In" button={ disabled ? "alt" : "primary" } />

-

Your balance is . To increase your balance, send credits to this address:

-

-

If you don't understand how to send credits, then...

+ disabled={disabled} label={__("Let Me In")} button={ disabled ? "alt" : "primary" } />

+

{__("Your balance is ")}. {__("To increase your balance, send credits to this address:")}

+

+

{__("If you don't understand how to send credits, then...")}

-

Wait For A Code

-

If you provide your email, you'll automatically receive a notification when the system is open.

-

{ this.props.setStage("email"); }} label="Return" />

+

{__("Wait For A Code")}

+

{__("If you provide your email, you'll automatically receive a notification when the system is open.")}

+

{ this.props.setStage("email"); }} label={__("Return")} />

); @@ -312,16 +312,16 @@ export class AuthOverlay extends React.Component { const StageContent = this._stages[this.state.stage]; if (!StageContent) { - return Unknown authentication step. + return {__("Unknown authentication step.")} } return ( this.state.stage != "welcome" ? - -

LBRY Early Access

+ +

{__("LBRY Early Access")}

{ this.setStage(stage, stageProps) }} />
: { this.setStage(stage, stageProps) }} {...this.state.stageProps} /> ); } -} \ No newline at end of file +} diff --git a/ui/js/component/common.js b/ui/js/component/common.js index c11e0d14c..d864a1c48 100644 --- a/ui/js/component/common.js +++ b/ui/js/component/common.js @@ -68,9 +68,9 @@ export class CreditAmount extends React.Component { const formattedAmount = lbry.formatCredits(this.props.amount, this.props.precision); let amountText; if (this.props.showFree && parseFloat(formattedAmount) == 0) { - amountText = 'free'; + amountText = __('free'); } else if (this.props.label) { - amountText = formattedAmount + (parseFloat(formattedAmount) == 1 ? ' credit' : ' credits'); + amountText = formattedAmount + (parseFloat(formattedAmount) == 1 ? __(' credit') : __(' credits')); } else { amountText = formattedAmount; } @@ -80,7 +80,7 @@ export class CreditAmount extends React.Component { {amountText} - { this.props.isEstimate ? * : null } + { this.props.isEstimate ? * : null } ); } diff --git a/ui/js/component/downloadingModal/view.jsx b/ui/js/component/downloadingModal/view.jsx index dc76fdd4b..053668437 100644 --- a/ui/js/component/downloadingModal/view.jsx +++ b/ui/js/component/downloadingModal/view.jsx @@ -15,22 +15,22 @@ class DownloadingModal extends React.Component { } = this.props return ( - - Downloading Update{downloadProgress ? `: ${downloadProgress}%` : null} + + {__("Downloading Update")}{downloadProgress ? `: ${downloadProgress}%` : null} {downloadComplete ? (

-

Click "Begin Upgrade" to start the upgrade process.

-

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.

+

{__("Click \"Begin Upgrade\" to start the upgrade process.")}

+

{__("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.")}

) : null }
{downloadComplete - ? + ? : null} - +
) diff --git a/ui/js/component/errorModal/view.jsx b/ui/js/component/errorModal/view.jsx index c494c9cb1..a5cbcd8c7 100644 --- a/ui/js/component/errorModal/view.jsx +++ b/ui/js/component/errorModal/view.jsx @@ -15,12 +15,12 @@ class ErrorModal extends React.Component { const errorObj = typeof error === "string" ? { error: error } : error const error_key_labels = { - connectionString: 'API connection string', - method: 'Method', - params: 'Parameters', - code: 'Error code', - message: 'Error message', - data: 'Error data', + connectionString: __('API connection string'), + method: __('Method'), + params: __('Parameters'), + code: __('Error code'), + message: __('Error message'), + data: __('Error data'), } @@ -35,16 +35,16 @@ class ErrorModal extends React.Component { return( -

Error

+

{__("Error")}

-

We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.

+

{__("We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.")}

) diff --git a/ui/js/component/file-selector.js b/ui/js/component/file-selector.js index 4670f4830..786d82caf 100644 --- a/ui/js/component/file-selector.js +++ b/ui/js/component/file-selector.js @@ -41,14 +41,14 @@ class FileSelector extends React.Component {
{' '} {this.state.path ? this.state.path : - 'No File Chosen'} + __('No File Chosen')}
); diff --git a/ui/js/component/form.js b/ui/js/component/form.js index 416011df3..809ebe534 100644 --- a/ui/js/component/form.js +++ b/ui/js/component/form.js @@ -21,7 +21,7 @@ export class FormField extends React.Component { constructor(props) { super(props); - this._fieldRequiredText = 'This field is required'; + this._fieldRequiredText = __('This field is required'); this._type = null; this._element = null; @@ -136,7 +136,7 @@ export class FormRow extends React.Component { constructor(props) { super(props); - this._fieldRequiredText = 'This field is required'; + this._fieldRequiredText = __('This field is required'); this.state = { isError: false, diff --git a/ui/js/component/modal.js b/ui/js/component/modal.js index bd3c1eb3c..89598e9e8 100644 --- a/ui/js/component/modal.js +++ b/ui/js/component/modal.js @@ -2,6 +2,9 @@ import React from 'react'; import ReactModal from 'react-modal'; import Link from 'component/link'; +const i18n = require('y18n')({directory: 'app/locales'}); + + export class Modal extends React.Component { static propTypes = { @@ -18,8 +21,8 @@ export class Modal extends React.Component { static defaultProps = { type: 'alert', overlay: true, - confirmButtonLabel: 'OK', - abortButtonLabel: 'Cancel', + confirmButtonLabel: i18n.__('OK'), + abortButtonLabel: i18n.__('Cancel'), confirmButtonDisabled: false, abortButtonDisabled: false, } @@ -52,9 +55,9 @@ export class ExpandableModal extends React.Component { } static defaultProps = { - confirmButtonLabel: 'OK', - expandButtonLabel: 'Show More...', - hideButtonLabel: 'Show Less', + confirmButtonLabel: i18n.__('OK'), + expandButtonLabel: i18n.__('Show More...'), + hideButtonLabel: i18n.__('Show Less'), } constructor(props) { diff --git a/ui/js/component/reward-link.js b/ui/js/component/reward-link.js index 31bd90e28..bb2c169cf 100644 --- a/ui/js/component/reward-link.js +++ b/ui/js/component/reward-link.js @@ -77,15 +77,15 @@ export class RewardLink extends React.Component { return (
{this.props.claimed - ? Reward claimed. + ? {__("Reward claimed.")} : { this.claimReward() }} />} + label={ this.state.pending ? __("Claiming...") : __("Claim Reward")} onClick={() => { this.claimReward() }} />} {this.state.errorMessage ? - { this.clearError() }}> + { this.clearError() }}> {this.state.errorMessage} : ''}
); } -} \ No newline at end of file +} diff --git a/ui/js/component/splash.js b/ui/js/component/splash.js index e2be56b67..d5433398a 100644 --- a/ui/js/component/splash.js +++ b/ui/js/component/splash.js @@ -12,7 +12,7 @@ export class SplashScreen extends React.Component { super(props); this.state = { - details: 'Starting daemon', + details: __('Starting daemon'), isLagging: false, }; } @@ -29,7 +29,7 @@ export class SplashScreen extends React.Component { // TODO: This is a hack, and the logic should live in the daemon // to give us a better sense of when we are actually started this.setState({ - details: 'Waiting for name resolution', + details: __('Waiting for name resolution'), isLagging: false }); @@ -54,8 +54,8 @@ export class SplashScreen extends React.Component { } else { this.setState({ isLagging: true, - message: "Failed to connect to LBRY", - details: "LBRY was unable to start and connect properly." + message: __("Failed to connect to LBRY"), + details: __("LBRY was unable to start and connect properly.") }) } }) diff --git a/ui/js/main.js b/ui/js/main.js index 5b81bf23c..222e71890 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -2,14 +2,19 @@ import React from 'react'; import ReactDOM from 'react-dom'; import lbry from './lbry.js'; import lbryio from './lbryio.js'; + +const i18n = require('y18n')({directory: 'app/locales'}); +window.__ = i18n.__; +window.__n = i18n.__n; + import lighthouse from './lighthouse.js'; import App from 'component/app/index.js'; -import SplashScreen from 'component/splash.js'; import SnackBar from 'component/snackBar'; -import {AuthOverlay} from 'component/auth.js'; import { Provider } from 'react-redux'; import batchActions from 'util/batchActions' import store from 'store.js'; +import SplashScreen from 'component/splash.js'; +import {AuthOverlay} from 'component/auth.js'; import { doChangePath, doNavigate, @@ -29,9 +34,6 @@ const {remote, ipcRenderer, shell} = require('electron'); const contextMenu = remote.require('./menu/context-menu'); const app = require('./app') -const i18n = require('y18n')({directory: 'app/locales'}); -window.__ = i18n.__; -window.__n = i18n.__n; lbry.showMenuIfNeeded(); diff --git a/ui/js/page/channel/view.jsx b/ui/js/page/channel/view.jsx index 05b447c60..eb09ea4d5 100644 --- a/ui/js/page/channel/view.jsx +++ b/ui/js/page/channel/view.jsx @@ -27,11 +27,11 @@ class ChannelPage extends React.Component{ let contentList if (claimsInChannel === undefined) { - contentList = + contentList = } else if (claimsInChannel) { contentList = claimsInChannel.length ? claimsInChannel.map((claim) => ) : - No content found. + {__("No content found.")} } return
@@ -41,11 +41,11 @@ class ChannelPage extends React.Component{

- This channel page is a stub. + {__("This channel page is a stub.")}

-

Published Content

+

{__("Published Content")}

{contentList}
} diff --git a/ui/js/page/developer.js b/ui/js/page/developer.js index 9e7175fd3..4ac1a133b 100644 --- a/ui/js/page/developer.js +++ b/ui/js/page/developer.js @@ -63,17 +63,17 @@ class DeveloperPage extends React.Component { return (
-

Developer Settings

+

{__("Developer Settings")}

- +
- +
{this.state.useCustomLighthouseServers ?
@@ -83,7 +83,7 @@ class DeveloperPage extends React.Component {
{ this.handleUpgradeFileChange() }}/>   - { this.handleForceUpgradeClick() }} /> + { this.handleForceUpgradeClick() }} />
diff --git a/ui/js/page/discover/view.jsx b/ui/js/page/discover/view.jsx index 10e8309c9..fff8663b8 100644 --- a/ui/js/page/discover/view.jsx +++ b/ui/js/page/discover/view.jsx @@ -38,7 +38,7 @@ class DiscoverPage extends React.Component{
{ fetchingFeaturedUris && - + } { typeof featuredUris === "object" && @@ -48,7 +48,7 @@ class DiscoverPage extends React.Component{ } { typeof featuredUris !== undefined && -
Failed to load landing content.
+
{__("Failed to load landing content.")}
}
) diff --git a/ui/js/page/fileListDownloaded/view.jsx b/ui/js/page/fileListDownloaded/view.jsx index 670b27191..df763195b 100644 --- a/ui/js/page/fileListDownloaded/view.jsx +++ b/ui/js/page/fileListDownloaded/view.jsx @@ -27,9 +27,9 @@ class FileListDownloaded extends React.Component { content = } else { if (isPending) { - content = + content = } else { - content = You haven't downloaded anything from LBRY yet. Go navigate('/discover')} label="search for your first download" />! + content = {__("You haven't downloaded anything from LBRY yet. Go")} navigate('/discover')} label={__("search for your first download")} />! } } diff --git a/ui/js/page/fileListPublished/view.jsx b/ui/js/page/fileListPublished/view.jsx index 1fe0ac592..bf1374a45 100644 --- a/ui/js/page/fileListPublished/view.jsx +++ b/ui/js/page/fileListPublished/view.jsx @@ -49,9 +49,9 @@ class FileListPublished extends React.Component { content = } else { if (isPending) { - content = + content = } else { - content = It looks like you haven't published anything to LBRY yet. Go navigate('/publish')} label="share your beautiful cats with the world" />! + content = {__("It looks like you haven't published anything to LBRY yet. Go")} navigate('/publish')} label={__("share your beautiful cats with the world")} />! } } diff --git a/ui/js/page/filePage/view.jsx b/ui/js/page/filePage/view.jsx index e7a1e2068..87c96c0cd 100644 --- a/ui/js/page/filePage/view.jsx +++ b/ui/js/page/filePage/view.jsx @@ -26,16 +26,16 @@ const FormatItem = (props) => { - + - + - + - +
Content-Type{mediaType}{__("Content-Type")}{mediaType}
Author{author}{__("Author")}{author}
Language{language}{__("Language")}{language}
License{license}{__("License")}{license}
@@ -75,7 +75,7 @@ class FilePage extends React.Component{ } = this.props if (!claim || !metadata) { - return Empty claim or metadata info. + return {__("Empty claim or metadata info.")} } const { @@ -124,7 +124,7 @@ class FilePage extends React.Component{ : '' }
- +
@@ -132,4 +132,4 @@ class FilePage extends React.Component{ } } -export default FilePage; \ No newline at end of file +export default FilePage; diff --git a/ui/js/page/start.js b/ui/js/page/start.js index c3af27817..3caf500a5 100644 --- a/ui/js/page/start.js +++ b/ui/js/page/start.js @@ -9,8 +9,8 @@ class StartPage extends React.Component { render() { return (
-

__("LBRY is Closed")

- +

{__("LBRY is Closed")}

+
); } diff --git a/ui/js/selectors/app.js b/ui/js/selectors/app.js index 25ed2403c..9509f8f7a 100644 --- a/ui/js/selectors/app.js +++ b/ui/js/selectors/app.js @@ -39,13 +39,13 @@ export const selectPageTitle = createSelector( (page, params) => { switch (page) { case 'search': - return params.query ? `Search results for ${params.query}` : 'Search' + return params.query ? __("Search results for %s", params.query) : __('Search') case 'settings': - return 'Settings' + return __('Settings') case 'help': - return 'Help' + return __('Help') case 'report': - return 'Report' + return __('Report') case 'wallet': case 'send': case 'receive': @@ -54,19 +54,19 @@ export const selectPageTitle = createSelector( case 'show': return lbryuri.normalize(params.uri) case 'downloaded': - return 'Downloads & Purchases' + return __('Downloads & Purchases') case 'published': - return 'Publishes' + return __('Publishes') case 'start': - return 'Start' + return __('Start') case 'publish': - return 'Publish' + return __('Publish') case 'help': - return 'Help' + return __('Help') case 'developer': - return 'Developer' + return __('Developer') case 'discover': - return 'Home' + return __('Home') default: return ''; } @@ -142,22 +142,22 @@ export const selectHeaderLinks = createSelector( case 'receive': case 'rewards': return { - 'wallet': 'Overview', - 'send': 'Send', - 'receive': 'Receive', - 'rewards': 'Rewards', + 'wallet': __('Overview'), + 'send': __('Send'), + 'receive': __('Receive'), + 'rewards': __('Rewards'), }; case 'downloaded': case 'published': return { - 'downloaded': 'Downloaded', - 'published': 'Published', + 'downloaded': __('Downloaded'), + 'published': __('Published'), }; case 'settings': case 'help': return { - 'settings': 'Settings', - 'help': 'Help', + 'settings': __('Settings'), + 'help': __('Help'), } default: return null; @@ -203,4 +203,4 @@ export const selectSnackBar = createSelector( export const selectSnackBarSnacks = createSelector( selectSnackBar, (snackBar) => snackBar.snacks || [] -) \ No newline at end of file +)