simplify localization of claim-preview aria-label

This commit is contained in:
btzr-io 2021-07-15 19:13:54 -05:00
parent 60c5d3bf67
commit d56b32ff19
2 changed files with 6 additions and 7 deletions

View file

@ -2054,7 +2054,6 @@
"Item removed from Watch Later": "Item removed from Watch Later", "Item removed from Watch Later": "Item removed from Watch Later",
"Skip Navigation": "Skip Navigation", "Skip Navigation": "Skip Navigation",
"In Favorites": "In Favorites", "In Favorites": "In Favorites",
"%title% by %channelTitle%, %mediaDuration%": "%title% by %channelTitle%, %mediaDuration%", "by %channelTitle%": "by %channelTitle%",
"%title% by %channelTitle%": "%title% by %channelTitle%",
"--end--": "--end--" "--end--": "--end--"
} }

View file

@ -122,11 +122,11 @@ function ClaimPreviewTile(props: Props) {
let ariaLabelData = title; let ariaLabelData = title;
if (!isChannel && channelTitle) { if (!isChannel && channelTitle) {
if (mediaDuration) { ariaLabelData += ' ' + __('by %channelTitle%', { channelTitle });
ariaLabelData = __('%title% by %channelTitle%, %mediaDuration%', { title, channelTitle, mediaDuration }); }
} else {
ariaLabelData = __('%title% by %channelTitle%', { title, channelTitle }); if (mediaDuration) {
} ariaLabelData += ' ' + mediaDuration;
} }
function handleClick(e) { function handleClick(e) {