Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: translate audio channels and devices list #520

Merged
merged 1 commit into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/uosc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ bind_command('audio-device', create_self_updating_menu_opener({
local hint = string.match(device.name, ao .. '/(.+)')
if not hint then hint = device.name end
items[#items + 1] = {
title = device.description,
title = device.description:sub(1, 7) == 'Default' and t('Default %s', device.description:sub(9)) or t(device.description),
hint = hint,
active = device.name == current_device,
value = device.name,
Expand Down
2 changes: 1 addition & 1 deletion scripts/uosc_shared/lib/menus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function create_select_tracklist_type_menu_opener(menu_title, track_type, track_
end
if track['demux-fps'] then h(string.format('%.5gfps', track['demux-fps'])) end
h(track.codec)
if track['audio-channels'] then h(track['audio-channels'] .. ' channels') end
if track['audio-channels'] then h(t('%d channels', track['audio-channels'])) end
if track['demux-samplerate'] then h(string.format('%.3gkHz', track['demux-samplerate'] / 1000)) end
if track.forced then h(t('forced')) end
if track.default then h(t('default')) end
Expand Down