scripts: translate user-visible strings in alsa.lua

This commit is contained in:
Pauli Virtanen 2022-04-09 14:27:42 +03:00
parent bbe9ac00f3
commit 6feecab74e
2 changed files with 4 additions and 2 deletions

View file

@ -8,6 +8,8 @@ function alsa_monitor.enable()
load_module("reserve-device") load_module("reserve-device")
end end
load_module("i18n")
load_monitor("alsa", { load_monitor("alsa", {
properties = alsa_monitor.properties, properties = alsa_monitor.properties,
rules = alsa_monitor.rules, rules = alsa_monitor.rules,

View file

@ -219,9 +219,9 @@ function prepareDevice(parent, id, type, factory, properties)
local c = properties["device.class"] local c = properties["device.class"]
if f == "internal" then if f == "internal" then
d = "Built-in Audio" d = I18n.gettext("Built-in Audio")
elseif c == "modem" then elseif c == "modem" then
d = "Modem" d = I18n.gettext("Modem")
end end
d = d or properties["device.product.name"] d = d or properties["device.product.name"]