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",
"Skip Navigation": "Skip Navigation",
"In Favorites": "In Favorites",
"%title% by %channelTitle%, %mediaDuration%": "%title% by %channelTitle%, %mediaDuration%",
"%title% by %channelTitle%": "%title% by %channelTitle%",
"by %channelTitle%": "by %channelTitle%",
"--end--": "--end--"
}

View file

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