New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add as_license_get_name() API #423
Comments
|
This kind of ties into my long-term plan to make the whole licensing business more human-friendly (which would also involve AppStream's own license overview pages at freedesktop.org, so people have a better reference as to what AppStream thinks of their license, as well as translated quick overview information as to what a license does and doesn't permit and what that means. So, a bit like https://choosealicense.com/licenses/gpl-3.0/ but from an end-user point of view, and not just from a developer seeking to apply a license point of view. For this particular issue, it's possibly a good idea to have the Python code generate a C struct from the JSON and export that, rather than having it generate a text file or embed the JSON and parse it every time we need license information... (this stuff is very performance sensitive when building AppStream metadata) What I don't get is the localization - isn't "GPL" always "GPL" in every language? Or do you mean a literal translation of a string like "GNU General Public License"? If it's the latter, is that legally okay? Can we trust translators to translate license names properly so we don't run into issues, or should the translation be a static-ish list of officially legally vetted name translations? |
|
That sounds like an appealing long-term plan! I can’t speak authoritatively on localisation, but I certainly think the “or later” wording of licenses like Trusting translators to translate the names correctly would be a matter of providing appropriate guidance and perhaps some occasional review. It would probably make sense to get input from some translation teams before committing to a particular approach, as they will know much better than me what the issues will be. (I should say that I don’t plan to work on this at the moment, which is why I filed it as an issue rather than an MR. I’m away until October.) |
|
There is prior art here. GtkAboutDialog translates the names of a list of known licenses. Here is Nautilus' About dialog on a French system:
And here is the À propos dialog of Kdenlive:
(I can't help but notice that French GTK calls it the LPG GNU, whereas French KDE calls it LGP GNU. 🤷🏻) |


For some functionality we want to implement in gnome-software it would be useful to have an API like:
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
namefield inlicenses.json. Unfortunately it doesn’t look like they provide translated versions, so libappstream would have to carry the translations.The text was updated successfully, but these errors were encountered: