RandomSec/extensions/wikidata/tests/data/langcode/wikidata-monolingualtext-langcode.json
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

2 lines
11 KiB
JSON

{"batchcomplete":"","query":{"wbcontentlanguages":{"aa":{"code":"aa"},"ab":{"code":"ab"},"abs":{"code":"abs"},"ace":{"code":"ace"},"ady":{"code":"ady"},"ady-cyrl":{"code":"ady-cyrl"},"aeb":{"code":"aeb"},"aeb-arab":{"code":"aeb-arab"},"aeb-latn":{"code":"aeb-latn"},"af":{"code":"af"},"ak":{"code":"ak"},"aln":{"code":"aln"},"als":{"code":"als"},"alt":{"code":"alt"},"am":{"code":"am"},"ami":{"code":"ami"},"an":{"code":"an"},"ang":{"code":"ang"},"anp":{"code":"anp"},"ar":{"code":"ar"},"arc":{"code":"arc"},"arn":{"code":"arn"},"arq":{"code":"arq"},"ary":{"code":"ary"},"arz":{"code":"arz"},"as":{"code":"as"},"ase":{"code":"ase"},"ast":{"code":"ast"},"atj":{"code":"atj"},"av":{"code":"av"},"avk":{"code":"avk"},"awa":{"code":"awa"},"ay":{"code":"ay"},"az":{"code":"az"},"azb":{"code":"azb"},"ba":{"code":"ba"},"ban":{"code":"ban"},"bar":{"code":"bar"},"bbc":{"code":"bbc"},"bbc-latn":{"code":"bbc-latn"},"bcc":{"code":"bcc"},"bcl":{"code":"bcl"},"be":{"code":"be"},"be-tarask":{"code":"be-tarask"},"bg":{"code":"bg"},"bgn":{"code":"bgn"},"bh":{"code":"bh"},"bho":{"code":"bho"},"bi":{"code":"bi"},"bjn":{"code":"bjn"},"bm":{"code":"bm"},"bn":{"code":"bn"},"bo":{"code":"bo"},"bpy":{"code":"bpy"},"bqi":{"code":"bqi"},"br":{"code":"br"},"brh":{"code":"brh"},"bs":{"code":"bs"},"btm":{"code":"btm"},"bto":{"code":"bto"},"bug":{"code":"bug"},"bxr":{"code":"bxr"},"ca":{"code":"ca"},"cbk-zam":{"code":"cbk-zam"},"cdo":{"code":"cdo"},"ce":{"code":"ce"},"ceb":{"code":"ceb"},"ch":{"code":"ch"},"cho":{"code":"cho"},"chr":{"code":"chr"},"chy":{"code":"chy"},"ckb":{"code":"ckb"},"co":{"code":"co"},"cps":{"code":"cps"},"cr":{"code":"cr"},"crh":{"code":"crh"},"crh-cyrl":{"code":"crh-cyrl"},"crh-latn":{"code":"crh-latn"},"cs":{"code":"cs"},"csb":{"code":"csb"},"cu":{"code":"cu"},"cv":{"code":"cv"},"cy":{"code":"cy"},"da":{"code":"da"},"de":{"code":"de"},"de-at":{"code":"de-at"},"de-ch":{"code":"de-ch"},"din":{"code":"din"},"diq":{"code":"diq"},"dsb":{"code":"dsb"},"dtp":{"code":"dtp"},"dty":{"code":"dty"},"dv":{"code":"dv"},"dz":{"code":"dz"},"ee":{"code":"ee"},"egl":{"code":"egl"},"el":{"code":"el"},"eml":{"code":"eml"},"en":{"code":"en"},"en-ca":{"code":"en-ca"},"en-gb":{"code":"en-gb"},"eo":{"code":"eo"},"es":{"code":"es"},"es-419":{"code":"es-419"},"et":{"code":"et"},"eu":{"code":"eu"},"ext":{"code":"ext"},"fa":{"code":"fa"},"ff":{"code":"ff"},"fi":{"code":"fi"},"fit":{"code":"fit"},"fj":{"code":"fj"},"fkv":{"code":"fkv"},"fo":{"code":"fo"},"fr":{"code":"fr"},"frc":{"code":"frc"},"frp":{"code":"frp"},"frr":{"code":"frr"},"fur":{"code":"fur"},"fy":{"code":"fy"},"ga":{"code":"ga"},"gag":{"code":"gag"},"gan":{"code":"gan"},"gan-hans":{"code":"gan-hans"},"gan-hant":{"code":"gan-hant"},"gcr":{"code":"gcr"},"gd":{"code":"gd"},"gl":{"code":"gl"},"glk":{"code":"glk"},"gn":{"code":"gn"},"gom":{"code":"gom"},"gom-deva":{"code":"gom-deva"},"gom-latn":{"code":"gom-latn"},"gor":{"code":"gor"},"got":{"code":"got"},"grc":{"code":"grc"},"gsw":{"code":"gsw"},"gu":{"code":"gu"},"gv":{"code":"gv"},"ha":{"code":"ha"},"hak":{"code":"hak"},"haw":{"code":"haw"},"he":{"code":"he"},"hi":{"code":"hi"},"hif":{"code":"hif"},"hif-latn":{"code":"hif-latn"},"hil":{"code":"hil"},"ho":{"code":"ho"},"hr":{"code":"hr"},"hrx":{"code":"hrx"},"hsb":{"code":"hsb"},"ht":{"code":"ht"},"hu":{"code":"hu"},"hy":{"code":"hy"},"hyw":{"code":"hyw"},"hz":{"code":"hz"},"ia":{"code":"ia"},"id":{"code":"id"},"ie":{"code":"ie"},"ig":{"code":"ig"},"ii":{"code":"ii"},"ik":{"code":"ik"},"ike-cans":{"code":"ike-cans"},"ike-latn":{"code":"ike-latn"},"ilo":{"code":"ilo"},"inh":{"code":"inh"},"io":{"code":"io"},"is":{"code":"is"},"it":{"code":"it"},"iu":{"code":"iu"},"ja":{"code":"ja"},"jam":{"code":"jam"},"jbo":{"code":"jbo"},"jut":{"code":"jut"},"jv":{"code":"jv"},"ka":{"code":"ka"},"kaa":{"code":"kaa"},"kab":{"code":"kab"},"kbd":{"code":"kbd"},"kbd-cyrl":{"code":"kbd-cyrl"},"kbp":{"code":"kbp"},"kea":{"code":"kea"},"kg":{"code":"kg"},"khw":{"code":"khw"},"ki":{"code":"ki"},"kiu":{"code":"kiu"},"kj":{"code":"kj"},"kjp":{"code":"kjp"},"kk":{"code":"kk"},"kk-arab":{"code":"kk-arab"},"kk-cn":{"code":"kk-cn"},"kk-cyrl":{"code":"kk-cyrl"},"kk-kz":{"code":"kk-kz"},"kk-latn":{"code":"kk-latn"},"kk-tr":{"code":"kk-tr"},"kl":{"code":"kl"},"km":{"code":"km"},"kn":{"code":"kn"},"ko":{"code":"ko"},"ko-kp":{"code":"ko-kp"},"koi":{"code":"koi"},"kr":{"code":"kr"},"krc":{"code":"krc"},"kri":{"code":"kri"},"krj":{"code":"krj"},"krl":{"code":"krl"},"ks":{"code":"ks"},"ks-arab":{"code":"ks-arab"},"ks-deva":{"code":"ks-deva"},"ksh":{"code":"ksh"},"ku":{"code":"ku"},"ku-arab":{"code":"ku-arab"},"ku-latn":{"code":"ku-latn"},"kum":{"code":"kum"},"kv":{"code":"kv"},"kw":{"code":"kw"},"ky":{"code":"ky"},"la":{"code":"la"},"lad":{"code":"lad"},"lb":{"code":"lb"},"lbe":{"code":"lbe"},"lez":{"code":"lez"},"lfn":{"code":"lfn"},"lg":{"code":"lg"},"li":{"code":"li"},"lij":{"code":"lij"},"liv":{"code":"liv"},"lki":{"code":"lki"},"lld":{"code":"lld"},"lmo":{"code":"lmo"},"ln":{"code":"ln"},"lo":{"code":"lo"},"loz":{"code":"loz"},"lrc":{"code":"lrc"},"lt":{"code":"lt"},"ltg":{"code":"ltg"},"lus":{"code":"lus"},"luz":{"code":"luz"},"lv":{"code":"lv"},"lzh":{"code":"lzh"},"lzz":{"code":"lzz"},"mai":{"code":"mai"},"map-bms":{"code":"map-bms"},"mdf":{"code":"mdf"},"mg":{"code":"mg"},"mh":{"code":"mh"},"mhr":{"code":"mhr"},"mi":{"code":"mi"},"min":{"code":"min"},"mk":{"code":"mk"},"ml":{"code":"ml"},"mn":{"code":"mn"},"mni":{"code":"mni"},"mnw":{"code":"mnw"},"mo":{"code":"mo"},"mr":{"code":"mr"},"mrj":{"code":"mrj"},"ms":{"code":"ms"},"mt":{"code":"mt"},"mus":{"code":"mus"},"mwl":{"code":"mwl"},"my":{"code":"my"},"myv":{"code":"myv"},"mzn":{"code":"mzn"},"na":{"code":"na"},"nah":{"code":"nah"},"nan":{"code":"nan"},"nap":{"code":"nap"},"nb":{"code":"nb"},"nds":{"code":"nds"},"nds-nl":{"code":"nds-nl"},"ne":{"code":"ne"},"new":{"code":"new"},"ng":{"code":"ng"},"niu":{"code":"niu"},"nl":{"code":"nl"},"nn":{"code":"nn"},"no":{"code":"no"},"nod":{"code":"nod"},"nov":{"code":"nov"},"nqo":{"code":"nqo"},"nrm":{"code":"nrm"},"nso":{"code":"nso"},"nv":{"code":"nv"},"ny":{"code":"ny"},"nys":{"code":"nys"},"oc":{"code":"oc"},"olo":{"code":"olo"},"om":{"code":"om"},"or":{"code":"or"},"os":{"code":"os"},"ota":{"code":"ota"},"pa":{"code":"pa"},"pag":{"code":"pag"},"pam":{"code":"pam"},"pap":{"code":"pap"},"pcd":{"code":"pcd"},"pdc":{"code":"pdc"},"pdt":{"code":"pdt"},"pfl":{"code":"pfl"},"pi":{"code":"pi"},"pih":{"code":"pih"},"pl":{"code":"pl"},"pms":{"code":"pms"},"pnb":{"code":"pnb"},"pnt":{"code":"pnt"},"prg":{"code":"prg"},"ps":{"code":"ps"},"pt":{"code":"pt"},"pt-br":{"code":"pt-br"},"qu":{"code":"qu"},"qug":{"code":"qug"},"rgn":{"code":"rgn"},"rif":{"code":"rif"},"rm":{"code":"rm"},"rmf":{"code":"rmf"},"rmy":{"code":"rmy"},"rn":{"code":"rn"},"ro":{"code":"ro"},"roa-tara":{"code":"roa-tara"},"ru":{"code":"ru"},"rue":{"code":"rue"},"rup":{"code":"rup"},"ruq":{"code":"ruq"},"ruq-cyrl":{"code":"ruq-cyrl"},"ruq-latn":{"code":"ruq-latn"},"rw":{"code":"rw"},"rwr":{"code":"rwr"},"sa":{"code":"sa"},"sah":{"code":"sah"},"sat":{"code":"sat"},"sc":{"code":"sc"},"scn":{"code":"scn"},"sco":{"code":"sco"},"sd":{"code":"sd"},"sdc":{"code":"sdc"},"sdh":{"code":"sdh"},"se":{"code":"se"},"sei":{"code":"sei"},"ses":{"code":"ses"},"sg":{"code":"sg"},"sgs":{"code":"sgs"},"sh":{"code":"sh"},"shi":{"code":"shi"},"shi-latn":{"code":"shi-latn"},"shi-tfng":{"code":"shi-tfng"},"shn":{"code":"shn"},"shy-latn":{"code":"shy-latn"},"si":{"code":"si"},"sjd":{"code":"sjd"},"sje":{"code":"sje"},"sju":{"code":"sju"},"sk":{"code":"sk"},"skr":{"code":"skr"},"skr-arab":{"code":"skr-arab"},"sl":{"code":"sl"},"sli":{"code":"sli"},"sm":{"code":"sm"},"sma":{"code":"sma"},"smj":{"code":"smj"},"smn":{"code":"smn"},"sms":{"code":"sms"},"sn":{"code":"sn"},"so":{"code":"so"},"sq":{"code":"sq"},"sr":{"code":"sr"},"sr-ec":{"code":"sr-ec"},"sr-el":{"code":"sr-el"},"srn":{"code":"srn"},"srq":{"code":"srq"},"ss":{"code":"ss"},"st":{"code":"st"},"stq":{"code":"stq"},"sty":{"code":"sty"},"su":{"code":"su"},"sv":{"code":"sv"},"sw":{"code":"sw"},"szl":{"code":"szl"},"szy":{"code":"szy"},"ta":{"code":"ta"},"tay":{"code":"tay"},"tcy":{"code":"tcy"},"te":{"code":"te"},"tet":{"code":"tet"},"tg":{"code":"tg"},"tg-cyrl":{"code":"tg-cyrl"},"tg-latn":{"code":"tg-latn"},"th":{"code":"th"},"ti":{"code":"ti"},"tk":{"code":"tk"},"tl":{"code":"tl"},"tly":{"code":"tly"},"tn":{"code":"tn"},"to":{"code":"to"},"tpi":{"code":"tpi"},"tr":{"code":"tr"},"tru":{"code":"tru"},"trv":{"code":"trv"},"ts":{"code":"ts"},"tt":{"code":"tt"},"tt-cyrl":{"code":"tt-cyrl"},"tt-latn":{"code":"tt-latn"},"tum":{"code":"tum"},"tw":{"code":"tw"},"ty":{"code":"ty"},"tyv":{"code":"tyv"},"tzm":{"code":"tzm"},"udm":{"code":"udm"},"ug":{"code":"ug"},"ug-arab":{"code":"ug-arab"},"ug-latn":{"code":"ug-latn"},"uk":{"code":"uk"},"ur":{"code":"ur"},"uz":{"code":"uz"},"uz-cyrl":{"code":"uz-cyrl"},"uz-latn":{"code":"uz-latn"},"ve":{"code":"ve"},"vec":{"code":"vec"},"vep":{"code":"vep"},"vi":{"code":"vi"},"vls":{"code":"vls"},"vmf":{"code":"vmf"},"vo":{"code":"vo"},"vot":{"code":"vot"},"vro":{"code":"vro"},"wa":{"code":"wa"},"war":{"code":"war"},"wo":{"code":"wo"},"wuu":{"code":"wuu"},"xal":{"code":"xal"},"xh":{"code":"xh"},"xmf":{"code":"xmf"},"xsy":{"code":"xsy"},"yi":{"code":"yi"},"yo":{"code":"yo"},"yue":{"code":"yue"},"za":{"code":"za"},"zea":{"code":"zea"},"zgh":{"code":"zgh"},"zh":{"code":"zh"},"zh-cn":{"code":"zh-cn"},"zh-hans":{"code":"zh-hans"},"zh-hant":{"code":"zh-hant"},"zh-hk":{"code":"zh-hk"},"zh-mo":{"code":"zh-mo"},"zh-my":{"code":"zh-my"},"zh-sg":{"code":"zh-sg"},"zh-tw":{"code":"zh-tw"},"zu":{"code":"zu"},"und":{"code":"und"},"mis":{"code":"mis"},"mul":{"code":"mul"},"zxx":{"code":"zxx"},"abe":{"code":"abe"},"abq":{"code":"abq"},"abq-latn":{"code":"abq-latn"},"alc":{"code":"alc"},"bdr":{"code":"bdr"},"bnn":{"code":"bnn"},"brx":{"code":"brx"},"ccp":{"code":"ccp"},"chn":{"code":"chn"},"ckt":{"code":"ckt"},"clc":{"code":"clc"},"cnr":{"code":"cnr"},"cop":{"code":"cop"},"crb":{"code":"crb"},"dag":{"code":"dag"},"el-cy":{"code":"el-cy"},"ett":{"code":"ett"},"eya":{"code":"eya"},"fos":{"code":"fos"},"fr-ca":{"code":"fr-ca"},"frm":{"code":"frm"},"fro":{"code":"fro"},"fuf":{"code":"fuf"},"gez":{"code":"gez"},"gil":{"code":"gil"},"gmy":{"code":"gmy"},"hai":{"code":"hai"},"haz":{"code":"haz"},"hbo":{"code":"hbo"},"kjh":{"code":"kjh"},"kld":{"code":"kld"},"koy":{"code":"koy"},"lag":{"code":"lag"},"lcm":{"code":"lcm"},"lkt":{"code":"lkt"},"mfa":{"code":"mfa"},"mic":{"code":"mic"},"mid":{"code":"mid"},"mnc":{"code":"mnc"},"moe":{"code":"moe"},"non":{"code":"non"},"nr":{"code":"nr"},"nrf-gg":{"code":"nrf-gg"},"nrf-je":{"code":"nrf-je"},"nsk":{"code":"nsk"},"nxm":{"code":"nxm"},"ood":{"code":"ood"},"otk":{"code":"otk"},"peo":{"code":"peo"},"pi-sidd":{"code":"pi-sidd"},"pjt":{"code":"pjt"},"ppu":{"code":"ppu"},"pwn":{"code":"pwn"},"pyu":{"code":"pyu"},"quc":{"code":"quc"},"qya":{"code":"qya"},"rar":{"code":"rar"},"rm-puter":{"code":"rm-puter"},"rm-rumgr":{"code":"rm-rumgr"},"rm-surmiran":{"code":"rm-surmiran"},"rm-sursilv":{"code":"rm-sursilv"},"rm-sutsilv":{"code":"rm-sutsilv"},"rm-vallader":{"code":"rm-vallader"},"sa-sidd":{"code":"sa-sidd"},"shy":{"code":"shy"},"sia":{"code":"sia"},"sjk":{"code":"sjk"},"sjn":{"code":"sjn"},"sjt":{"code":"sjt"},"ssf":{"code":"ssf"},"syc":{"code":"syc"},"tlb":{"code":"tlb"},"tli":{"code":"tli"},"tnq":{"code":"tnq"},"tzl":{"code":"tzl"},"uga":{"code":"uga"},"umu":{"code":"umu"},"uun":{"code":"uun"},"wls":{"code":"wls"},"xpu":{"code":"xpu"},"yap":{"code":"yap"},"zun":{"code":"zun"}}}}