diff --git a/src/ui/component/publishFormErrors/view.jsx b/src/ui/component/publishFormErrors/view.jsx index fa7792591..914236a54 100644 --- a/src/ui/component/publishFormErrors/view.jsx +++ b/src/ui/component/publishFormErrors/view.jsx @@ -1,7 +1,6 @@ // @flow import React from 'react'; import { THUMBNAIL_STATUSES, isNameValid } from 'lbry-redux'; -import { INVALID_NAME_ERROR } from 'constants/claim'; type Props = { title: ?string, @@ -22,7 +21,7 @@ function PublishFormErrors(props: Props) {
{!title &&
{__('A title is required')}
} {!name &&
{__('A URL is required')}
} - {!isNameValid(name, false) && INVALID_NAME_ERROR} + {!isNameValid(name, false) && __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)')} {!bid &&
{__('A deposit amount is required')}
} {uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
{__('Please wait for thumbnail to finish uploading')}
diff --git a/src/ui/component/publishName/view.jsx b/src/ui/component/publishName/view.jsx index 0cf148028..1f5326063 100644 --- a/src/ui/component/publishName/view.jsx +++ b/src/ui/component/publishName/view.jsx @@ -1,5 +1,5 @@ // @flow -import { CHANNEL_NEW, CHANNEL_ANONYMOUS, MINIMUM_PUBLISH_BID, INVALID_NAME_ERROR } from 'constants/claim'; +import { CHANNEL_NEW, CHANNEL_ANONYMOUS, MINIMUM_PUBLISH_BID } from 'constants/claim'; import React, { useState, useEffect } from 'react'; import { isNameValid } from 'lbry-redux'; import { FormField } from 'component/common/form'; @@ -50,7 +50,7 @@ function PublishName(props: Props) { if (!name) { nameError = __('A name is required'); } else if (!isNameValid(name, false)) { - nameError = INVALID_NAME_ERROR; + nameError = __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)'); } setNameError(nameError); diff --git a/src/ui/component/selectChannel/view.jsx b/src/ui/component/selectChannel/view.jsx index a5eb12c4c..51b1e4a70 100644 --- a/src/ui/component/selectChannel/view.jsx +++ b/src/ui/component/selectChannel/view.jsx @@ -4,7 +4,7 @@ import { isNameValid } from 'lbry-redux'; import { FormField } from 'component/common/form'; import BusyIndicator from 'component/common/busy-indicator'; import Button from 'component/button'; -import { CHANNEL_NEW, CHANNEL_ANONYMOUS, INVALID_NAME_ERROR } from 'constants/claim'; +import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim'; type Props = { channel: string, // currently selected channel @@ -77,7 +77,7 @@ class ChannelSection extends React.PureComponent { let newChannelNameError; if (newChannelName.length > 0 && !isNameValid(newChannelName, false)) { - newChannelNameError = INVALID_NAME_ERROR; + newChannelNameError = __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)'); } this.setState({ diff --git a/src/ui/component/userFirstChannel/view.jsx b/src/ui/component/userFirstChannel/view.jsx index 6e5c623f1..8cc345d13 100644 --- a/src/ui/component/userFirstChannel/view.jsx +++ b/src/ui/component/userFirstChannel/view.jsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import { isNameValid } from 'lbry-redux'; import Button from 'component/button'; import { Form, FormField } from 'component/common/form'; -import { INVALID_NAME_ERROR } from 'constants/claim'; + export const DEFAULT_BID_FOR_FIRST_CHANNEL = 0.9; type Props = { @@ -29,7 +29,7 @@ function UserFirstChannel(props: Props) { const { value } = e.target; setChannel(value); if (!isNameValid(value, false)) { - setNameError(INVALID_NAME_ERROR); + setNameError(__('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)')); } else { setNameError(); } diff --git a/src/ui/constants/claim.js b/src/ui/constants/claim.js index 83f9fb9ea..4cf33ce09 100644 --- a/src/ui/constants/claim.js +++ b/src/ui/constants/claim.js @@ -3,6 +3,3 @@ export const MINIMUM_PUBLISH_BID = 0.00000001; export const CHANNEL_ANONYMOUS = 'anonymous'; export const CHANNEL_NEW = 'new'; export const PAGE_SIZE = 20; - -export const INVALID_NAME_ERROR = - __('LBRY names cannot contain spaces or reserved symbols') + ' ' + '($#@;/"<>%{}|^~[]`)'; diff --git a/static/app-strings.json b/static/app-strings.json index 54fd0600e..4468a7b20 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -773,8 +773,6 @@ "LBC Currently Staked": "LBC Currently Staked", "Your Supports": "Your Supports", "Add Tags": "Add Tags", - "Jeremy please change this": "Jeremy please change this", - "Jeremy please change this.": "Jeremy please change this.", "Extra Verification Needed": "Extra Verification Needed", "We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.": "We weren't able to auto-approve you for rewards. Please complete one of the steps below to unlock them.", "Proof via Text": "Proof via Text", @@ -809,8 +807,5 @@ "I am over the age of 13 and agree to the %terms%.": "I am over the age of 13 and agree to the %terms%.", "Nothing published to LBRY yet.": "Nothing published to LBRY yet.", "Add a tag": "Add a tag", - "Claim Your 20 LBC Invite Reward": "Claim Your 20 LBC Invite Reward", - "Publish something totally wacky and wild.": "Publish something totally wacky and wild.", - "LBRY names cannot contain spaces or reserved symbols": "LBRY names cannot contain spaces or reserved symbols", - "If you bid more than %amount% LBC, when someone navigates to %uri%, it will load your published content. However, you can get a longer version of this URL for any bid.": "If you bid more than %amount% LBC, when someone navigates to %uri%, it will load your published content. However, you can get a longer version of this URL for any bid." -} \ No newline at end of file + "Claim Your 20 LBC Invite Reward": "Claim Your 20 LBC Invite Reward" +}