From f03d5cc0aba15cfdd51fda25cc83632d329e7e45 Mon Sep 17 00:00:00 2001 From: Automeris naranja Date: Thu, 29 Feb 2024 08:27:20 -0300 Subject: [PATCH] diagnostics-page: Don't show GNOME privacy policy link When the privacy policy link from the distro isn't available when calling G_OS_INFO_KEY_PRIVACY_POLICY_URL, "gnome.org/privacy-policy" is used instead. However, GNOME doesn't have any infrastructure for automatic problem reporting; also, that link doesn't even mention about problem reporting, so it's completely unrelated. Fix by removing not setting any link if G_OS_INFO_KEY_PRIVACY_POLICY_URL doesn't return any URL. Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2926 --- panels/privacy/cc-diagnostics-page.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/panels/privacy/cc-diagnostics-page.c b/panels/privacy/cc-diagnostics-page.c index 849ba10a2..db0dc50ad 100644 --- a/panels/privacy/cc-diagnostics-page.c +++ b/panels/privacy/cc-diagnostics-page.c @@ -116,13 +116,20 @@ cc_diagnostics_page_init (CcDiagnosticsPage *self) if (!os_name) os_name = g_strdup ("GNOME"); url = g_get_os_info (G_OS_INFO_KEY_PRIVACY_POLICY_URL); - if (!url) - url = g_strdup ("http://www.gnome.org/privacy-policy"); - /* translators: Text used in link to privacy policy */ - link = g_strdup_printf ("%s", url, _("Learn more")); - /* translators: The first '%s' is the distributor's name, such as 'Fedora', the second '%s' is a link to the privacy policy */ - msg = g_strdup_printf (_("Sending reports of technical problems helps us improve %s. Reports " + + if (url) { + /* translators: Text used in link to privacy policy */ + link = g_strdup_printf ("%s", url, _("Learn more")); + + /* translators: The first '%s' is the distributor's name, such as 'Fedora', the second '%s' is a link to the privacy policy */ + msg = g_strdup_printf (_("Sending reports of technical problems helps us improve %s. Reports " "are sent anonymously and are scrubbed of personal data. %s"), - os_name, link); + os_name, link); + } else { + /* translators: The '%s' is the distributor's name, such as 'Fedora' */ + msg = g_strdup_printf (_("Sending reports of technical problems helps us improve %s. Reports " + "are sent anonymously and are scrubbed of personal data."), + os_name); + } adw_preferences_group_set_description (self->diagnostics_group, msg); }