fix translation string
This commit is contained in:
parent
54c09edec8
commit
208111caeb
6 changed files with 18 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { THUMBNAIL_STATUSES, isNameValid } from 'lbry-redux';
|
import { THUMBNAIL_STATUSES, isNameValid } from 'lbry-redux';
|
||||||
|
import { INVALID_NAME_ERROR } from 'constants/claim';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title: ?string,
|
title: ?string,
|
||||||
|
@ -21,7 +22,7 @@ function PublishFormErrors(props: Props) {
|
||||||
<div className="error-text">
|
<div className="error-text">
|
||||||
{!title && <div>{__('A title is required')}</div>}
|
{!title && <div>{__('A title is required')}</div>}
|
||||||
{!name && <div>{__('A URL is required')}</div>}
|
{!name && <div>{__('A URL is required')}</div>}
|
||||||
{!isNameValid(name, false) && __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)')}
|
{!isNameValid(name, false) && INVALID_NAME_ERROR}
|
||||||
{!bid && <div>{__('A deposit amount is required')}</div>}
|
{!bid && <div>{__('A deposit amount is required')}</div>}
|
||||||
{uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
|
{uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
|
||||||
<div>{__('Please wait for thumbnail to finish uploading')}</div>
|
<div>{__('Please wait for thumbnail to finish uploading')}</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { CHANNEL_NEW, CHANNEL_ANONYMOUS, MINIMUM_PUBLISH_BID } from 'constants/claim';
|
import { CHANNEL_NEW, CHANNEL_ANONYMOUS, MINIMUM_PUBLISH_BID, INVALID_NAME_ERROR } from 'constants/claim';
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { isNameValid } from 'lbry-redux';
|
import { isNameValid } from 'lbry-redux';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
|
@ -50,7 +50,7 @@ function PublishName(props: Props) {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
nameError = __('A name is required');
|
nameError = __('A name is required');
|
||||||
} else if (!isNameValid(name, false)) {
|
} else if (!isNameValid(name, false)) {
|
||||||
nameError = __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)');
|
nameError = INVALID_NAME_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
setNameError(nameError);
|
setNameError(nameError);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { isNameValid } from 'lbry-redux';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
import BusyIndicator from 'component/common/busy-indicator';
|
import BusyIndicator from 'component/common/busy-indicator';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim';
|
import { CHANNEL_NEW, CHANNEL_ANONYMOUS, INVALID_NAME_ERROR } from 'constants/claim';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
channel: string, // currently selected channel
|
channel: string, // currently selected channel
|
||||||
|
@ -77,7 +77,7 @@ class ChannelSection extends React.PureComponent<Props, State> {
|
||||||
|
|
||||||
let newChannelNameError;
|
let newChannelNameError;
|
||||||
if (newChannelName.length > 0 && !isNameValid(newChannelName, false)) {
|
if (newChannelName.length > 0 && !isNameValid(newChannelName, false)) {
|
||||||
newChannelNameError = __('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)');
|
newChannelNameError = INVALID_NAME_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
||||||
import { isNameValid } from 'lbry-redux';
|
import { isNameValid } from 'lbry-redux';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import { Form, FormField } from 'component/common/form';
|
import { Form, FormField } from 'component/common/form';
|
||||||
|
import { INVALID_NAME_ERROR } from 'constants/claim';
|
||||||
export const DEFAULT_BID_FOR_FIRST_CHANNEL = 0.9;
|
export const DEFAULT_BID_FOR_FIRST_CHANNEL = 0.9;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -29,7 +29,7 @@ function UserFirstChannel(props: Props) {
|
||||||
const { value } = e.target;
|
const { value } = e.target;
|
||||||
setChannel(value);
|
setChannel(value);
|
||||||
if (!isNameValid(value, false)) {
|
if (!isNameValid(value, false)) {
|
||||||
setNameError(__('LBRY names cannot contain spaces or reserved symbols ($#@;/"<>%{}|^~[]`)'));
|
setNameError(INVALID_NAME_ERROR);
|
||||||
} else {
|
} else {
|
||||||
setNameError();
|
setNameError();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,3 +3,6 @@ export const MINIMUM_PUBLISH_BID = 0.00000001;
|
||||||
export const CHANNEL_ANONYMOUS = 'anonymous';
|
export const CHANNEL_ANONYMOUS = 'anonymous';
|
||||||
export const CHANNEL_NEW = 'new';
|
export const CHANNEL_NEW = 'new';
|
||||||
export const PAGE_SIZE = 20;
|
export const PAGE_SIZE = 20;
|
||||||
|
|
||||||
|
export const INVALID_NAME_ERROR =
|
||||||
|
__('LBRY names cannot contain spaces or reserved symbols') + ' ' + '($#@;/"<>%{}|^~[]`)';
|
||||||
|
|
|
@ -773,6 +773,8 @@
|
||||||
"LBC Currently Staked": "LBC Currently Staked",
|
"LBC Currently Staked": "LBC Currently Staked",
|
||||||
"Your Supports": "Your Supports",
|
"Your Supports": "Your Supports",
|
||||||
"Add Tags": "Add Tags",
|
"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",
|
"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.",
|
"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",
|
"Proof via Text": "Proof via Text",
|
||||||
|
@ -807,5 +809,8 @@
|
||||||
"I am over the age of 13 and agree to the %terms%.": "I am over the age of 13 and agree to the %terms%.",
|
"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.",
|
"Nothing published to LBRY yet.": "Nothing published to LBRY yet.",
|
||||||
"Add a tag": "Add a tag",
|
"Add a tag": "Add a tag",
|
||||||
"Claim Your 20 LBC Invite Reward": "Claim Your 20 LBC Invite Reward"
|
"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."
|
||||||
}
|
}
|
Loading…
Reference in a new issue