filaActions and fileCard components translated
This commit is contained in:
parent
a000058bf6
commit
0119ed8edc
3 changed files with 51 additions and 26 deletions
|
@ -192,5 +192,31 @@
|
|||
"submit an issue on GitHub": "submit an issue on GitHub",
|
||||
"Bug report submitted": "Bug report submitted",
|
||||
"Your bug report has been submitted! Thank you for your feedback.": "Your bug report has been submitted! Thank you for your feedback.",
|
||||
"Balance": "Balance"
|
||||
}
|
||||
"Balance": "Balance",
|
||||
"Open in Folder": "Open in Folder",
|
||||
"Checking availability": "Checking availability",
|
||||
"Confirm Purchase": "Confirm Purchase",
|
||||
"This will purchase": "This will purchase",
|
||||
"for": "for",
|
||||
"credits": "credits",
|
||||
"Not enough credits": "Not enough credits",
|
||||
"You don't have enough LBRY credits to pay for this stream.": "You don't have enough LBRY credits to pay for this stream.",
|
||||
"Download failed": "Download failed",
|
||||
"LBRY was unable to download the stream": "LBRY was unable to download the stream",
|
||||
"Remove": "Remove",
|
||||
"Are you sure you'd like to remove": "Are you sure you'd like to remove",
|
||||
"from LBRY?": "from LBRY?",
|
||||
"Delete this file from my computer": "Delete this file from my computer",
|
||||
"Download": "Download",
|
||||
"Content unavailable.": "Content unavailable.",
|
||||
"Why?": "Why?",
|
||||
"The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment.": "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": "Try Anyway",
|
||||
"Open": "Open",
|
||||
"Remove...": "Remove...",
|
||||
"% complete": "% complete",
|
||||
"Loading...": "Loading...",
|
||||
"Empty claim or metadata info.": "Empty claim or metadata info.",
|
||||
"This content is Not Safe For Work. To view adult content, please change your": "This content is Not Safe For Work. To view adult content, please change your",
|
||||
"This address contains no content.": "This address contains no content."
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class FileActions extends React.Component {
|
|||
|
||||
const deleteChecked = this.state.deleteChecked,
|
||||
metadata = fileInfo ? fileInfo.metadata : null,
|
||||
openInFolderMessage = platform.startsWith('Mac') ? 'Open in Finder' : 'Open in Folder',
|
||||
openInFolderMessage = platform.startsWith('Mac') ? __('Open in Finder') : __('Open in Folder'),
|
||||
showMenu = fileInfo && Object.keys(fileInfo).length > 0,
|
||||
title = metadata ? metadata.title : uri;
|
||||
|
||||
|
@ -76,7 +76,7 @@ class FileActions extends React.Component {
|
|||
|
||||
const
|
||||
progress = (fileInfo && fileInfo.written_bytes) ? fileInfo.written_bytes / fileInfo.total_bytes * 100 : 0,
|
||||
label = fileInfo ? progress.toFixed(0) + '% complete' : 'Connecting...',
|
||||
label = fileInfo ? progress.toFixed(0) + __('% complete') : __('Connecting...'),
|
||||
labelWithIcon = <span className="button__content"><Icon icon="icon-download" /><span>{label}</span></span>;
|
||||
|
||||
content = <div className="faux-button-block file-actions__download-status-bar button-set-item">
|
||||
|
@ -86,24 +86,24 @@ class FileActions extends React.Component {
|
|||
|
||||
} else if (!fileInfo && isAvailable === undefined) {
|
||||
|
||||
content = <BusyMessage message="Checking availability" />
|
||||
content = <BusyMessage message={__("Checking availability")} />
|
||||
|
||||
} else if (!fileInfo && !isAvailable && !this.state.forceShowActions) {
|
||||
|
||||
content = <div>
|
||||
<div className="button-set-item empty">Content unavailable.</div>
|
||||
<ToolTip label="Why?"
|
||||
body="The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment."
|
||||
<div className="button-set-item empty">{__("Content unavailable.")}</div>
|
||||
<ToolTip label={__("Why?")}
|
||||
body={__("The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment.")}
|
||||
className="button-set-item" />
|
||||
<Link label="Try Anyway" onClick={this.onShowFileActionsRowClicked.bind(this)} className="button-text button-set-item" />
|
||||
<Link label={__("Try Anyway")} onClick={this.onShowFileActionsRowClicked.bind(this)} className="button-text button-set-item" />
|
||||
</div>
|
||||
|
||||
} else if (fileInfo === null && !downloading) {
|
||||
|
||||
content = <Link button="text" label="Download" icon="icon-download" onClick={() => { startDownload(uri) } } />;
|
||||
content = <Link button="text" label={__("Download")} icon="icon-download" onClick={() => { startDownload(uri) } } />;
|
||||
|
||||
} else if (fileInfo && fileInfo.download_path) {
|
||||
content = <Link label="Open" button="text" icon="icon-folder-open" onClick={() => openInShell(fileInfo)} />;
|
||||
content = <Link label={__("Open")} button="text" icon="icon-folder-open" onClick={() => openInShell(fileInfo)} />;
|
||||
} else {
|
||||
console.log('handle this case of file action props?');
|
||||
console.log(this.props)
|
||||
|
@ -115,29 +115,29 @@ class FileActions extends React.Component {
|
|||
{ showMenu ?
|
||||
<DropDownMenu>
|
||||
<DropDownMenuItem key={0} onClick={() => openInFolder(fileInfo)} label={openInFolderMessage} />
|
||||
<DropDownMenuItem key={1} onClick={() => openModal('confirmRemove')} label="Remove..." />
|
||||
<DropDownMenuItem key={1} onClick={() => openModal('confirmRemove')} label={__("Remove...")} />
|
||||
</DropDownMenu> : '' }
|
||||
<Modal type="confirm" isOpen={modal == 'affirmPurchase'}
|
||||
contentLabel="Confirm Purchase" onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={this.props.closeModal}>
|
||||
This will purchase <strong>{title}</strong> for <strong><FilePrice uri={uri} look="plain" /></strong> credits.
|
||||
contentLabel={__("Confirm Purchase")} onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={this.props.closeModal}>
|
||||
{__("This will purchase")} <strong>{title}</strong> {__("for")} <strong><FilePrice uri={uri} look="plain" /></strong> {__("credits")}.
|
||||
</Modal>
|
||||
<Modal isOpen={modal == 'notEnoughCredits'} contentLabel="Not enough credits"
|
||||
<Modal isOpen={modal == 'notEnoughCredits'} contentLabel={__("Not enough credits")}
|
||||
onConfirmed={closeModal}>
|
||||
You don't have enough LBRY credits to pay for this stream.
|
||||
{__("You don't have enough LBRY credits to pay for this stream.")}
|
||||
</Modal>
|
||||
<Modal isOpen={modal == 'timedOut'} contentLabel="Download failed"
|
||||
<Modal isOpen={modal == 'timedOut'} contentLabel={__("Download failed")}
|
||||
onConfirmed={closeModal}>
|
||||
LBRY was unable to download the stream <strong>{uri}</strong>.
|
||||
{__("LBRY was unable to download the stream")} <strong>{uri}</strong>.
|
||||
</Modal>
|
||||
<Modal isOpen={modal == 'confirmRemove'}
|
||||
contentLabel="Not enough credits"
|
||||
contentLabel={__("Not enough credits")}
|
||||
type="confirm"
|
||||
confirmButtonLabel="Remove"
|
||||
confirmButtonLabel={__("Remove")}
|
||||
onConfirmed={() => deleteFile(fileInfo.outpoint, deleteChecked)}
|
||||
onAborted={closeModal}>
|
||||
<p>Are you sure you'd like to remove <cite>{title}</cite> from LBRY?</p>
|
||||
<p>{__("Are you sure you'd like to remove")} <cite>{title}</cite> {__("from LBRY?")}</p>
|
||||
|
||||
<label><FormField type="checkbox" checked={deleteChecked} onClick={this.handleDeleteCheckboxClicked.bind(this)} /> Delete this file from my computer</label>
|
||||
<label><FormField type="checkbox" checked={deleteChecked} onClick={this.handleDeleteCheckboxClicked.bind(this)} /> {__("Delete this file from my computer")}</label>
|
||||
</Modal>
|
||||
</section>
|
||||
);
|
||||
|
|
|
@ -68,11 +68,11 @@ class FileCard extends React.Component {
|
|||
|
||||
let description = ""
|
||||
if (isResolvingUri) {
|
||||
description = "Loading..."
|
||||
description = __("Loading...")
|
||||
} else if (metadata && metadata.description) {
|
||||
description = metadata.description
|
||||
} else if (claim === null) {
|
||||
description = 'This address contains no content.'
|
||||
description = __("This address contains no content.")
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -99,8 +99,7 @@ class FileCard extends React.Component {
|
|||
{obscureNsfw && this.state.hovered
|
||||
? <div className='card-overlay'>
|
||||
<p>
|
||||
This content is Not Safe For Work.
|
||||
To view adult content, please change your <Link className="button-text" onClick={() => navigate('settings')} label="Settings" />.
|
||||
{__("This content is Not Safe For Work. To view adult content, please change your")} <Link className="button-text" onClick={() => navigate('settings')} label={__("Settings")} />.
|
||||
</p>
|
||||
</div>
|
||||
: null}
|
||||
|
|
Loading…
Reference in a new issue