Locale for context menu (#337)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2024-03-23 14:30:32 -04:00
1 parent 25330a6494
commit 615439650e
13 files changed
+180 -38

No files matched your search

@@ -145,25 +145,25 @@ function GetContextMenuOptionsForItem(rowItem as object) as object
options = []
if rowItem.type = "video"
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayVideo", [rowItem]))
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueueVideo", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.PlayVideo), m.videoQueue, "FuncPlayVideo", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.QueueVideo), m.videoQueue, "FuncAddToQueueVideo", [rowItem]))
authorId = rowItem.authorId
if not StringUtils.IsNullOrEmpty(authorId)
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenVideoChannel", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenChannel), m.top, "OpenVideoChannel", [rowItem]))
end if
else if rowItem.type = "playlist"
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayPlaylist", [rowItem, 0]))
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueuePlaylist", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.PlayPlaylist), m.videoQueue, "FuncPlayPlaylist", [rowItem, 0]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.QueuePlaylist), m.videoQueue, "FuncAddToQueuePlaylist", [rowItem]))
options.push(ContextMenuUtils.CreateOption("Open playlist", m.top, "OpenPlaylist", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenPlaylist), m.top, "OpenPlaylist", [rowItem]))
authorId = rowItem.authorId
if not StringUtils.IsNullOrEmpty(authorId)
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenChannel), m.top, "OpenPlaylistChannel", [rowItem]))
end if
else if rowItem.type = "channel"
options.push(ContextMenuUtils.CreateOption("Open", m.top, "OpenChannel", [rowItem]))
options.push(ContextMenuUtils.CreateOption(Tr(Locale.ContextMenu.OpenChannel), m.top, "OpenChannel", [rowItem]))
else
LogWarn("Unknown long pressed item type:", rowItem.type)
return []
@@ -10,7 +10,7 @@ function VideoRowListContentTask(input as object)
for each feed in feeds
feedContentNode = CreateObject("roSGNode", "FeedContentNode")
feedContentNode.title = Tr(feed.title)
feedContentNode.title = feed.title
feedContentNode.feedSourcesIndex = 0
feedContentNode.loadState = FeedLoadState.None
feedSources = feed.feedSources