Commit Graph

73 Commits

Author SHA1 Message Date
Jathin Sreenivas
f5b35a99b3
#3186 : Wikibase login form shows Wikibase instance logo (#3702)
* #3186 : Wikibase login form shows Wikibase instance logo

* Logos shown in the UI during selection of instance to work against

* CSS for list of instances, error handling

* Cache wikibase logo urls.

* Replacing logo alt text as translation string and removing the duplicate property

* Replacing logo alt text as translation string and removing the duplicate property

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
2021-04-20 21:05:50 +02:00
Lu Liu
79eac0b811
Wikidata extension - discourage use of main password (#3190)
* encourage using bot passwords

* update wiki link

* update translation

* Update extensions/wikidata/module/langs/translation-en.json

Co-authored-by: Tom Morris <tfmorris@gmail.com>

Co-authored-by: Tom Morris <tfmorris@gmail.com>
2020-09-30 10:31:36 -04:00
Lu Liu
2a86927b2c
update references of "afkbrb/wikibase-manifest" to "OpenRefine/wikibase-manifests" (#3126) 2020-08-25 13:44:39 +02:00
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
Ekta Mishra
a4e5e49aaf
Add Citation needed scrutinizer (#2925)
Implemented Citation needed Cconstraint as part of #2354

Test class added with appropriate testc cases

Updated severity level to critical as well as the messages

merged unsourced and citation-needed scrutinizer

updated severity levels and warning messages
2020-07-21 08:09:37 +02:00
Allan Nordhøy
44f6e5ba64
Translated using Weblate (English)
Currently translated at 100.0% (203 of 203 strings)

Translation: OpenRefine/wikidata
Translate-URL: https://hosted.weblate.org/projects/openrefine/wikidata/en/
2020-07-17 12:41:51 +02:00
Ekta Mishra
2bf493a498
Add One-of qualifier value property constraint (#2907)
* Add One-of qualifier value property constraint

Implemented one-of qualifier value property constraint as part of #2354

* Test class added

* Test cases updated and working fine

* resolved merge conflicts
2020-07-15 14:13:49 +02:00
Ekta Mishra
bf3d7234b9
Add ItemRequires Constraint (#2901)
* Add ItemRequires Constraint

Implemented Item requires constraint as part of #2354

* done with implementation of ItemRequiresScrutinizer Class

* Test class added with suitable test cases
2020-07-14 16:11:25 +02:00
afkbrb
cdb02004fd improve frontend 2020-06-18 23:51:22 -04:00
Lu Liu
335e81a26c OAuth support for the Wikidata extension (#2661)
Closes #1612 

Merges @afkbrb work to finish @wetneb protype, including:
* adding support for OAuth in addition to basic auth
* supporting registration of single user Wikidata OAuth consumers.
* adding extensive tests
* cleaning up the login dialog

This depends on the next release of the Wikidata Toolkit, but we're currently publishing our own snapshot that includes the necessary changes (thanks @wetneb!)

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
2020-06-18 23:51:22 -04:00
Ekta Mishra
cf851ee636
Added conflicts-with constraints (#2641)
Implemented conflicts-with scrutinizer as part of #2354
2020-06-09 20:45:15 +02:00
Allan Nordhøy
123c2580e3
Translated using Weblate (English)
Currently translated at 100.0% (177 of 177 strings)

Translation: OpenRefine/wikidata
Translate-URL: https://hosted.weblate.org/projects/openrefine/wikidata/en/
2020-06-07 16:53:30 +02:00
Ekta Mishra
1638d68e35
Added difference-within-range Scrutinizer (#2634) 2020-06-06 19:48:14 +01:00
Ekta Mishra
29a757dc57
Added support for Multi-value Constraint in Wikidata extension (#2629) 2020-05-31 14:24:51 +01: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
afkbrb
be5f6e6402 move check functions in DescriptionScrutinizer to CommonDescriptionScrutinizer 2020-03-02 21:59:55 +08:00
Lu Liu
43b32a07e0
Update extensions/wikidata/module/langs/translation-en.json
Co-Authored-By: Thad Guidry <thadguidry@gmail.com>
2020-03-02 20:10:02 +08:00
afkbrb
b0bf9203ba add "." 2020-03-02 14:52:01 +08:00
afkbrb
82f95f2bbf update DescriptionScrutinizer & create EnglishDescriptionScrutinizer 2020-03-02 14:35:42 +08:00
afkbrb
7e5a7acd58 fix spelling mistake 2020-03-01 22:22:52 +08:00
afkbrb
d1a177e37d add corresponding translation 2020-03-01 22:05:16 +08:00
Antonin Delpeuch
29f6d1d14b
Merge pull request #2137 from OpenRefine/issue-2136-wikidata-calendar
Improved support for Wikidata dates
2019-09-11 17:16:49 +01:00
leela
0481ada71a
ellipsis, added 2019-09-06 12:55:16 +00:00
Antonin Delpeuch
001dc584f0 Add warning for early Gregorian dates in Wikidata schema (#2136) 2019-08-25 13:03:41 +01:00
Antonin Delpeuch
a4a3c07e31 Fix label of Wikidata schema export action 2019-07-24 01:24:59 +01:00
Antonin Delpeuch
30c0108241 Change override term UI to use checkbox 2019-06-13 10:56:06 +01:00
Antonin Delpeuch
f7a8085bab Update UI to allow for non-overriding terms. Closes #2063 2019-06-13 09:21:30 +01:00
Antonin Delpeuch
a7482ff0d2 Add ability to copy references. Closes #1912. 2019-02-19 21:55:27 +00:00
Antonin Delpeuch
375839bb22 Update translation files for new format 2018-11-21 15:25:58 +00:00
Antonin Delpeuch
9b111952fe
Merge pull request #1795 from OpenRefine/issue1776
Add import and export for Wikidata schema
2018-11-07 10:31:51 +00:00
Antonin Delpeuch
8bed3022a1 Enable file input on import schema dialog. 2018-11-01 18:30:24 +00:00
Antonin Delpeuch
8b4cf84bfd Trim strings automatically in Wikibase schema. Closes #1781. 2018-11-01 15:29:57 +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
b3ee80d504
Merge pull request #1655 from OpenRefine/new-scope-constraint
Migrate to new scope constraint format
2018-06-22 12:22:08 +02:00
Antonin Delpeuch
8469728bb5 Update tests and localization 2018-06-15 11:07:59 +01:00
Antonin Delpeuch
1910833ad8 Add entity type constraint check 2018-06-10 09:24:22 +01:00
Antonin Delpeuch
4bb3505aa5 Add English descriptions of new issues 2018-06-10 08:17:36 +01:00
Antonin Delpeuch
484ae48c95 Give better feedback when values with invalid formats are provided. 2018-05-06 18:03:28 +02:00
Antonin Delpeuch
97e16d6e8e Add number of edits in preview and upload dialog 2018-04-28 11:25:49 +02:00
Antonin Delpeuch
f9a1a5ba18 Cleanup vocabulary for export (perform -> upload) in Wikidata extension 2018-04-28 10:56:51 +02:00
Antonin Delpeuch
30defdd2c4 Add save and discard buttons on the Wikidata schema 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
0c21d6d171 Refuse reconciled cells with invalid space 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
eed1049df3 Add schema unsaved warning 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
81a18777cb Replace QS preview by visual preview of the edits 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
2779eb97da Add colors to signal when a suggest input has been validated or not 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
a4ece8ef6a Prettify the schema UI 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
8fab42ce8f Add error message when saving an incomplete schema 2018-04-27 09:17:33 +02:00
Antonin Delpeuch
7f1cfd2db7 Address review comments 2018-04-27 09:17:33 +02:00