From ff02e0452b77796a1663be2ba0b3ddbc55b197bc Mon Sep 17 00:00:00 2001 From: Intnick Date: Fri, 26 May 2017 09:02:37 +0200 Subject: [PATCH] filaActions and fileCard components translated --- app/locales/en.json | 28 ++++++++++++++++++- ui/js/component/fileActions/view.jsx | 40 ++++++++++++++-------------- ui/js/component/fileCard/view.jsx | 7 +++-- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/app/locales/en.json b/app/locales/en.json index c8629384a..7ffeee538 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -193,5 +193,31 @@ "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", + "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.", "Looking up version info": "Looking up version info" -} \ No newline at end of file +} diff --git a/ui/js/component/fileActions/view.jsx b/ui/js/component/fileActions/view.jsx index 4924d059d..f72893df1 100644 --- a/ui/js/component/fileActions/view.jsx +++ b/ui/js/component/fileActions/view.jsx @@ -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 = {label}; content =
@@ -86,24 +86,24 @@ class FileActions extends React.Component { } else if (!fileInfo && isAvailable === undefined) { - content = + content = } else if (!fileInfo && !isAvailable && !this.state.forceShowActions) { content =
-
Content unavailable.
- {__("Content unavailable.")}
+ - +
} else if (fileInfo === null && !downloading) { - content = { startDownload(uri) } } />; + content = { startDownload(uri) } } />; } else if (fileInfo && fileInfo.download_path) { - content = openInShell(fileInfo)} />; + content = 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 ? openInFolder(fileInfo)} label={openInFolderMessage} /> - openModal('confirmRemove')} label="Remove..." /> + openModal('confirmRemove')} label={__("Remove...")} /> : '' } - This will purchase {title} for credits. + contentLabel={__("Confirm Purchase")} onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={this.props.closeModal}> + {__("This will purchase")} {title} {__("for")} {__("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.")} - - LBRY was unable to download the stream {uri}. + {__("LBRY was unable to download the stream")} {uri}. deleteFile(fileInfo.outpoint, deleteChecked)} onAborted={closeModal}> -

Are you sure you'd like to remove {title} from LBRY?

+

{__("Are you sure you'd like to remove")} {title} {__("from LBRY?")}

- +
); diff --git a/ui/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx index 918476a53..d333c03c9 100644 --- a/ui/js/component/fileCard/view.jsx +++ b/ui/js/component/fileCard/view.jsx @@ -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 ?

- This content is Not Safe For Work. - To view adult content, please change your navigate('settings')} label="Settings" />. + {__("This content is Not Safe For Work. To view adult content, please change your")} navigate('settings')} label={__("Settings")} />.

: null}