mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-26 04:46:55 +00:00
Never show LicenseRef-proprietary to the end user
Just provide a translated string for this most common of cases.
This commit is contained in:
parent
506ef63a59
commit
07184d3822
@ -1047,6 +1047,21 @@ fu_util_device_to_string (FwupdDevice *dev, guint idt)
|
|||||||
return g_string_free (str, FALSE);
|
return g_string_free (str, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const gchar *
|
||||||
|
fu_util_license_to_string (const gchar *license)
|
||||||
|
{
|
||||||
|
if (license == NULL) {
|
||||||
|
/* TRANSLATORS: we don't know the license of the update */
|
||||||
|
return _("Unknown");
|
||||||
|
}
|
||||||
|
if (g_strcmp0 (license, "LicenseRef-proprietary") == 0 ||
|
||||||
|
g_strcmp0 (license, "proprietary") == 0) {
|
||||||
|
/* TRANSLATORS: a non-free software license */
|
||||||
|
return _("Proprietary");
|
||||||
|
}
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
fu_util_release_to_string (FwupdRelease *rel, guint idt)
|
fu_util_release_to_string (FwupdRelease *rel, guint idt)
|
||||||
{
|
{
|
||||||
@ -1078,11 +1093,9 @@ fu_util_release_to_string (FwupdRelease *rel, guint idt)
|
|||||||
fu_common_string_append_kv (str, idt + 1, _("Variant"),
|
fu_common_string_append_kv (str, idt + 1, _("Variant"),
|
||||||
fwupd_release_get_name_variant_suffix (rel));
|
fwupd_release_get_name_variant_suffix (rel));
|
||||||
}
|
}
|
||||||
if (fwupd_release_get_license (rel) != NULL) {
|
/* TRANSLATORS: e.g. GPLv2+, Proprietary etc */
|
||||||
/* TRANSLATORS: e.g. GPLv2+, Non free etc */
|
fu_common_string_append_kv (str, idt + 1, _("License"),
|
||||||
fu_common_string_append_kv (str, idt + 1, _("License"),
|
fu_util_license_to_string (fwupd_release_get_license (rel)));
|
||||||
fwupd_release_get_license (rel));
|
|
||||||
}
|
|
||||||
if (fwupd_release_get_size (rel) != 0) {
|
if (fwupd_release_get_size (rel) != 0) {
|
||||||
g_autofree gchar *tmp = NULL;
|
g_autofree gchar *tmp = NULL;
|
||||||
tmp = g_format_size (fwupd_release_get_size (rel));
|
tmp = g_format_size (fwupd_release_get_size (rel));
|
||||||
|
Loading…
Reference in New Issue
Block a user