From f4ef5e89907a9bca55e56e6080cd373df4f46583 Mon Sep 17 00:00:00 2001 From: Eva <42466980+po5@users.noreply.github.com> Date: Thu, 27 Apr 2023 14:51:50 +0200 Subject: [PATCH] fix: translate built-in menu titles (#539) --- scripts/uosc.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/uosc.lua b/scripts/uosc.lua index bebe670..84ca8a2 100644 --- a/scripts/uosc.lua +++ b/scripts/uosc.lua @@ -927,21 +927,21 @@ for _, loader in ipairs(track_loaders) do open_file_navigation_menu( path, 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 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( - '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( - '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({ - title = 'Playlist', + title = t('Playlist'), type = 'playlist', list_prop = '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, })) bind_command('chapters', create_self_updating_menu_opener({ - title = 'Chapters', + title = t('Chapters'), type = 'chapters', list_prop = 'chapter-list', 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, })) bind_command('editions', create_self_updating_menu_opener({ - title = 'Editions', + title = t('Editions'), type = 'editions', list_prop = 'edition-list', 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} 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) -- Reload the video to apply new format @@ -1162,7 +1162,7 @@ bind_command('delete-file-quit', function() mp.command('quit') end) bind_command('audio-device', create_self_updating_menu_opener({ - title = 'Audio devices', + title = t('Audio devices'), type = 'audio-device-list', list_prop = 'audio-device-list', active_prop = 'audio-device',