diff --git a/static/app-strings.json b/static/app-strings.json index 3b613400d..390d654ff 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1988,5 +1988,11 @@ "Chat": "Chat", "Tipped": "Tipped", "Fromage": "Fromage", + "added to": "added to", + "Item %action% Watch Later": "Item %action% Watch Later", + "In Watch Later": "In Watch Later", + "Item added to Watch Later": "Item added to Watch Later", + "Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon", + "Clear Edits": "Clear Edits", "--end--": "--end--" } diff --git a/ui/component/collectionEdit/index.js b/ui/component/collectionEdit/index.js index 74201b09c..1ff4e0d7c 100644 --- a/ui/component/collectionEdit/index.js +++ b/ui/component/collectionEdit/index.js @@ -11,11 +11,11 @@ import { selectUpdatingCollection, selectCreateCollectionError, selectBalance, - doClearCollectionErrors, selectCreatingCollection, makeSelectCollectionForId, makeSelectUrlsForCollectionId, makeSelectClaimIdsForCollectionId, + ACTIONS as LBRY_REDUX_ACTIONS, } from 'lbry-redux'; import { doOpenModal } from 'redux/actions/app'; @@ -47,7 +47,7 @@ const perform = (dispatch) => ({ openModal: (modal, props) => dispatch(doOpenModal(modal, props)), publishCollectionUpdate: (params) => dispatch(doCollectionPublishUpdate(params)), publishCollection: (params, collectionId) => dispatch(doCollectionPublish(params, collectionId)), - clearCollectionErrors: () => dispatch(doClearCollectionErrors()), + clearCollectionErrors: () => dispatch({ type: LBRY_REDUX_ACTIONS.CLEAR_COLLECTION_ERRORS }), }); export default connect(select, perform)(CollectionPage); diff --git a/ui/component/collectionEdit/view.jsx b/ui/component/collectionEdit/view.jsx index 00665ac6e..528ebf4a8 100644 --- a/ui/component/collectionEdit/view.jsx +++ b/ui/component/collectionEdit/view.jsx @@ -21,6 +21,7 @@ import { INVALID_NAME_ERROR } from 'constants/claim'; import SUPPORTED_LANGUAGES from 'constants/supported_languages'; import * as PAGES from 'constants/pages'; import analytics from 'analytics'; +import * as ICONS from '../../constants/icons'; const LANG_NONE = 'none'; const MAX_TAG_SELECT = 5; @@ -86,6 +87,7 @@ function CollectionForm(props: Props) { collection, collectionUrls, collectionClaimIds, + clearCollectionErrors, } = props; const activeChannelName = activeChannelClaim && activeChannelClaim.name; let prefix = IS_WEB ? `${DOMAIN}/` : 'lbry://'; @@ -163,6 +165,7 @@ function CollectionForm(props: Props) { React.useEffect(() => { const collectionClaimIds = JSON.parse(collectionClaimIdsString); setParams({ ...params, claims: collectionClaimIds }); + clearCollectionErrors(); }, [collectionClaimIdsString, setParams]); function handleLanguageChange(index, code) { @@ -228,12 +231,16 @@ function CollectionForm(props: Props) { setParams({ ...params, channel_id: activeChannelId }); } }, [activeChannelId, incognito, setParams]); + const itemError = !params.claims.length ? __('Cannot publish empty list') : ''; const submitError = nameError || bidError || itemError || updateError || createError; return ( <>
+
+
{__('General')} diff --git a/ui/component/collectionsListMine/view.jsx b/ui/component/collectionsListMine/view.jsx index f44c18652..0f870dbf4 100644 --- a/ui/component/collectionsListMine/view.jsx +++ b/ui/component/collectionsListMine/view.jsx @@ -66,7 +66,7 @@ export default function CollectionsListMine(props: Props) { navigate={`/$/${PAGES.LIST}/${list.id}`} label={ - {list.name} + {__(`${list.name}`)}
{itemUrls.length} @@ -80,7 +80,7 @@ export default function CollectionsListMine(props: Props) { )} {!(itemUrls && itemUrls.length) && (

- {__('%collection_name%', { collection_name: list.name })}{' '} + {__(`${list.name}`)}
(Empty)

)} diff --git a/ui/component/selectAsset/view.jsx b/ui/component/selectAsset/view.jsx index f04c3539d..124edeedd 100644 --- a/ui/component/selectAsset/view.jsx +++ b/ui/component/selectAsset/view.jsx @@ -80,7 +80,7 @@ function SelectAsset(props: Props) { } // Note for translators: e.g. "Thumbnail (1:1)" - const label = __('%image_type% %recommended_ratio%', { image_type: assetName, recommended_ratio: recommended }); + const label = `${__(assetName)} ${__(recommended)}`; const selectFileLabel = __('Select File'); const selectedLabel = pathSelected ? __('URL Selected') : __('File Selected'); @@ -89,10 +89,7 @@ function SelectAsset(props: Props) { fileSelectorLabel = __('Uploading...'); } else { // Include the same label/recommendation for both 'URL' and 'UPLOAD'. - fileSelectorLabel = __('%label% • %status%', { - label: label, - status: fileSelected || pathSelected ? selectedLabel : selectFileLabel, - }); + fileSelectorLabel = `${label} ${fileSelected || pathSelected ? __(selectedLabel) : __(selectFileLabel)}`; } const formBody = ( <>