Commit Graph

19 Commits

Author SHA1 Message Date
Lu Liu
7d4e182c75
Extend Wikidata extension to support arbitrary Wikibase instances (#2810)
Closes #1640. All Wikibase-dependent parameters, which were previously hard-coded for Wikidata, are now described in a JSON manifest. The manifest is currently constructed by hand, but, in the future, will hopefully be published by each Wikibase instance at a standard location.

* setup the manifest framework

* add dependency mechanism to scrutinizers & update tests

* add json creators to constraint entities

* adapt the backend (units tests are to be updated)

* remove the call to prepareDependencies() in the constructor

* update code according to review feedback

* update scrutinizers tests

* fix typo & update ConstraintsV1

* log if a scrutinizer is skipped

* update versioning handling in the backend

* correct the order of "actual" and "expected" for assertEquals method

* use regex to check manifest versions

* 1. add wikibase-manager.js, wikibase-dialog.js, etc.
2. move dialog/schema-alignment-dialog.js -> schema-alignment.js
3. remove unused schema-alignment-dialog.html
4. change most mentions of "Wikidata" to "Wikibase"

* support saving cookies for different Wikibases & fix LoginCommandTest

* fix schema related tests

* removed unused WikibaseCredentials

* include MediaWiki API endpoint in the schema

* fetch language codes for different Wikibases

* fix lgtm-bot alerts

* keep a connection map (MediaWiki API endpoint => Connection) in ConnectionManager

* simplify the constraint configurations of the manifest and remove lots of unnecessary code.

* add slash to the end of mediawiki.root

* add manifest schema and use ajv to validate the manifest

* remove JSONP support (Wikibase manifest host should support CORS)

* save manifests on manifest update

* add unit tests for Manifest

* include the exception in logger.error() method to make it easier to debug

* include the message of ManifestException when calling respondError

* test multiple connections

* test no manifest & test invalid manifest

* adapt manage-account-dialog.js to support multiple Wikibase connections

* update instance/subclass of related translations

* beautify import-schema-dialog.html

* use "${lang}" variable in the reconciliation service endpoint of the manifest

* adapt schema-alignment.js after introducing "${lang}" variable in the reconciliation service endpoint

* use WikibaseManager.getSelectedWikibaseApi() in SchemaAlignment._getPropertyType

* replace more mentions of "Wikidata" to "Wikibase"

* use WikibaseManager.getSelectedWikibaseApi() in previewrenderer.js

* support fetching language codes of different Wikibases in the frontend

* skip EditInspector if missing 'property_constraint_pid' in the manifest

* improve unit tests for fetching lang codes

* skip scrutinizers depending on fetcher if 'property_constraint_pid' is missing in the manifest

* make sure the schema alignment panel is set up before rendering

* fix preview bug

* add getters of "instance of" and "subclass of" to the Manifest interface and use them in NewItemScrutinizer

* fix hardcode for Wikidata in WbItemVariable

* rename 'entity_prefix' to 'site_iri' and move it from 'manifest.wikibase.properties' to 'manifest.wikibase'

* include oauth configurations in the manifest & support logging in with owner-only consumer for Wikibases with the OAuth extension

* correct schema fallback logic

* select default wikibase according to the saved schema

* include maxlag in the manifest

* [backend] move maxlag setting from preferences to request parameter

* support setting maxlag when uploading edits

* rename "Manage Wikibase" to "Select Wikibase instance" and localize it

* fix manifest updating bug

* include EditGroups in the manifest

* add the reconciliation service from the manifest to standard services if it's not present yet when adding a new manifest

* update according to review feedback

1. use inherited color variable
2. rename 'gridwroks' to 'openrefine'
3. remove unnecessary 'async: true'
4. add 'format: url' validation to urls to the schema

* rename 'wikibasePrefix' to 'siteIri'
2020-08-22 11:58:56 -04:00
Tom Morris
6095c44cb7
Update to jQuery 1.12.4 and jQuery Migrate 1.4.1 - fixes 2932 (#2933)
* Refactor module wiring to reduce redundancy

* Update to jQuery 1.12.4 & jQuery Migrate 1.4.1 - fixes #2932

This updates to the latest jQuery 1.x and jQuery Migrate 1.x,
the first step in upgrading to a modern jQuery.

* Add a couple of bug fixes from Google Code SVN

This is an unrelease version from the Google Code freebase-site
repo which only has a few changes from the v4.3 release, but
one of them is removing the `browser.msie` reference that
jQuery Migrate is complaining about.

* Use prop() for 'checked' and 'disabled'

* Update jQuery 'value' property setting code to use val()

* Use prop() instead of attr() to set 'selected'

* Patch for jQuery >1.9
2020-08-06 13:47:31 +02:00
Antonin Delpeuch
7cb8bb360b
Fix export items in Wikidata extension menu. Closes #2527 (#2528) 2020-04-14 09:57:52 +02:00
Agha Saad Fraz
cff88e6267
Added google sheet feature and moved features to the export drop-down (#2458)
* fixed minor typos

* Added google sheet feature and moved features to the export drop-down menu

* minor change

* removed redundant text and moved code and translations into their respective extensions
2020-03-23 11:14:02 +01:00
Antonin Delpeuch
a4a3c07e31 Fix label of Wikidata schema export action 2019-07-24 01:24:59 +01:00
Antonin Delpeuch
79a0391ddb Wikidata: Use distinct tabs for QS and schema export. Closes #2097. 2019-07-23 10:31:17 +01:00
Antonin Delpeuch
6ac821c844 Migrate dictionary loading in extensions 2018-11-21 17:50:49 +00:00
Antonin Delpeuch
10931e1e4d Migrate js to new localization syntax 2018-11-21 17:30:00 +00:00
Antonin Delpeuch
9bf0bb2154 Merge JS i18n strings with slash 2018-11-21 15:24:57 +00:00
Antonin Delpeuch
8bed3022a1 Enable file input on import schema dialog. 2018-11-01 18:30:24 +00:00
Antonin Delpeuch
825c4ad213 Add importer UI for Wikibase schema 2018-11-01 15:01:08 +00:00
Antonin Delpeuch
7c26021b61 Expose Wikibase schema exporter in UI, for #1776 2018-10-28 15:19:48 +01:00
Antonin Delpeuch
492a42a3c3 Save the schema before exporting to QuickStatements. Closes #1659. 2018-07-13 18:21:38 +01:00
Antonin Delpeuch
761f885348 Fix missing label for QS export 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
487547bd27 Finish localization of the wikidata extension 2018-04-27 09:17:32 +02:00
Antonin Delpeuch
2795a54ea2 Start localization of the Wikidata extension 2018-04-27 09:17:31 +02:00
Antonin Delpeuch
8f4d998e21 Support for Wikidata editing from OpenRefine 2018-04-27 09:17:30 +02:00
Antonin Delpeuch
f763e8c6ad Shorter QuickStatements preview and better export UI 2018-04-27 09:17:30 +02:00
Antonin Delpeuch
035e7b82bc Add missing build and config files for Wikidata extension 2018-04-27 09:17:30 +02:00