Page MenuHomePhabricator

Special:ApiHelp should include licensing information
Closed, ResolvedPublic

Description

Since Special:ApiHelp includes content generated from the extension's code base, it should include the license. This can be done subtly at the bottom of the little box that says, "This module requires read rights.", etc.

This would need some way to map from the API back to core (known license) or to $wgExtensionCredits['name']['license-name'].

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)

This could be argued to be fair use, but it would be better to be explicit.

We should be able to get the license information from the ExtensionRegistry instead of reading $wgExtensionCredits. But you'll have to map API module --> extension.

The bulk of the content of the help page comes from i18n messages, effectively via translatewiki. What's the license deal there?

The names of the modules, parameters, and values are the only bits that don't, but I doubt the bare names of these things are copyrightable.

The bulk of the content of the help page comes from i18n messages, effectively via translatewiki. What's the license deal there?

The names of the modules, parameters, and values are the only bits that don't, but I doubt the bare names of these things are copyrightable.

Translate Wiki provides that extensions may be licensed under CC BY or the respective FOSS license of the projects where the translations are used. I would need more information about the flow of content from translate wiki to see if this impacts how we display the license.

I would need more information about the flow of content from translate wiki to see if this impacts how we display the license.

  1. English documentation is written in the i18n/en.json file, which the ApiHelp module can collect to make a page like this.
  2. It shows up on translatewiki. I don't think they can directly edit the English there.
  3. People on translatewiki contribute translations into other languages.
  4. Their bot automatically updates the i18n/*.json files.
  5. The ApiHelp module collects a bunch of these messages together to make the page in German or in French or all sorts of other languages (you can see the message names themselves using uselang=qqx).

I've never seen any repository that deliberately claimed the i18n directory or .i18n.php file had a different license from the rest of the repository. Given that, when a developer starts the process by editing i18n/en.json, that change is under the standard repo license. Everything else is a derivative work of that.

TranslateWiki.net says (I think this is the part @Slaporte referred to), "Translations by translators are licensed CC BY 3.0, and derivative works may also be licensed under the licenses of the respective Free and Open Source projects the translations have been or will be added to."

I'm wondering how they can take copyleft content (GPL) then say derivative works are under an entirely different non-copyleft license (CC BY). However, either way, the second part ("derivative works may also be licensed under the licenses of the respective Free and Open Source projects the translations have been or will be added to") seems to confirm we can use the i18n directory under the repository's license.

Mattflaschen-WMF renamed this task from ApiHelp should include licensing information to Special:ApiHelp should include licensing information.Mar 26 2015, 9:05 PM
Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF set Security to None.

We should be able to get the license information from the ExtensionRegistry instead of reading $wgExtensionCredits. But you'll have to map API module --> extension.

I looked into that, but it seems that ExtensionRegistry only knows about modules loaded with ExtensionRegistry which doesn't help much at the moment.

As for mapping module to extension info, would it be too insane to use ReflectionClass::getFileName() to get the file for the API module class and then look through $wgExtensionCredits and ExtensionRegistry::getAllThings() for matching paths? Then we can link the license at [[Special:Version/License/$extensionName]]. (If that's a good plan, I have code written already...)

Change 202415 had a related patch set uploaded (by Anomie):
API: Add license info to API help output

https://gerrit.wikimedia.org/r/202415

Change 202415 merged by jenkins-bot:
API: Add license info to API help output

https://gerrit.wikimedia.org/r/202415