@pwithnall
Copy link
Contributor

For some functionality we want to implement in gnome-software it would be useful to have an API like:

const gchar		*as_license_get_name (const gchar *license_id);

It would return a translated string containing the human readable name of the given SPDX license ID.

This would only work for individual license IDs, not SPDX expressions because building a general-purpose translatable string to represent an arbitrary SPDX expression would be hard, and the end result would be very confusing to users (even if it could be perfectly localised).

For the case of a non-trivial SPDX expression, gnome-software will probably use a generic fallback string like “this app is licensed under a combination of free software licenses” or something.

The human-readable name of an SPDX license ID is given by the name field in licenses.json. Unfortunately it doesn’t look like they provide translated versions, so libappstream would have to carry the translations.