mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
acp: make sure all descriptions are translated
This commit is contained in:
parent
09106151d3
commit
c90332a6bf
1 changed files with 9 additions and 3 deletions
|
|
@ -2839,7 +2839,7 @@ static int path_verify(pa_alsa_path *p) {
|
||||||
if (p->device_port_type == PA_DEVICE_PORT_TYPE_UNKNOWN)
|
if (p->device_port_type == PA_DEVICE_PORT_TYPE_UNKNOWN)
|
||||||
p->device_port_type = map->type;
|
p->device_port_type = map->type;
|
||||||
if (!p->description)
|
if (!p->description)
|
||||||
p->description = pa_xstrdup(map->description);
|
p->description = pa_xstrdup(_(map->description));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p->description) {
|
if (!p->description) {
|
||||||
|
|
@ -2946,6 +2946,12 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
|
||||||
if (path_verify(p) < 0)
|
if (path_verify(p) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
if (p->description) {
|
||||||
|
char *tmp = p->description;
|
||||||
|
p->description = pa_xstrdup(_(tmp));
|
||||||
|
free(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
@ -4130,10 +4136,10 @@ static int mapping_parse_description(pa_config_parser_state *state) {
|
||||||
|
|
||||||
if ((m = pa_alsa_mapping_get(ps, state->section))) {
|
if ((m = pa_alsa_mapping_get(ps, state->section))) {
|
||||||
pa_xfree(m->description);
|
pa_xfree(m->description);
|
||||||
m->description = pa_xstrdup(state->rvalue);
|
m->description = pa_xstrdup(_(state->rvalue));
|
||||||
} else if ((p = profile_get(ps, state->section))) {
|
} else if ((p = profile_get(ps, state->section))) {
|
||||||
pa_xfree(p->description);
|
pa_xfree(p->description);
|
||||||
p->description = pa_xstrdup(state->rvalue);
|
p->description = pa_xstrdup(_(state->rvalue));
|
||||||
} else {
|
} else {
|
||||||
pa_log("[%s:%u] Section name %s invalid.", state->filename, state->lineno, state->section);
|
pa_log("[%s:%u] Section name %s invalid.", state->filename, state->lineno, state->section);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue