Fix 'Favorites' string issue
Renamed variables for clarity while at it. "Item added to %name%" is probably redundant due to toast passing through <i18nMessage>, causing a double translation. Anyway, added all the resolved string for now to avoid them popping up in app-string during development.
This commit is contained in:
parent
9d663b3789
commit
19091f249a
3 changed files with 23 additions and 18 deletions
|
@ -378,8 +378,6 @@
|
|||
"Unfollow": "Unfollow",
|
||||
"Follow @%channelName%": "Follow @%channelName%",
|
||||
"Unfollow @%channelName%": "Unfollow @%channelName%",
|
||||
"Item removed from %name%": "Item removed from %name%",
|
||||
"Item added to %name%": "Item added to %name%",
|
||||
"These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.": "These LBRY Credits remain yours. It is a deposit to reserve the name and can be undone at any time.",
|
||||
"Create channel": "Create channel",
|
||||
"Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.": "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.",
|
||||
|
@ -2030,10 +2028,12 @@
|
|||
"Remove from Watch Later": "Remove from Watch Later",
|
||||
"Add to Watch Later": "Add to Watch Later",
|
||||
"Added": "Added",
|
||||
"Item removed from %name%": "Item removed from %name%",
|
||||
"Item added to %name%": "Item added to %name%",
|
||||
"Item added to Watch Later": "Item added to Watch Later",
|
||||
"Item removed from Watch Later": "Item removed from Watch Later",
|
||||
"Item added to %lastCollectionName%": "Item added to %lastCollectionName%",
|
||||
"Item removed from %lastCollectionName%": "Item removed from %lastCollectionName%",
|
||||
"Item added to Favorites": "Item added to Favorites",
|
||||
"Item removed from Favorites": "Item removed from Favorites",
|
||||
"Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon",
|
||||
"Clear Edits": "Clear Edits",
|
||||
"Something not quite right..": "Something not quite right..",
|
||||
|
|
|
@ -46,8 +46,14 @@ const select = (state, props) => {
|
|||
contentSigningChannel,
|
||||
contentChannelUri,
|
||||
claimIsMine: makeSelectSigningIsMine(props.uri)(state),
|
||||
hasClaimInWatchLater: makeSelectCollectionForIdHasClaimUrl(COLLECTIONS_CONSTS.WATCH_LATER_ID, contentPermanentUri)(state),
|
||||
hasClaimInCustom: makeSelectCollectionForIdHasClaimUrl(COLLECTIONS_CONSTS.FAVORITES_ID, contentPermanentUri)(state),
|
||||
hasClaimInWatchLater: makeSelectCollectionForIdHasClaimUrl(
|
||||
COLLECTIONS_CONSTS.WATCH_LATER_ID,
|
||||
contentPermanentUri
|
||||
)(state),
|
||||
hasClaimInFavorites: makeSelectCollectionForIdHasClaimUrl(
|
||||
COLLECTIONS_CONSTS.FAVORITES_ID,
|
||||
contentPermanentUri
|
||||
)(state),
|
||||
channelIsMuted: makeSelectChannelIsMuted(contentChannelUri)(state),
|
||||
channelIsBlocked: makeSelectChannelIsBlocked(contentChannelUri)(state),
|
||||
fileInfo: makeSelectFileInfoForUri(contentPermanentUri)(state),
|
||||
|
@ -78,8 +84,7 @@ const perform = (dispatch) => ({
|
|||
doChannelUnmute: (channelUri) => dispatch(doChannelUnmute(channelUri)),
|
||||
doCommentModBlock: (channelUri) => dispatch(doCommentModBlock(channelUri)),
|
||||
doCommentModUnBlock: (channelUri) => dispatch(doCommentModUnBlock(channelUri)),
|
||||
doCommentModBlockAsAdmin: (commenterUri, blockerId) =>
|
||||
dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)),
|
||||
doCommentModBlockAsAdmin: (commenterUri, blockerId) => dispatch(doCommentModBlockAsAdmin(commenterUri, blockerId)),
|
||||
doCommentModUnBlockAsAdmin: (commenterUri, blockerId) =>
|
||||
dispatch(doCommentModUnBlockAsAdmin(commenterUri, blockerId)),
|
||||
doChannelSubscribe: (subscription) => dispatch(doChannelSubscribe(subscription)),
|
||||
|
|
|
@ -12,7 +12,7 @@ import { useHistory } from 'react-router';
|
|||
import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux';
|
||||
|
||||
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
|
||||
const PAGE_VIEW_QUERY = `view`;
|
||||
const PAGE_VIEW_QUERY = 'view';
|
||||
const EDIT_PAGE = 'edit';
|
||||
|
||||
type SubscriptionArgs = {
|
||||
|
@ -42,7 +42,7 @@ type Props = {
|
|||
doCommentModUnBlockAsAdmin: (string, string) => void,
|
||||
doCollectionEdit: (string, any) => void,
|
||||
hasClaimInWatchLater: boolean,
|
||||
hasClaimInCustom: boolean,
|
||||
hasClaimInFavorites: boolean,
|
||||
claimInCollection: boolean,
|
||||
collectionId: string,
|
||||
isMyCollection: boolean,
|
||||
|
@ -80,7 +80,7 @@ function ClaimMenuList(props: Props) {
|
|||
doCommentModUnBlockAsAdmin,
|
||||
doCollectionEdit,
|
||||
hasClaimInWatchLater,
|
||||
hasClaimInCustom,
|
||||
hasClaimInFavorites,
|
||||
collectionId,
|
||||
isMyCollection,
|
||||
doToast,
|
||||
|
@ -105,8 +105,6 @@ function ClaimMenuList(props: Props) {
|
|||
: isSubscribed
|
||||
? __('Unfollow')
|
||||
: __('Follow');
|
||||
const lastCollectionName = 'Favorites';
|
||||
const lastCollectionId = COLLECTIONS_CONSTS.FAVORITES_ID;
|
||||
|
||||
const { push, replace } = useHistory();
|
||||
if (!claim) {
|
||||
|
@ -282,21 +280,23 @@ function ClaimMenuList(props: Props) {
|
|||
{/* WATCH LATER */}
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => handleAdd(hasClaimInWatchLater, 'Watch Later', COLLECTIONS_CONSTS.WATCH_LATER_ID)}
|
||||
onSelect={() =>
|
||||
handleAdd(hasClaimInWatchLater, __('Watch Later'), COLLECTIONS_CONSTS.WATCH_LATER_ID)
|
||||
}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={hasClaimInWatchLater ? ICONS.DELETE : ICONS.TIME} />
|
||||
{hasClaimInWatchLater ? __('In Watch Later') : __('Watch Later')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
{/* CUSTOM LIST */}
|
||||
{/* FAVORITES LIST */}
|
||||
<MenuItem
|
||||
className="comment__menu-option"
|
||||
onSelect={() => handleAdd(hasClaimInCustom, lastCollectionName, lastCollectionId)}
|
||||
onSelect={() => handleAdd(hasClaimInFavorites, __('Favorites'), COLLECTIONS_CONSTS.FAVORITES_ID)}
|
||||
>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={hasClaimInCustom ? ICONS.DELETE : ICONS.STAR} />
|
||||
{hasClaimInCustom ? __(`In ${lastCollectionName}`) : __(`${lastCollectionName}`)}
|
||||
<Icon aria-hidden icon={hasClaimInFavorites ? ICONS.DELETE : ICONS.STAR} />
|
||||
{hasClaimInFavorites ? __('In Favorites') : __('Favorites')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
{/* CURRENTLY ONLY SUPPORT PLAYLISTS FOR PLAYABLE; LATER DIFFERENT TYPES */}
|
||||
|
|
Loading…
Reference in a new issue