xz: Translate error messages from lzma_str_to_filters()

liblzma doesn't use gettext but the messages are included in xz.pot,
so xz can translate the messages.
This commit is contained in:
Lasse Collin 2025-01-20 16:31:49 +02:00
parent f2e2b267ca
commit 713fdaa8b0
No known key found for this signature in database
GPG Key ID: 38EE757D69184620
1 changed files with 3 additions and 6 deletions

View File

@ -168,16 +168,13 @@ str_to_filters(const char *str, uint32_t index, uint32_t flags)
if (index > 0)
filter_num[0] = '0' + index;
// FIXME? The message in err isn't translated.
// Including the translations in the xz translations is
// slightly ugly but possible. Creating a new domain for
// liblzma might not be worth it especially since on some
// OSes it adds extra dependencies to translation libraries.
// liblzma doesn't translate the error messages but
// the messages are included in xz's translations.
message(V_ERROR, _("Error in --filters%s=FILTERS option:"),
filter_num);
message(V_ERROR, "%s", str);
message(V_ERROR, "%*s^", error_pos, "");
message_fatal("%s", err);
message_fatal("%s", _(err));
}
}