fix i18n on publish, error screen

This commit is contained in:
Jeremy Kauffman 2020-01-03 14:45:34 -05:00
parent 7527cef3fe
commit e991e48314
3 changed files with 29 additions and 22 deletions

View file

@ -165,10 +165,6 @@
"fee": "fee", "fee": "fee",
"Find New Tags To Follow": "Find New Tags To Follow", "Find New Tags To Follow": "Find New Tags To Follow",
"Aw shucks!": "Aw shucks!", "Aw shucks!": "Aw shucks!",
"There was an error. It's been reported and will be fixed": "There was an error. It's been reported and will be fixed",
"Try": "Try",
"refreshing the app": "refreshing the app",
"to fix it": "to fix it",
"Search": "Search", "Search": "Search",
"Starting up": "Starting up", "Starting up": "Starting up",
"Connecting": "Connecting", "Connecting": "Connecting",
@ -944,5 +940,7 @@
"Deposit cannot be higher than your balance": "Deposit cannot be higher than your balance", "Deposit cannot be higher than your balance": "Deposit cannot be higher than your balance",
"Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more about referrals.": "Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more about referrals.", "Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more about referrals.": "Earn %rewards_link% for inviting your friends. Read our %referral_faq_link% to learn more about referrals.",
"%view_count% Views": "%view_count% Views", "%view_count% Views": "%view_count% Views",
"1 View": "1 View" "1 View": "1 View",
} "There was an error. It's been reported and will be fixed. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R.": "There was an error. It's been reported and will be fixed. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R.",
"Upload your thumbnail to %speech_link%. Recommended size is 16:9.": "Upload your thumbnail to %speech_link%. Recommended size is 16:9."
}

View file

@ -1,12 +1,13 @@
// @flow // @flow
import type { Node } from 'react'; import type { Node } from 'react';
import React, { Fragment } from 'react'; import React from 'react';
import Yrbl from 'component/yrbl'; import Yrbl from 'component/yrbl';
import Button from 'component/button'; import Button from 'component/button';
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import Native from 'native'; import Native from 'native';
import { Lbry } from 'lbry-redux'; import { Lbry } from 'lbry-redux';
import analytics from 'analytics'; import analytics from 'analytics';
import I18nMessage from 'component/i18nMessage';
type Props = { type Props = {
children: Node, children: Node,
@ -69,16 +70,21 @@ class ErrorBoundary extends React.Component<Props, State> {
type="sad" type="sad"
title={__('Aw shucks!')} title={__('Aw shucks!')}
subtitle={ subtitle={
<Fragment> <I18nMessage
{__("There was an error. It's been reported and will be fixed")}. {__('Try')}{' '} tokens={{
<Button refreshing_the_app_link: (
button="link" <Button
className="load-screen__button" button="link"
label={__('refreshing the app')} className="load-screen__button"
onClick={this.refresh} label={__('refreshing the app')}
/>{' '} onClick={this.refresh}
{__("to fix it. If that doesn't work, press CMD/CTRL-R to reset to the homepage.")}. />
</Fragment> ),
}}
>
There was an error. It's been reported and will be fixed. Try %refreshing_the_app_link% to fix it. If
that doesn't work, try pressing Ctrl+R/Cmd+R.
</I18nMessage>
} }
/> />
</div> </div>

View file

@ -7,6 +7,7 @@ import FileSelector from 'component/common/file-selector';
import Button from 'component/button'; import Button from 'component/button';
import ThumbnailMissingImage from './thumbnail-missing.png'; import ThumbnailMissingImage from './thumbnail-missing.png';
import ThumbnailBrokenImage from './thumbnail-broken.png'; import ThumbnailBrokenImage from './thumbnail-broken.png';
import I18nMessage from 'component/i18nMessage';
type Props = { type Props = {
filePath: ?string, filePath: ?string,
@ -172,11 +173,13 @@ class SelectThumbnail extends React.PureComponent<Props, State> {
{status === THUMBNAIL_STATUSES.API_DOWN ? ( {status === THUMBNAIL_STATUSES.API_DOWN ? (
__('Enter a URL for your thumbnail.') __('Enter a URL for your thumbnail.')
) : ( ) : (
<React.Fragment> <I18nMessage
{__('Upload your thumbnail to')}{' '} tokens={{
<Button button="link" label={__('spee.ch')} href="https://spee.ch/about" />.{' '} speech_link: <Button button="link" label={__('spee.ch')} href="https://spee.ch/about" />,
{__('Recommended size is 16:9')} }}
</React.Fragment> >
Upload your thumbnail to %speech_link%. Recommended size is 16:9.
</I18nMessage>
)} )}
</p> </p>
</div> </div>