GNOME Bugzilla – Bug 627644
add more licences to gtkaboutdialog
Last modified: 2014-01-25 03:57:07 UTC
The GtkLicense enum is missing values for "or (at your option), any later version" variants of the [L]GPL{2,3}. And there's no AGPL3[+].
Created attachment 168524 [details] [review] Added new licenses and a string to indicate the license version The standard template at gnu says to use "or later", but there's no way to see from the about dialogue whether the developer of the programme in question has actually included the "or later" Also, added GTK_LICENSE_GPL_*_PLUS and GTK_LICENSE_LGPL_*_PLUS to GtkLicense enumeration
Review of attachment 168524 [details] [review]: I don't think this is the best way to go about implementing this. I'd rather have this done by varying the license_preamble according to license_type. I think it might be nice to use the de-facto standard header for the gnu licenses for this: This program is free software; you can redistribute it and/or modify it under the terms of the %{license_name} as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See %{license_link} for more details. Etc. We can keep using the current preamble text for the non-gnu licenses. I also think we want to avoid calling _(NULL)
Created attachment 168756 [details] [review] Add more licences to gtkaboutdialog Here another try. I've used the standard GNU header from http://www.gnu.org/licenses/gpl-howto.html now.
Review of attachment 168756 [details] [review]: with the license preamble don't we go yet again into the "the translations should be done by a lawyer" territory? is the preamble too legally binding? if it's okay, then I don't mind. ::: gtk/gtkaboutdialog.c @@ +2565,3 @@ + license_name = g_strdup ("GNU Lesser General Public License"); + + preamble = g_strdup_printf (gtk_license_gnu_header, license_name, gtk_license_version[license], url); I'd probably use a GString here, to avoid a g_strdup()+g_strdup_printf() combo.
Review of attachment 168756 [details] [review]: ::: gtk/gtkaboutdialog.c @@ +2633,3 @@ g_string_append (str, priv->copyright); g_string_append (str, "\n\n"); + g_string_append (str, _(license_preamble)); This is not going to work. If you want the various variants of the preamble to be translated, it is not enough to just mark a single template with N_(). You need to have each variant of the preamble as a separate extracted string (you can play some games with %s, but it is better to just translate complete strings).
Created attachment 174982 [details] [review] Add more licences to gtkaboutdialog: first approach Another try, we save all the variants in one array
Created attachment 174983 [details] [review] Add more licences to gtkaboutdialog: second approach Other approach: Use different headers per license. Maybe more readable
I'm not happy with any of these, unfortunately. Either they stitch together translated strings with printf, which doesn't really work, or they cause excessive redundancy. And none of them addresses the problem that for a PLUS value, the link is going to be wrong/misleading anyway.
Whatever we end up doing here will have to be reevaluated for the about dialog redesign that landed on master recently.
commit 63c9342e30f24f4a270a67315c3d75d794855728 Author: William Jon McCann <william.jon.mccann@gmail.com> Date: Mon Dec 16 11:06:24 2013 -0500 about dialog: differentiate GPL "or later" versions https://bugzilla.gnome.org/show_bug.cgi?id=720410