simplify localization of claim-preview aria-label
This commit is contained in:
parent
60c5d3bf67
commit
d56b32ff19
2 changed files with 6 additions and 7 deletions
|
@ -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--"
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue