fix: translate built-in menu titles (#539)
This commit is contained in:
@@ -927,21 +927,21 @@ for _, loader in ipairs(track_loaders) do
|
|||||||
open_file_navigation_menu(
|
open_file_navigation_menu(
|
||||||
path,
|
path,
|
||||||
function(path) mp.commandv(loader.prop .. '-add', path) end,
|
function(path) mp.commandv(loader.prop .. '-add', path) end,
|
||||||
{type = menu_type, title = 'Load ' .. loader.name, allowed_types = loader.allowed_types}
|
{type = menu_type, title = t('Load ' .. loader.name), allowed_types = loader.allowed_types}
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
bind_command('subtitles', create_select_tracklist_type_menu_opener(
|
bind_command('subtitles', create_select_tracklist_type_menu_opener(
|
||||||
'Subtitles', 'sub', 'sid', 'script-binding uosc/load-subtitles'
|
t('Subtitles'), 'sub', 'sid', 'script-binding uosc/load-subtitles'
|
||||||
))
|
))
|
||||||
bind_command('audio', create_select_tracklist_type_menu_opener(
|
bind_command('audio', create_select_tracklist_type_menu_opener(
|
||||||
'Audio', 'audio', 'aid', 'script-binding uosc/load-audio'
|
t('Audio'), 'audio', 'aid', 'script-binding uosc/load-audio'
|
||||||
))
|
))
|
||||||
bind_command('video', create_select_tracklist_type_menu_opener(
|
bind_command('video', create_select_tracklist_type_menu_opener(
|
||||||
'Video', 'video', 'vid', 'script-binding uosc/load-video'
|
t('Video'), 'video', 'vid', 'script-binding uosc/load-video'
|
||||||
))
|
))
|
||||||
bind_command('playlist', create_self_updating_menu_opener({
|
bind_command('playlist', create_self_updating_menu_opener({
|
||||||
title = 'Playlist',
|
title = t('Playlist'),
|
||||||
type = 'playlist',
|
type = 'playlist',
|
||||||
list_prop = 'playlist',
|
list_prop = 'playlist',
|
||||||
serializer = function(playlist)
|
serializer = function(playlist)
|
||||||
@@ -965,7 +965,7 @@ bind_command('playlist', create_self_updating_menu_opener({
|
|||||||
on_delete_item = function(index) mp.commandv('playlist-remove', tostring(index - 1)) end,
|
on_delete_item = function(index) mp.commandv('playlist-remove', tostring(index - 1)) end,
|
||||||
}))
|
}))
|
||||||
bind_command('chapters', create_self_updating_menu_opener({
|
bind_command('chapters', create_self_updating_menu_opener({
|
||||||
title = 'Chapters',
|
title = t('Chapters'),
|
||||||
type = 'chapters',
|
type = 'chapters',
|
||||||
list_prop = 'chapter-list',
|
list_prop = 'chapter-list',
|
||||||
active_prop = 'chapter',
|
active_prop = 'chapter',
|
||||||
@@ -985,7 +985,7 @@ bind_command('chapters', create_self_updating_menu_opener({
|
|||||||
on_select = function(index) mp.commandv('set', 'chapter', tostring(index - 1)) end,
|
on_select = function(index) mp.commandv('set', 'chapter', tostring(index - 1)) end,
|
||||||
}))
|
}))
|
||||||
bind_command('editions', create_self_updating_menu_opener({
|
bind_command('editions', create_self_updating_menu_opener({
|
||||||
title = 'Editions',
|
title = t('Editions'),
|
||||||
type = 'editions',
|
type = 'editions',
|
||||||
list_prop = 'edition-list',
|
list_prop = 'edition-list',
|
||||||
active_prop = 'current-edition',
|
active_prop = 'current-edition',
|
||||||
@@ -1032,7 +1032,7 @@ bind_command('stream-quality', function()
|
|||||||
items[#items + 1] = {title = height .. 'p', value = format, active = format == ytdl_format}
|
items[#items + 1] = {title = height .. 'p', value = format, active = format == ytdl_format}
|
||||||
end
|
end
|
||||||
|
|
||||||
Menu:open({type = 'stream-quality', title = 'Stream quality', items = items}, function(format)
|
Menu:open({type = 'stream-quality', title = t('Stream quality'), items = items}, function(format)
|
||||||
mp.set_property('ytdl-format', format)
|
mp.set_property('ytdl-format', format)
|
||||||
|
|
||||||
-- Reload the video to apply new format
|
-- Reload the video to apply new format
|
||||||
@@ -1162,7 +1162,7 @@ bind_command('delete-file-quit', function()
|
|||||||
mp.command('quit')
|
mp.command('quit')
|
||||||
end)
|
end)
|
||||||
bind_command('audio-device', create_self_updating_menu_opener({
|
bind_command('audio-device', create_self_updating_menu_opener({
|
||||||
title = 'Audio devices',
|
title = t('Audio devices'),
|
||||||
type = 'audio-device-list',
|
type = 'audio-device-list',
|
||||||
list_prop = 'audio-device-list',
|
list_prop = 'audio-device-list',
|
||||||
active_prop = 'audio-device',
|
active_prop = 'audio-device',
|
||||||
|
Reference in New Issue
Block a user