This module checks the validity and internal consistency of the language, language family, and script data used on Wiktionary: the modules in Category:Language data modules as well as Module:scripts/data.
Discrepancies detected:
aav
) has a canonical name that is not unique; it is also used by the code mkh
.paa-kiw
) has no child families or languages.qfa-buy
) has no child families or languages.qfa-gel
) has no child families or languages.sdv-bri
) has no child families or languages.sdv-dnu
) has no child families or languages.sdv-lma
) has no child families or languages.sdv-lon
) has no child families or languages.sdv-los
) has no child families or languages.sdv-nma
) has no child families or languages.sdv-ttu
) has no child families or languages.tbq-lal
) has no child families or languages.aav-khs-pro
) is missing.aav-khs-pro
, is wrong; it should be ős-khasian.aav-nic-pro
) is missing.aav-nic-pro
, is wrong; it should be ős-nicobarese.aav-pkl-pro
, is wrong; it should be ős-pnar-khasi-lyngngam.aav-pkl-pro
) is missing.aav-pro
, is wrong; it should be ős-austroasiatic.aav-pro
) is missing.afa-pro
) is missing.afa-pro
, is wrong; it should be ős-afro-asiatic.alg-pro
, is wrong; it should be ős-algonquian.alg-pro
) is missing.alv-bua-pro
, is wrong; it should be ős-bua.alv-bua-pro
) is missing.alv-cng-pro
, is wrong; it should be ős-cangin.alv-cng-pro
) is missing.alv-edo-pro
) is missing.alv-edo-pro
, is wrong; it should be ős-edoid.alv-fli-pro
, is wrong; it should be ős-fali.alv-fli-pro
) is missing.alv-gbe-pro
) is missing.alv-gbe-pro
, is wrong; it should be ős-gbe.alv-gng-pro
, is wrong; it should be ős-guang.alv-gng-pro
) is missing.alv-gtm-pro
, is wrong; it should be ős-central togo.alv-gtm-pro
) is missing.alv-hei-pro
) is missing.alv-hei-pro
, is wrong; it should be ős-heiban.alv-igb-pro
) is missing.alv-igb-pro
, is wrong; it should be ős-igboid.alv-kwa-pro
) is missing.alv-kwa-pro
, is wrong; it should be ős-kwa.alv-mum-pro
) is missing.alv-mum-pro
, is wrong; it should be ős-mumuye.alv-nup-pro
) is missing.alv-nup-pro
, is wrong; it should be ős-nupoid.alv-pro
, is wrong; it should be ős-atlantic-congo.alv-pro
) is missing.alv-yor-pro
) is missing.alv-yor-pro
, is wrong; it should be ős-yoruboid.apa-pro
, is wrong; it should be ős-apachean.apa-pro
) is missing.aql-pro
, is wrong; it should be ős-algic.aql-pro
) is missing.ath-pro
) is missing.ath-pro
, is wrong; it should be ős-athabaskan.auf-pro
) is missing.auf-pro
, is wrong; it should be ős-arawa.aus-arn-pro
) is missing.aus-arn-pro
, is wrong; it should be ős-arnhem.aus-cww-pro
) is missing.aus-cww-pro
, is wrong; it should be ős-central new south wales.aus-dal-pro
) is missing.aus-dal-pro
, is wrong; it should be ős-daly.aus-nyu-pro
) is missing.aus-nyu-pro
, is wrong; it should be ős-nyulnyulan.aus-pam-pro
) is missing.aus-pam-pro
, is wrong; it should be ős-pama-nyungan.aus-wdj-pro
, is wrong; it should be ős-iwaidjan.aus-wdj-pro
) is missing.awd-amc-pro
) is missing.awd-amc-pro
, is wrong; it should be ős-amuesha-chamicuro.awd-kmp-pro
) is missing.awd-kmp-pro
, is wrong; it should be ős-kampa.awd-nwk-pro
, is wrong; it should be ős-nawiki.awd-nwk-pro
) is missing.awd-pro
) is missing.awd-pro
, is wrong; it should be ős-arawak.awd-prw-pro
, is wrong; it should be ős-paresi-waura.awd-prw-pro
) is missing.awd-taa-pro
) is missing.awd-taa-pro
, is wrong; it should be ős-ta-arawak.azc-cup-pro
, is wrong; it should be ős-cupan.azc-cup-pro
) is missing.azc-nah-pro
) is missing.azc-nah-pro
, is wrong; it should be ős-nahuan.azc-num-pro
) is missing.azc-num-pro
, is wrong; it should be ős-numic.azc-pro
, is wrong; it should be ős-uto-aztecan.azc-pro
) is missing.azc-tak-pro
, is wrong; it should be ős-takic.azc-tak-pro
) is missing.bbz
, is wrong; it should be babalia kreol arab.bbz
) is missing.ber-pro
) is missing.ber-pro
, is wrong; it should be ős-berber.bnt-ngu-pro
, is wrong; it should be ős-nguni.bnt-ngu-pro
) is missing.bnt-pro
, is wrong; it should be ős-bantu.bnt-pro
) is missing.bnt-sts-pro
) is missing.bnt-sts-pro
, is wrong; it should be ős-sotho-tswana.btk-pro
, is wrong; it should be ős-batak.btk-pro
) is missing.cau-abz-pro
, is wrong; it should be ős-abkhaz-abaza.cau-abz-pro
) is missing.cau-ava-pro
) is missing.cau-ava-pro
, is wrong; it should be ős-avaro-andian.cau-cir-pro
) is missing.cau-cir-pro
, is wrong; it should be ős-circassian.cau-drg-pro
, is wrong; it should be ős-dargva.cau-drg-pro
) is missing.cau-lzg-pro
) is missing.cau-lzg-pro
, is wrong; it should be ős-lezghian.cau-nec-pro
) is missing.cau-nec-pro
, is wrong; it should be ős-northeast caucasian.cau-nkh-pro
) is missing.cau-nkh-pro
, is wrong; it should be ős-nakh.cau-nwc-pro
, is wrong; it should be ős-northwest caucasian.cau-nwc-pro
) is missing.cau-tsz-pro
) is missing.cau-tsz-pro
, is wrong; it should be ős-tsezian.cba-pro
, is wrong; it should be ős-chibchan.cba-pro
) is missing.ccn-pro
, is wrong; it should be ős-north caucasian.ccn-pro
) is missing.ccs-gzn-pro
, is wrong; it should be ős-georgian-zan.ccs-gzn-pro
) is missing.ccs-pro
) is missing.ccs-pro
, is wrong; it should be ős-kartvelian.cdc-cbm-pro
, is wrong; it should be ős-central chadic.cdc-cbm-pro
) is missing.cdc-mas-pro
, is wrong; it should be ős-masa.cdc-mas-pro
) is missing.cdc-pro
, is wrong; it should be ős-chadic.cdc-pro
) is missing.cdd-pro
) is missing.cdd-pro
, is wrong; it should be ős-caddoan.cel-bry-pro
, is wrong; it should be ős-brythonic.cel-bry-pro
) is missing.cel-pro
, is wrong; it should be ős-celtic.cel-pro
) is missing.chi-pro
) is missing.chi-pro
, is wrong; it should be ős-chimakuan.cmc-pro
) is missing.cmc-pro
, is wrong; it should be ős-chamic.csu-bba-pro
) is missing.csu-bba-pro
, is wrong; it should be ős-bongo-bagirmi.csu-maa-pro
, is wrong; it should be ős-mangbetu.csu-maa-pro
) is missing.csu-pro
) is missing.csu-pro
, is wrong; it should be ős-central sudanic.csu-sar-pro
, is wrong; it should be ős-sara.csu-sar-pro
) is missing.cus-pro
, is wrong; it should be ős-cushitic.cus-pro
) is missing.dmn-mdw-pro
, is wrong; it should be ős-western mande.dmn-mdw-pro
) is missing.dmn-pro
, is wrong; it should be ős-mande.dmn-pro
) is missing.dra-pro
, is wrong; it should be ős-dravidian.dra-pro
) is missing.dru-pro
, is wrong; it should be ős-rukai.dru-pro
) is missing.esx-esk-pro
) is missing.esx-esk-pro
, is wrong; it should be ős-eskimo.esx-inu-pro
, is wrong; it should be ős-inuit.esx-inu-pro
) is missing.esx-pro
, is wrong; it should be ős-eskimo-aleut.esx-pro
) is missing.euq-pro
, is wrong; it should be ős-basque.euq-pro
) is missing.fiu-fin-pro
, is wrong; it should be ős-finnic.fiu-fin-pro
) is missing.gem-pro
, is wrong; it should be ős-germanic.gem-pro
) is missing.gmq-pro
, is wrong; it should be ős-norse.gmq-pro
) is missing.gmw-pro
, is wrong; it should be ős-west germanic.gmw-pro
) is missing.grk-pro
) is missing.grk-pro
, is wrong; it should be ős-hellenic.hmn-pro
) is missing.hmn-pro
, is wrong; it should be ős-hmong.hmx-mie-pro
) is missing.hmx-mie-pro
, is wrong; it should be ős-mien.hmx-pro
, is wrong; it should be ős-hmong-mien.hmx-pro
) is missing.hyx-pro
, is wrong; it should be ős-armenian.hyx-pro
) is missing.iir-nur-pro
) is missing.iir-nur-pro
, is wrong; it should be ős-nuristani.iir-pro
) is missing.iir-pro
, is wrong; it should be ős-indo-iranian.ijo-pro
, is wrong; it should be ős-ijoid.ijo-pro
) is missing.inc-dar-pro
, is wrong; it should be ős-dardic.inc-dar-pro
) is missing.inc-pro
) is missing.inc-pro
, is wrong; it should be ős-indo-aryan.ine-ana-pro
) is missing.ine-ana-pro
, is wrong; it should be ős-anatolian.ine-bsl-pro
) is missing.ine-bsl-pro
, is wrong; it should be ős-balti-szláv.ine-pro
) is missing.ine-pro
, is wrong; it should be ősindoeurópai.ine-toc-pro
) is missing.ine-toc-pro
, is wrong; it should be ős-tocharian.inh
) is missing.inh
, is wrong; it should be ingus.ira-kms-pro
) is missing.ira-kms-pro
, is wrong; it should be ős-komisenian.ira-mny-pro
) is missing.ira-mny-pro
, is wrong; it should be ős-munji-yidgha.ira-mpr-pro
) is missing.ira-mpr-pro
, is wrong; it should be ős-medo-parthian.ira-pat-pro
, is wrong; it should be ős-pathan.ira-pat-pro
) is missing.ira-pro
, is wrong; it should be ős-iranian.ira-pro
) is missing.ira-sgc-pro
, is wrong; it should be ős-sogdic.ira-sgc-pro
) is missing.ira-sgi-pro
, is wrong; it should be ős-sanglechi-ishkashimi.ira-sgi-pro
) is missing.ira-shr-pro
) is missing.ira-shr-pro
, is wrong; it should be ős-shughni-roshani.ira-shy-pro
) is missing.ira-shy-pro
, is wrong; it should be ős-shughni-yazghulami.ira-sym-pro
) is missing.ira-sym-pro
, is wrong; it should be ős-shughni-yazghulami-munji.ira-zgr-pro
) is missing.ira-zgr-pro
, is wrong; it should be ős-zaza-gorani.iro-pro
, is wrong; it should be ős-iroquoian.iro-pro
) is missing.itc-pro
, is wrong; it should be ős-italic.itc-pro
) is missing.itk
) is missing.itk
, is wrong; it should be judeo-olasz.izh
, is wrong; it should be izsór.izh
) is missing.jpx-pro
, is wrong; it should be ős-japonic.jpx-pro
) is missing.jpx-ryu-pro
, is wrong; it should be ős-ryukyuan.jpx-ryu-pro
) is missing.kar-pro
) is missing.kar-pro
, is wrong; it should be ős-karen.khi-kho-pro
, is wrong; it should be ős-khoe.khi-kho-pro
) is missing.kmr
, is wrong; it should be északi kurd.kmr
) is missing.kro-pro
) is missing.kro-pro
, is wrong; it should be ős-kru.liv
) is missing.liv
, is wrong; it should be lív.map-ata-pro
, is wrong; it should be ős-atayalic.map-ata-pro
) is missing.map-pro
, is wrong; it should be ős-austronesian.map-pro
) is missing.mkh-asl-pro
, is wrong; it should be ős-aslian.mkh-asl-pro
) is missing.mkh-ban-pro
, is wrong; it should be ős-bahnaric.mkh-ban-pro
) is missing.mkh-kat-pro
, is wrong; it should be ős-katuic.mkh-kat-pro
) is missing.mkh-khm-pro
, is wrong; it should be ős-khmuic.mkh-khm-pro
) is missing.mkh-kmr-pro
, is wrong; it should be ős-khmeric.mkh-kmr-pro
) is missing.mkh-mnc-pro
, is wrong; it should be ős-monic.mkh-mnc-pro
) is missing.mkh-pal-pro
, is wrong; it should be ős-palaungic.mkh-pal-pro
) is missing.mkh-pea-pro
, is wrong; it should be ős-pearic.mkh-pea-pro
) is missing.mkh-pkn-pro
) is missing.mkh-pkn-pro
, is wrong; it should be ős-pakanic.mkh-pro
, is wrong; it should be ős-mon-khmer.mkh-pro
) is missing.mkh-vie-pro
, is wrong; it should be ős-vietic.mkh-vie-pro
) is missing.mun-pro
, is wrong; it should be ős-munda.mun-pro
) is missing.myn-pro
, is wrong; it should be ős-mayan.myn-pro
) is missing.nai-chu-pro
) is missing.nai-chu-pro
, is wrong; it should be ős-chumash.nai-ckn-pro
) is missing.nai-ckn-pro
, is wrong; it should be ős-chinookan.nai-klp-pro
, is wrong; it should be ős-kalapuyan.nai-klp-pro
) is missing.nai-mdu-pro
) is missing.nai-mdu-pro
, is wrong; it should be ős-maidun.nai-miz-pro
) is missing.nai-miz-pro
, is wrong; it should be ős-mixe-zoque.nai-plp-pro
, is wrong; it should be ős-plateau penutian.nai-plp-pro
) is missing.nai-pom-pro
) is missing.nai-pom-pro
, is wrong; it should be ős-pomo.nai-sca-pro
) is missing.nai-sca-pro
, is wrong; it should be ős-siouan-catawban.nai-tot-pro
, is wrong; it should be ős-totozoquean.nai-tot-pro
) is missing.nai-tsi-pro
, is wrong; it should be ős-tsimshianic.nai-tsi-pro
) is missing.nai-utn-pro
) is missing.nai-utn-pro
, is wrong; it should be ős-utian.ngf-pro
) is missing.ngf-pro
, is wrong; it should be ős-trans-new guinea.nic-bco-pro
) is missing.nic-bco-pro
, is wrong; it should be ős-benue-congo.nic-bod-pro
) is missing.nic-bod-pro
, is wrong; it should be ős-bantoid.nic-eov-pro
, is wrong; it should be ős-eastern oti-volta.nic-eov-pro
) is missing.nic-gns-pro
, is wrong; it should be ős-gurunsi.nic-gns-pro
) is missing.nic-grf-pro
, is wrong; it should be ős-grassfields.nic-grf-pro
) is missing.nic-gur-pro
, is wrong; it should be ős-gur.nic-gur-pro
) is missing.nic-jkn-pro
) is missing.nic-jkn-pro
, is wrong; it should be ős-jukunoid.nic-lcr-pro
, is wrong; it should be ős-lower cross river.nic-lcr-pro
) is missing.nic-ogo-pro
, is wrong; it should be ős-ogoni.nic-ogo-pro
) is missing.nic-ovo-pro
) is missing.nic-ovo-pro
, is wrong; it should be ős-oti-volta.nic-plt-pro
, is wrong; it should be ős-plateau.nic-plt-pro
) is missing.nic-pro
, is wrong; it should be ős-niger-congo.nic-pro
) is missing.nic-ubg-pro
, is wrong; it should be ős-ubangian.nic-ubg-pro
) is missing.nic-ucr-pro
) is missing.nic-ucr-pro
, is wrong; it should be ős-upper cross river.nic-vco-pro
, is wrong; it should be ős-volta-congo.nic-vco-pro
) is missing.nub-pro
) is missing.nub-pro
, is wrong; it should be ős-nubian.omq-cha-pro
) is missing.omq-cha-pro
, is wrong; it should be ős-chatino.omq-maz-pro
, is wrong; it should be ős-mazatec.omq-maz-pro
) is missing.omq-mix-pro
, is wrong; it should be ős-mixtecan.omq-mix-pro
) is missing.omq-mxt-pro
) is missing.omq-mxt-pro
, is wrong; it should be ős-mixtec.omq-otp-pro
) is missing.omq-otp-pro
, is wrong; it should be ős-oto-pamean.omq-pro
, is wrong; it should be ős-oto-manguean.omq-pro
) is missing.omq-tri-pro
, is wrong; it should be ős-trique.omq-tri-pro
) is missing.omq-zap-pro
) is missing.omq-zap-pro
, is wrong; it should be ős-zapotecan.omq-zpc-pro
) is missing.omq-zpc-pro
, is wrong; it should be ős-zapotec.omv-aro-pro
, is wrong; it should be ős-aroid.omv-aro-pro
) is missing.omv-diz-pro
, is wrong; it should be ős-dizoid.omv-diz-pro
) is missing.omv-pro
, is wrong; it should be ős-omotic.omv-pro
) is missing.orv
) is missing.orv
, is wrong; it should be óorosz.os-pro
, is wrong; it should be ős-ossetic.os-pro
) is missing.oto-otm-pro
, is wrong; it should be ős-otomi.oto-otm-pro
) is missing.oto-pro
) is missing.oto-pro
, is wrong; it should be ős-otomian.pdc
, is wrong; it should be pennsylvaniai német.pdc
) is missing.phi-kal-pro
) is missing.phi-kal-pro
, is wrong; it should be ős-kalamian.phi-pro
, is wrong; it should be ős-philippine.phi-pro
) is missing.pms
, is wrong; it should be piemonti.pms
) is missing.poz-btk-pro
, is wrong; it should be ős-bungku-tolaki.poz-btk-pro
) is missing.poz-cet-pro
, is wrong; it should be ős-central-eastern malayo-polynesian.poz-cet-pro
) is missing.poz-hce-pro
) is missing.poz-hce-pro
, is wrong; it should be ős-halmahera-cenderawasih.poz-lgx-pro
, is wrong; it should be ős-lampungic.poz-lgx-pro
) is missing.poz-mcm-pro
) is missing.poz-mcm-pro
, is wrong; it should be ős-malayo-chamic.poz-mly-pro
, is wrong; it should be ős-malayic.poz-mly-pro
) is missing.poz-msa-pro
) is missing.poz-msa-pro
, is wrong; it should be ős-malayo-sumbawan.poz-oce-pro
) is missing.poz-oce-pro
, is wrong; it should be ős-oceanic.poz-pep-pro
) is missing.poz-pep-pro
, is wrong; it should be ős-eastern polynesian.poz-pnp-pro
, is wrong; it should be ős-nuclear polynesian.poz-pnp-pro
) is missing.poz-pol-pro
, is wrong; it should be ős-polynesian.poz-pol-pro
) is missing.poz-pro
) is missing.poz-pro
, is wrong; it should be ős-malayo-polynesian.poz-ssw-pro
) is missing.poz-ssw-pro
, is wrong; it should be ős-south sulawesi.poz-sus-pro
) is missing.poz-sus-pro
, is wrong; it should be ős-sunda-sulawesi.poz-swa-pro
) is missing.poz-swa-pro
, is wrong; it should be ős-north sarawak.pqe-pro
) is missing.pqe-pro
, is wrong; it should be ős-eastern malayo-polynesian.qfa-adm-pro
, is wrong; it should be ős-great andamanese.qfa-adm-pro
) is missing.qfa-cka-pro
, is wrong; it should be ős-chukotko-kamchatkan.qfa-cka-pro
) is missing.qfa-hur-pro
, is wrong; it should be ős-hurro-urartian.qfa-hur-pro
) is missing.qfa-kad-pro
, is wrong; it should be ős-kadu.qfa-kad-pro
) is missing.qfa-kms-pro
) is missing.qfa-kms-pro
, is wrong; it should be ős-kam-sui.qfa-kor-pro
, is wrong; it should be ős-korean.qfa-kor-pro
) is missing.qfa-kra-pro
, is wrong; it should be ős-kra.qfa-kra-pro
) is missing.qfa-lic-pro
) is missing.qfa-lic-pro
, is wrong; it should be ős-hlai.qfa-onb-pro
, is wrong; it should be ős-ong-be.qfa-onb-pro
) is missing.qfa-ong-pro
, is wrong; it should be ős-ongan.qfa-ong-pro
) is missing.qfa-tak-pro
, is wrong; it should be ős-kra-dai.qfa-tak-pro
) is missing.qfa-yen-pro
) is missing.qfa-yen-pro
, is wrong; it should be ős-yeniseian.qfa-yuk-pro
, is wrong; it should be ős-yukaghir.qfa-yuk-pro
) is missing.sai-jee-pro
) is missing.sai-jee-pro
, is wrong; it should be ős-jê.sal-pro
) is missing.sal-pro
, is wrong; it should be ős-salish.sdv-daj-pro
, is wrong; it should be ős-daju.sdv-daj-pro
) is missing.sdv-eje-pro
) is missing.sdv-eje-pro
, is wrong; it should be ős-eastern jebel.sdv-nil-pro
, is wrong; it should be ős-nilotic.sdv-nil-pro
) is missing.sdv-nyi-pro
, is wrong; it should be ős-nyima.sdv-nyi-pro
) is missing.sdv-tmn-pro
) is missing.sdv-tmn-pro
, is wrong; it should be ős-taman.sem-pro
, is wrong; it should be ős-semitic.sem-pro
) is missing.sio-pro
) is missing.sio-pro
, is wrong; it should be ős-siouan.sit-hrs-pro
) is missing.sit-hrs-pro
, is wrong; it should be ős-hrusish.sit-kha-pro
) is missing.sit-kha-pro
, is wrong; it should be ős-kham.sit-luu-pro
) is missing.sit-luu-pro
, is wrong; it should be ős-luish.sit-pro
) is missing.sit-pro
, is wrong; it should be ős-sino-tibetan.sit-tan-pro
) is missing.sit-tan-pro
, is wrong; it should be ős-tani.sla-pro
, is wrong; it should be ősszláv.sla-pro
) is missing.smi-pro
, is wrong; it should be ős-samic.smi-pro
) is missing.son-pro
, is wrong; it should be ős-songhay.son-pro
) is missing.sqj-pro
) is missing.sqj-pro
, is wrong; it should be ős-albanian.ssa-klk-pro
, is wrong; it should be ős-kuliak.ssa-klk-pro
) is missing.ssa-kom-pro
) is missing.ssa-kom-pro
, is wrong; it should be ős-koman.ssa-pro
, is wrong; it should be ős-nilo-saharan.ssa-pro
) is missing.syd-pro
, is wrong; it should be ős-samoyedic.syd-pro
) is missing.tai-pro
, is wrong; it should be ős-tai.tai-pro
) is missing.tai-swe-pro
, is wrong; it should be ős-southwestern tai.tai-swe-pro
) is missing.tbq-bdg-pro
) is missing.tbq-bdg-pro
, is wrong; it should be ős-bodo-garo.tbq-kuk-pro
, is wrong; it should be ős-kuki-chin.tbq-kuk-pro
) is missing.tbq-lal-pro
, is wrong; it should be ős-lalo.tbq-lal-pro
) is missing.tbq-lob-pro
) is missing.tbq-lob-pro
, is wrong; it should be ős-lolo-burmese.tbq-lol-pro
) is missing.tbq-lol-pro
, is wrong; it should be ős-loloish.trk-pro
, is wrong; it should be ős-turkic.trk-pro
) is missing.tup-gua-pro
, is wrong; it should be ős-tupi-guarani.tup-gua-pro
) is missing.tup-pro
) is missing.tup-pro
, is wrong; it should be ős-tupian.tuw-pro
) is missing.tuw-pro
, is wrong; it should be ős-tungusic.urj-mdv-pro
) is missing.urj-mdv-pro
, is wrong; it should be ős-mordvinic.urj-prm-pro
, is wrong; it should be ős-permic.urj-prm-pro
) is missing.urj-pro
) is missing.urj-pro
, is wrong; it should be ős-uralic.urj-ugr-pro
) is missing.urj-ugr-pro
, is wrong; it should be ős-ugric.xgn-pro
) is missing.xgn-pro
, is wrong; it should be ős-mongolic.xme-ttc-pro
, is wrong; it should be ős-tatic.xme-ttc-pro
) is missing.xnd-pro
) is missing.xnd-pro
, is wrong; it should be ős-na-dene.xsc-pro
) is missing.xsc-pro
, is wrong; it should be ős-scythian.xsc-sak-pro
) is missing.xsc-sak-pro
, is wrong; it should be ős-saka.xsc-skw-pro
) is missing.xsc-skw-pro
, is wrong; it should be ős-saka-wakhi.ypk-pro
) is missing.ypk-pro
, is wrong; it should be ős-yupik.zhx-min-pro
) is missing.zhx-min-pro
, is wrong; it should be ős-min.aav-khs-pro
, is wrong; it should be ős-khasian.aav-nic-pro
, is wrong; it should be ős-nicobarese.aav-pkl-pro
, is wrong; it should be ős-pnar-khasi-lyngngam.aav-pro
, is wrong; it should be ős-austroasiatic.afa-pro
, is wrong; it should be ős-afro-asiatic.alg-pro
, is wrong; it should be ős-algonquian.alv-bua-pro
, is wrong; it should be ős-bua.alv-cng-pro
, is wrong; it should be ős-cangin.alv-edo-pro
, is wrong; it should be ős-edoid.alv-fli-pro
, is wrong; it should be ős-fali.alv-gbe-pro
, is wrong; it should be ős-gbe.alv-gng-pro
, is wrong; it should be ős-guang.alv-gtm-pro
, is wrong; it should be ős-central togo.alv-hei-pro
, is wrong; it should be ős-heiban.alv-igb-pro
, is wrong; it should be ős-igboid.alv-kwa-pro
, is wrong; it should be ős-kwa.alv-mum-pro
, is wrong; it should be ős-mumuye.alv-nup-pro
, is wrong; it should be ős-nupoid.alv-pro
, is wrong; it should be ős-atlantic-congo.alv-yor-pro
, is wrong; it should be ős-yoruboid.apa-pro
, is wrong; it should be ős-apachean.aql-pro
, is wrong; it should be ős-algic.ath-pro
, is wrong; it should be ős-athabaskan.auf-pro
, is wrong; it should be ős-arawa.aus-arn-pro
, is wrong; it should be ős-arnhem.aus-cww-pro
, is wrong; it should be ős-central new south wales.aus-dal-pro
, is wrong; it should be ős-daly.aus-nyu-pro
, is wrong; it should be ős-nyulnyulan.aus-pam-pro
, is wrong; it should be ős-pama-nyungan.aus-wdj-pro
, is wrong; it should be ős-iwaidjan.awd-amc-pro
, is wrong; it should be ős-amuesha-chamicuro.awd-kmp-pro
, is wrong; it should be ős-kampa.awd-nwk-pro
, is wrong; it should be ős-nawiki.awd-pro
, is wrong; it should be ős-arawak.awd-prw-pro
, is wrong; it should be ős-paresi-waura.awd-taa-pro
, is wrong; it should be ős-ta-arawak.azc-cup-pro
, is wrong; it should be ős-cupan.azc-nah-pro
, is wrong; it should be ős-nahuan.azc-num-pro
, is wrong; it should be ős-numic.azc-pro
, is wrong; it should be ős-uto-aztecan.azc-tak-pro
, is wrong; it should be ős-takic.bbz
, is wrong; it should be babalia kreol arab.ber-pro
, is wrong; it should be ős-berber.bnt-ngu-pro
, is wrong; it should be ős-nguni.bnt-pro
, is wrong; it should be ős-bantu.bnt-sts-pro
, is wrong; it should be ős-sotho-tswana.btk-pro
, is wrong; it should be ős-batak.cau-abz-pro
, is wrong; it should be ős-abkhaz-abaza.cau-ava-pro
, is wrong; it should be ős-avaro-andian.cau-cir-pro
, is wrong; it should be ős-circassian.cau-drg-pro
, is wrong; it should be ős-dargva.cau-lzg-pro
, is wrong; it should be ős-lezghian.cau-nec-pro
, is wrong; it should be ős-northeast caucasian.cau-nkh-pro
, is wrong; it should be ős-nakh.cau-nwc-pro
, is wrong; it should be ős-northwest caucasian.cau-tsz-pro
, is wrong; it should be ős-tsezian.cba-pro
, is wrong; it should be ős-chibchan.ccn-pro
, is wrong; it should be ős-north caucasian.ccs-gzn-pro
, is wrong; it should be ős-georgian-zan.ccs-pro
, is wrong; it should be ős-kartvelian.cdc-cbm-pro
, is wrong; it should be ős-central chadic.cdc-mas-pro
, is wrong; it should be ős-masa.cdc-pro
, is wrong; it should be ős-chadic.cdd-pro
, is wrong; it should be ős-caddoan.cel-bry-pro
, is wrong; it should be ős-brythonic.cel-pro
, is wrong; it should be ős-celtic.chi-pro
, is wrong; it should be ős-chimakuan.cmc-pro
, is wrong; it should be ős-chamic.csu-bba-pro
, is wrong; it should be ős-bongo-bagirmi.csu-maa-pro
, is wrong; it should be ős-mangbetu.csu-pro
, is wrong; it should be ős-central sudanic.csu-sar-pro
, is wrong; it should be ős-sara.cus-pro
, is wrong; it should be ős-cushitic.dmn-mdw-pro
, is wrong; it should be ős-western mande.dmn-pro
, is wrong; it should be ős-mande.dra-pro
, is wrong; it should be ős-dravidian.dru-pro
, is wrong; it should be ős-rukai.esx-esk-pro
, is wrong; it should be ős-eskimo.esx-inu-pro
, is wrong; it should be ős-inuit.esx-pro
, is wrong; it should be ős-eskimo-aleut.euq-pro
, is wrong; it should be ős-basque.fiu-fin-pro
, is wrong; it should be ős-finnic.gem-pro
, is wrong; it should be ős-germanic.gmq-pro
, is wrong; it should be ős-norse.gmw-pro
, is wrong; it should be ős-west germanic.grk-pro
, is wrong; it should be ős-hellenic.hmn-pro
, is wrong; it should be ős-hmong.hmx-mie-pro
, is wrong; it should be ős-mien.hmx-pro
, is wrong; it should be ős-hmong-mien.hyx-pro
, is wrong; it should be ős-armenian.iir-nur-pro
, is wrong; it should be ős-nuristani.iir-pro
, is wrong; it should be ős-indo-iranian.ijo-pro
, is wrong; it should be ős-ijoid.inc-dar-pro
, is wrong; it should be ős-dardic.inc-pro
, is wrong; it should be ős-indo-aryan.ine-ana-pro
, is wrong; it should be ős-anatolian.ine-bsl-pro
, is wrong; it should be ős-balti-szláv.ine-pro
, is wrong; it should be ősindoeurópai.ine-toc-pro
, is wrong; it should be ős-tocharian.inh
, is wrong; it should be ingus.ira-kms-pro
, is wrong; it should be ős-komisenian.ira-mny-pro
, is wrong; it should be ős-munji-yidgha.ira-mpr-pro
, is wrong; it should be ős-medo-parthian.ira-pat-pro
, is wrong; it should be ős-pathan.ira-pro
, is wrong; it should be ős-iranian.ira-sgc-pro
, is wrong; it should be ős-sogdic.ira-sgi-pro
, is wrong; it should be ős-sanglechi-ishkashimi.ira-shr-pro
, is wrong; it should be ős-shughni-roshani.ira-shy-pro
, is wrong; it should be ős-shughni-yazghulami.ira-sym-pro
, is wrong; it should be ős-shughni-yazghulami-munji.ira-zgr-pro
, is wrong; it should be ős-zaza-gorani.iro-pro
, is wrong; it should be ős-iroquoian.itc-pro
, is wrong; it should be ős-italic.itk
, is wrong; it should be judeo-olasz.izh
, is wrong; it should be izsór.jpx-pro
, is wrong; it should be ős-japonic.jpx-ryu-pro
, is wrong; it should be ős-ryukyuan.kar-pro
, is wrong; it should be ős-karen.khi-kho-pro
, is wrong; it should be ős-khoe.kmr
, is wrong; it should be északi kurd.kro-pro
, is wrong; it should be ős-kru.liv
, is wrong; it should be lív.map-ata-pro
, is wrong; it should be ős-atayalic.map-pro
, is wrong; it should be ős-austronesian.mkh-asl-pro
, is wrong; it should be ős-aslian.mkh-ban-pro
, is wrong; it should be ős-bahnaric.mkh-kat-pro
, is wrong; it should be ős-katuic.mkh-khm-pro
, is wrong; it should be ős-khmuic.mkh-kmr-pro
, is wrong; it should be ős-khmeric.mkh-mnc-pro
, is wrong; it should be ős-monic.mkh-pal-pro
, is wrong; it should be ős-palaungic.mkh-pea-pro
, is wrong; it should be ős-pearic.mkh-pkn-pro
, is wrong; it should be ős-pakanic.mkh-pro
, is wrong; it should be ős-mon-khmer.mkh-vie-pro
, is wrong; it should be ős-vietic.mun-pro
, is wrong; it should be ős-munda.myn-pro
, is wrong; it should be ős-mayan.nai-chu-pro
, is wrong; it should be ős-chumash.nai-ckn-pro
, is wrong; it should be ős-chinookan.nai-klp-pro
, is wrong; it should be ős-kalapuyan.nai-mdu-pro
, is wrong; it should be ős-maidun.nai-miz-pro
, is wrong; it should be ős-mixe-zoque.nai-plp-pro
, is wrong; it should be ős-plateau penutian.nai-pom-pro
, is wrong; it should be ős-pomo.nai-sca-pro
, is wrong; it should be ős-siouan-catawban.nai-tot-pro
, is wrong; it should be ős-totozoquean.nai-tsi-pro
, is wrong; it should be ős-tsimshianic.nai-utn-pro
, is wrong; it should be ős-utian.ngf-pro
, is wrong; it should be ős-trans-new guinea.nic-bco-pro
, is wrong; it should be ős-benue-congo.nic-bod-pro
, is wrong; it should be ős-bantoid.nic-eov-pro
, is wrong; it should be ős-eastern oti-volta.nic-gns-pro
, is wrong; it should be ős-gurunsi.nic-grf-pro
, is wrong; it should be ős-grassfields.nic-gur-pro
, is wrong; it should be ős-gur.nic-jkn-pro
, is wrong; it should be ős-jukunoid.nic-lcr-pro
, is wrong; it should be ős-lower cross river.nic-ogo-pro
, is wrong; it should be ős-ogoni.nic-ovo-pro
, is wrong; it should be ős-oti-volta.nic-plt-pro
, is wrong; it should be ős-plateau.nic-pro
, is wrong; it should be ős-niger-congo.nic-ubg-pro
, is wrong; it should be ős-ubangian.nic-ucr-pro
, is wrong; it should be ős-upper cross river.nic-vco-pro
, is wrong; it should be ős-volta-congo.nub-pro
, is wrong; it should be ős-nubian.omq-cha-pro
, is wrong; it should be ős-chatino.omq-maz-pro
, is wrong; it should be ős-mazatec.omq-mix-pro
, is wrong; it should be ős-mixtecan.omq-mxt-pro
, is wrong; it should be ős-mixtec.omq-otp-pro
, is wrong; it should be ős-oto-pamean.omq-pro
, is wrong; it should be ős-oto-manguean.omq-tri-pro
, is wrong; it should be ős-trique.omq-zap-pro
, is wrong; it should be ős-zapotecan.omq-zpc-pro
, is wrong; it should be ős-zapotec.omv-aro-pro
, is wrong; it should be ős-aroid.omv-diz-pro
, is wrong; it should be ős-dizoid.omv-pro
, is wrong; it should be ős-omotic.orv
, is wrong; it should be óorosz.os-pro
, is wrong; it should be ős-ossetic.oto-otm-pro
, is wrong; it should be ős-otomi.oto-pro
, is wrong; it should be ős-otomian.pdc
, is wrong; it should be pennsylvaniai német.phi-kal-pro
, is wrong; it should be ős-kalamian.phi-pro
, is wrong; it should be ős-philippine.pms
, is wrong; it should be piemonti.poz-btk-pro
, is wrong; it should be ős-bungku-tolaki.poz-cet-pro
, is wrong; it should be ős-central-eastern malayo-polynesian.poz-hce-pro
, is wrong; it should be ős-halmahera-cenderawasih.poz-lgx-pro
, is wrong; it should be ős-lampungic.poz-mcm-pro
, is wrong; it should be ős-malayo-chamic.poz-mly-pro
, is wrong; it should be ős-malayic.poz-msa-pro
, is wrong; it should be ős-malayo-sumbawan.poz-oce-pro
, is wrong; it should be ős-oceanic.poz-pep-pro
, is wrong; it should be ős-eastern polynesian.poz-pnp-pro
, is wrong; it should be ős-nuclear polynesian.poz-pol-pro
, is wrong; it should be ős-polynesian.poz-pro
, is wrong; it should be ős-malayo-polynesian.poz-ssw-pro
, is wrong; it should be ős-south sulawesi.poz-sus-pro
, is wrong; it should be ős-sunda-sulawesi.poz-swa-pro
, is wrong; it should be ős-north sarawak.pqe-pro
, is wrong; it should be ős-eastern malayo-polynesian.qfa-adm-pro
, is wrong; it should be ős-great andamanese.qfa-cka-pro
, is wrong; it should be ős-chukotko-kamchatkan.qfa-hur-pro
, is wrong; it should be ős-hurro-urartian.qfa-kad-pro
, is wrong; it should be ős-kadu.qfa-kms-pro
, is wrong; it should be ős-kam-sui.qfa-kor-pro
, is wrong; it should be ős-korean.qfa-kra-pro
, is wrong; it should be ős-kra.qfa-lic-pro
, is wrong; it should be ős-hlai.qfa-onb-pro
, is wrong; it should be ős-ong-be.qfa-ong-pro
, is wrong; it should be ős-ongan.qfa-tak-pro
, is wrong; it should be ős-kra-dai.qfa-yen-pro
, is wrong; it should be ős-yeniseian.qfa-yuk-pro
, is wrong; it should be ős-yukaghir.sai-jee-pro
, is wrong; it should be ős-jê.sal-pro
, is wrong; it should be ős-salish.sdv-daj-pro
, is wrong; it should be ős-daju.sdv-eje-pro
, is wrong; it should be ős-eastern jebel.sdv-nil-pro
, is wrong; it should be ős-nilotic.sdv-nyi-pro
, is wrong; it should be ős-nyima.sdv-tmn-pro
, is wrong; it should be ős-taman.sem-pro
, is wrong; it should be ős-semitic.sio-pro
, is wrong; it should be ős-siouan.sit-hrs-pro
, is wrong; it should be ős-hrusish.sit-kha-pro
, is wrong; it should be ős-kham.sit-luu-pro
, is wrong; it should be ős-luish.sit-pro
, is wrong; it should be ős-sino-tibetan.sit-tan-pro
, is wrong; it should be ős-tani.sla-pro
, is wrong; it should be ősszláv.smi-pro
, is wrong; it should be ős-samic.son-pro
, is wrong; it should be ős-songhay.sqj-pro
, is wrong; it should be ős-albanian.ssa-klk-pro
, is wrong; it should be ős-kuliak.ssa-kom-pro
, is wrong; it should be ős-koman.ssa-pro
, is wrong; it should be ős-nilo-saharan.syd-pro
, is wrong; it should be ős-samoyedic.tai-pro
, is wrong; it should be ős-tai.tai-swe-pro
, is wrong; it should be ős-southwestern tai.tbq-bdg-pro
, is wrong; it should be ős-bodo-garo.tbq-kuk-pro
, is wrong; it should be ős-kuki-chin.tbq-lal-pro
, is wrong; it should be ős-lalo.tbq-lob-pro
, is wrong; it should be ős-lolo-burmese.tbq-lol-pro
, is wrong; it should be ős-loloish.tok
(toki pona) is missing.trk-pro
, is wrong; it should be ős-turkic.tup-gua-pro
, is wrong; it should be ős-tupi-guarani.tup-pro
, is wrong; it should be ős-tupian.tuw-pro
, is wrong; it should be ős-tungusic.urj-mdv-pro
, is wrong; it should be ős-mordvinic.urj-prm-pro
, is wrong; it should be ős-permic.urj-pro
, is wrong; it should be ős-uralic.urj-ugr-pro
, is wrong; it should be ős-ugric.xgn-pro
, is wrong; it should be ős-mongolic.xme-ttc-pro
, is wrong; it should be ős-tatic.xnd-pro
, is wrong; it should be ős-na-dene.xsc-pro
, is wrong; it should be ős-scythian.xsc-sak-pro
, is wrong; it should be ős-saka.xsc-skw-pro
, is wrong; it should be ős-saka-wakhi.ypk-pro
, is wrong; it should be ős-yupik.zhx-min-pro
, is wrong; it should be ős-min.ie
, is repeated in the table of aliases
.gil
, is repeated in the table of aliases
.otk
, is repeated in the table of otherNames
.art-top
) has a canonical name that is not unique; it is also used by the code tok
.Bhks
) is missingBopo
) is missingBrah
) is missingBrai
) is missingBugi
) is missingBuhd
) is missingCakm
) is missingCari
) is missingCham
) is missingCher
) is missingChrs
) is missingDogr
) is missingDsrt
) is missingDupl
) is missingElba
) is missingGeok
) is missingGong
) is missingGonm
) is missingGoth
) is missingGran
) is missingGuru
) is missingHang
) is missingHani
) is missingHano
) is missingHans
) is missingHant
) is missingHatr
) is missingIbrn
) is missingImag
) is missingInds
) is missingItal
) is missingJurc
) is missingKali
) is missingKana
) is missingKhar
) is missingKhmr
) is missingKhoj
) is missingKitl
) is missingKits
) is missingKnda
) is missingKthi
) is missingLana
) is missingLaoo
) is missingLatf
) is missingLeke
) is missingLepc
) is missingLimb
) is missingLisu
) is missingLyci
) is missingMahj
) is missingMaka
) is missingMand
) is missingMani
) is missingMarc
) is missingMedf
) is missingMend
) is missingMerc
) is missingMero
) is missingModi
) is missingMong
) is missingMroo
) is missingMtei
) is missingMult
) is missingMymr
) is missingNbat
) is missingNewa
) is missingNkoo
) is missingNone
) is missingNshu
) is missingOgam
) is missingOlck
) is missingOrkh
) is missingOrya
) is missingOsge
) is missingOsma
) is missingPalm
) is missingPauc
) is missingPhag
) is missingPhli
) is missingPhlp
) is missingPhlv
) is missingPlrd
) is missingPrti
) is missingRjng
) is missingRohg
) is missingRunr
) is missingSamr
) is missingSaur
) is missingSgnw
) is missingShaw
) is missingShrd
) is missingSidd
) is missingSind
) is missingSogd
) is missingSogo
) is missingSora
) is missingSoyo
) is missingSylo
) is missingTagb
) is missingTakr
) is missingTale
) is missingTalu
) is missingTang
) is missingTavt
) is missingTeng
) is missingTfng
) is missingTglg
) is missingThaa
) is missingTibt
) is missingTirh
) is missingUgar
) is missingVaii
) is missingWara
) is missingYiii
) is missingZanb
) is missingZmth
) is missingZyyy
) is missingHira
) is not used by any language.Imag
) is not used by any language and has no characters listed for auto-detection.Jurc
) is not used by any language and has no characters listed for auto-detection.Medf
) is not used by any language.Morse
) is not used by any language and has no characters listed for auto-detection.Semap
) is not used by any language and has no characters listed for auto-detection.Zzzz
) is not used by any language and has no characters listed for auto-detection.For multiple data modules:
otherNames
, if present, must be an array.The following must be true of the data used by Module:languages:
1
) must be present and must not be the same as the canonical name of another language.scripts
is given, it must be an array, and each string in the array must be a valid script code.ancestors
is given, it must be an array, and each string in the array must be a valid language or etymology language code.family
is given, it must be a valid family code.type
is given, it must be one of the recognised values (regular
, reconstructed
, appendix-constructed
).entry_name
is given, it must be a table that contains either two arrays (from
and to
) or a string (remove_diacritics
) or both.sort_key
is given, it may either be a string, or at table that in turn contains either two arrays (from
and to
) or a string (remove_diacritics
).entry_name
or sort_key
is given, the from
array must be longer or equal in length to the to
array.standardChars
is given, it must form a valid Lua string pattern when placed between square brackets with ^
before it ("
). (It should match all characters regularly used in the language, but that cannot be tested.)"canonicalName", "entry_name", "sort_key", "otherNames", "type", "scripts", "family", "ancestors", "wikimedia_codes", "wikipedia_article", "standardChars", "translit_module", "override_translit", "link_tr", "wikidata_item"
.Checks not performed:
translit_module
is present, it should be the name of a module, and this module should contain a tr
function that takes a pagename (and optionally a language code and script code) as arguments.sort_key
is a string, it should be the name of a module, and this module should contain a makeSortKey
function that takes a pagename (and optionally a language code and script code) as arguments.entry_name
or sort_key
is a table and contains a field remove_diacritics
, the value of the field should be a string that forms a valid Lua pattern when it is placed inside negated set notation (
).These are not checked here, because module errors will quickly crop up in entries if these conditions are not met, assuming that Module:utilities attempts to generate a sortkey for a category pertaining to the language in question, or full_link
attempts to use the transliteration module.
Module:languages/code to canonical name and Module:languages/canonical names must contain all the codes and canonical names found in the data submodules of Module:languages, and no more.
The following must be true of the data used by Module:etymology languages:
canonicalName
must be given.parent
must be given must be a valid language, family or etymology-only language code.ancestors
is given, it must be an array, and each string in the array must be a valid language or etymology language code. The etymology language should also be listed as the ancestor of a regular language."canonicalName", "otherNames", "parent", "ancestors", "wikipedia_article", "wikidata_item"
.Codes in Module:families data must:
canonicalName
, which must not be the same as the canonical name of another family.family
is given, it must be a valid family code."canonicalName", "otherNames", "family", "protoLanguage", "wikidata_item"
.Codes in Module:scripts data must:
canonicalName
.characters
pattern for script autodetection, and this must form a valid Lua string pattern when placed between square brackets (""
). (It should match all characters in the script, but that cannot be tested.)"canonicalName", "otherNames", "parent", "systems", "wikipedia_article", "characters", "direction"
.local export = {}
local m_language_data = require("Module:languages/alldata")
local m_language_codes = require('Module:languages/code to canonical name')
local m_language_canonical_names = require('Module:languages/canonical names')
local m_etym_language_data = require("Module:etymology languages/data")
local m_family_data = require('Module:families/data')
local m_script_data = require('Module:scripts/data')
local m_table = require("Module:table")
local Array = require("Module:array")
local messages
local function discrepancy(modname, ...)
messages:insert(string.format(...))
end
local all_codes = {}
local language_names = {}
local family_names = {}
local script_names = {}
local nonempty_families = {}
local allowed_empty_families = {tbq = true}
local nonempty_scripts = {}
local function link(name)
if not name then
return "???"
elseif name:find("anguage$") then
return "]"
else
return "]"
end
end
local function link_script(name)
if not name then
return "???"
elseif name:find("ode$") or name:find("emaphore$") then
return "]"
else
return "]"
end
end
local function invalid_keys_message(modname, code, data, invalid_keys, is_script)
local plural = #invalid_keys ~= 1
discrepancy(modname, "The data key%s %s for %s (<code>%s</code>) %s invalid.",
plural and "s" or "",
invalid_keys
:map(
function(key)
return '<code>' .. key .. '</code>'
end)
:concat(", "),
(is_script and link_script or link)(data.canonicalName or data),
code,
plural and "are" or "is")
end
local function check_data_keys(valid_keys, is_script)
valid_keys = Array(valid_keys):to_set()
return function (modname, code, data)
local invalid_keys
for k in pairs(data) do
if not valid_keys then
invalid_keys = invalid_keys or Array()
invalid_keys:insert(k)
end
end
if invalid_keys then
invalid_keys_message(modname, code, data, invalid_keys, is_script)
end
end
end
-- Modification of isArray in ].
local function find_gap(t)
local i = 0
for _ in pairs(t) do
i = i + 1
if t == nil then
return i
end
end
end
local function check_array(modname, code, data, array_name)
local gap = find_gap(data)
if gap then
discrepancy(modname, "The %s array in the data table for %s (<code>%s</code>) has a gap at index %d.",
array_name, data.canonicalName or data, code, gap)
end
end
local function check_other_names_or_aliases(modname, code, canonical_name, data, data_key, allow_nested)
local array = data
if not array then
return
end
check_array(modname, code, data, data_key)
local names = {}
local function check_other_name(other_name)
if other_name == canonical_name then
discrepancy(modname,
"%s, the canonical name for <code>%s</code>, is repeated in the table of <code>%s</code>.",
canonical_name, code, data_key)
end
if names then
discrepancy(modname,
"The name %s is found twice or more in the list of <code>%s</code> for %s (<code>%s</code>).",
other_name, data_key, canonical_name, code)
end
names = true
end
for _, other_name in ipairs(array) do
if type(other_name) == "table" then
if not allow_nested then
discrepancy(modname,
"A nested table is found in the list of <code>%s</code> for %s (<code>%s</code>), but isn't allowed.",
data_key, canonical_name, code)
else
for _, on in ipairs(other_name) do
check_other_name(on)
end
end
else
check_other_name(other_name)
end
end
end
local function check_other_names_aliases_varieties(modname, code, canonical_name, data)
if data.otherNames then
check_other_names_or_aliases(modname, code, canonical_name, data, "otherNames")
end
if data.aliases then
check_other_names_or_aliases(modname, code, canonical_name, data, "aliases")
end
if data.varieties then
check_other_names_or_aliases(modname, code, canonical_name, data, "varieties", true)
end
end
local get_codepoint = mw.ustring.codepoint
local function validate_pattern(pattern, modname, code, data, standardChars)
if type(pattern) ~= "string" then
discrepancy(modname, '"%s", the %spattern for %s (<code>%s</code>), is not a string.',
pattern, standardChars and 'standard character ' or '', code, data.canonicalName)
end
local ranges
for lower, higher in mw.ustring.gmatch(pattern, "(.)%-(.)") do
if get_codepoint(lower) >= get_codepoint(higher) then
ranges = ranges or Array()
table.insert(ranges, { lower, higher })
end
end
if ranges and ranges then
local plural = #ranges ~= 1 and "s" or ""
discrepancy(modname, '%s (<code>%s</code>) specifies an invalid pattern ' ..
'for %scharacter detection: <code>"%s"</code>. The first codepoint%s ' ..
'in the range%s %s %s must be less than the second.',
link(data.canonicalName), code, standardChars and 'standard ' or '', pattern, plural, plural,
ranges
:map(
function(range)
return range .. "-" .. range .. (" (U+%X, U+%X)")
:format(get_codepoint(range), get_codepoint(range))
end)
:concat(", "),
#ranges ~= 1 and "are" or "is")
end
if not pcall(mw.ustring.find, "", "") then
discrepancy(modname, '%s (<code>%s</code>) specifies an invalid pattern for ' ..
(standardChars and 'standard' or '') .. ' character detection: <code>"%s"</code>',
link(data.canonical_name), code, pattern)
end
end
local function check_entry_name_or_sortkey(modname, code, data, replacements_name)
local replacements = data
if type(replacements) == "string" then
if replacements_name ~= "sort_key" then
discrepancy(modname, "The %s field in the data table for %s (<code>%s</code>) must be a table.",
replacements_name, data.canonicalName, code)
end
return
end
if (replacements.from ~= nil) ~= (replacements.to ~= nil) then
discrepancy(modname,
"The <code>from</code> and <code>to</code> arrays in the <code>%s</code> table for %s (<code>%s</code>) are not both defined or both undefined.",
replacements_name, data.canonicalName, code)
elseif replacements.from then
for _, key in ipairs { "from", "to" } do
local gap = find_gap(replacements)
if gap then
discrepancy(modname,
"The %s array in the %s table for %s (<code>%s</code>) has a gap at index %d.",
key, replacements_name, data.canonicalName, code, gap)
end
end
end
if replacements.remove_diacritics and type(replacements.remove_diacritics) ~= "string" then
discrepancy(modname,
"The <code>remove_diacritics</code> field in the <code>%s</code> table for %s (<code>%s</code>) table must be a string.",
replacements_name, data.canonicalName, code)
end
if replacements.from and replacements.to
and m_table.length(replacements.to) > m_table.length(replacements.from) then
discrepancy(modname,
"The <code>from</code> array in the <code>%s</code> table for %s (<code>%s</code>) must be shorter or the same length as the <code>to</code> array.",
replacements_name, data.canonicalName, code)
end
end
local function has_regular_language_child(parent_code)
for code, data in pairs(m_language_data) do
local ancestors = data.ancestors
if ancestors then
for _, ancestor in pairs(ancestors) do
if ancestor == parent_code then
return true
end
end
end
end
return false
end
local function check_ancestors(modname, code, data, ancestors, is_etymology_language)
check_array(modname, code, data, "ancestors")
local canonical_name = data or data.canonicalName
if is_etymology_language then
if not has_regular_language_child(code) then
discrepancy(modname,
"The etymology language %s (<code>%s</code>) has an <code>ancestors</code> field, "
.. "but no regular languages list it as an ancestor.",
link(canonical_name), code)
end
end
for _, ancestor_code in ipairs(ancestors) do
if not (m_language_data or m_etym_language_data) then
discrepancy(modname,
"%s (<code>%s</code>) lists an invalid language code <code>%s</code> as ancestor.",
link(canonical_name), code, ancestor_code)
end
end
end
local function check_languages()
local check_language_data_keys = check_data_keys{
1, 2, 3, -- canonical name, wikidata item, family
"entry_name", "sort_key", "otherNames", "aliases", "varieties",
"type", "scripts", "ancestors",
"wikimedia_codes", "wikipedia_article", "standardChars",
"translit_module", "override_translit", "link_tr",
}
local function check_language(modname, code, data)
local canonical_name, wikidata_item, lang_type = data, data, data.type
check_language_data_keys(modname, code, data)
if all_codes then
discrepancy(modname, "Code <code>%s</code> is not unique; it is also defined in ].", code, all_codes)
else
if not m_language_codes then
discrepancy("languages/code to canonical name", "The code <code>%s</code> (%s) is missing.", code, canonical_name)
end
all_codes = modname
end
if not canonical_name then
discrepancy(modname, "Code <code>%s</code> has no canonical name specified.", code)
elseif language_names then
discrepancy(modname,
"%s (<code>%s</code>) has a canonical name that is not unique; it is also used by the code <code>%s</code>.",
link(canonical_name), code, language_names)
else
if not m_language_canonical_names then
discrepancy("languages/canonical names", "The canonical name %s (<code>%s</code>) is missing.", canonical_name, code)
end
language_names = code
end
if wikidata_item then
if not wikidata_item:match '^Q%d+$' then
discrepancy(modname,
"%s (<code>%s</code>) has a Wikidata item with an invalid form: <code>%s</code>.",
canonical_name, code, wikidata_item)
end
end
check_other_names_aliases_varieties(modname, code, canonical_name, data)
if lang_type and not (lang_type == "regular" or lang_type == "reconstructed" or lang_type == "appendix-constructed") then
discrepancy(modname, "%s (<code>%s</code>) is of an invalid type <code>%s</code>.", link(canonical_name), code, data.type)
end
if data.scripts then
check_array(modname, code, data, "scripts")
if not data.scripts then
discrepancy(modname, "%s (<code>%s</code>) has no scripts listed.", link(canonical_name), code)
else
for _, sccode in ipairs(data.scripts) do
if not m_script_data then
discrepancy(modname,
"%s (<code>%s</code>) lists an invalid script code <code>%s</code>.",
link(canonical_name), code, sccode)
end
nonempty_scripts = true
end
end
end
if data.ancestors then
check_ancestors(modname, code, data, data.ancestors, false)
end
if data then
local family = data
if not m_family_data then
discrepancy(modname,
"%s (<code>%s</code>) has an invalid family code <code>%s</code>.",
link(canonical_name), code, family)
end
nonempty_families = true
end
if data.sort_key then
check_entry_name_or_sortkey(modname, code, data, "sort_key")
end
if data.entry_name then
check_entry_name_or_sortkey(modname, code, data, "entry_name")
end
if data.standardChars then
validate_pattern(data.standardChars, modname, code, data, true)
end
end
-- Check two-letter codes
local modname = "languages/data2"
local data2 = require("Module:" .. modname)
for code, data in pairs(data2) do
if not code:find("^$") then
discrepancy(modname, '%s (<code>%s</code>) does not have a two-letter code.', link(data.canonicalName), code)
end
check_language(modname, code, data)
end
-- Check three-letter codes
for i = string.byte('a'), string.byte('z') do
local letter = string.char(i)
local modname = "languages/data3/" .. letter
local data3 = require("Module:" .. modname)
local code_pattern = "^" .. letter .. "$"
for code, data in pairs(data3) do
if not code:find(code_pattern) then
discrepancy(modname,
'%s (<code>%s</code>) does not have a three-letter code starting with "<code>%s</code>".',
link(data.canonicalName), code, letter)
end
check_language(modname, code, data)
end
end
-- Check exceptional codes
modname = "languages/datax"
local datax = require("Module:" .. modname)
for code, data in pairs(datax) do
if code:find("^?$") then
discrepancy(modname, '%s (<code>%s</code>) has a two- or three-letter code.', link(data.canonicalName), code)
end
check_language(modname, code, data)
end
-- These checks must be done while all_codes only contains language codes:
-- that is, after language data modules have been processed, but before
-- etymology languages, families, and scripts have.
local function check_code_and_name(modname, code, canonical_name)
if not all_codes then
if not language_names then
discrepancy(modname,
"The code <code>%s</code> and the canonical name %s should be removed; they are not found in a submodule of ].",
code, canonical_name)
else
discrepancy(modname,
"<code>%s</code>, the code for the canonical name %s, is wrong; it should be <code>%s</code>.",
code, canonical_name, language_names)
end
elseif not language_names then
local data_table = require("Module:" .. all_codes)
discrepancy(modname,
"%s, the canonical name for the code <code>%s</code>, is wrong; it should be %s.",
canonical_name, code, data_table or data_table.canonicalName)
end
end
for code, canonical_name in pairs(m_language_codes) do
check_code_and_name("languages/code to canonical name", code, canonical_name)
end
for canonical_name, code in pairs(m_language_canonical_names) do
check_code_and_name("languages/canonical names", code, canonical_name)
end
end
local function check_etym_languages()
local modname = "etymology languages/data"
local check_etymology_language_data_keys = check_data_keys{
"canonicalName", "otherNames", "aliases", "varieties", "parent",
"wikipedia_article", "wikidata_item", "ancestors"
}
local function link(name)
if not name then
return "???"
elseif name:find("anguage$") then
return name
else
return name .. " language"
end
end
for code, data in pairs(m_etym_language_data) do
local canonical_name, parent, ancestors =
data.canonicalName, data.parent, data.ancestors
check_etymology_language_data_keys(modname, code, data)
if all_codes then
discrepancy(modname, "Code <code>%s</code> is not unique; it is also defined in ].", code, all_codes)
else
all_codes = modname
end
if not canonical_name then
discrepancy(modname, "Code <code>%s</code> has no canonical name specified.", code)
elseif language_names then
--[=[
discrepancy(modname,
"%s (<code>%s</code>) has a canonical name that is not unique; it is also used by the code <code>%s</code>.",
link(data.names), code, language_names])
--]=]
else
language_names = code
end
check_other_names_aliases_varieties(modname, code, canonical_name, data)
if parent then
if type(parent) ~= "string" then
discrepancy(modname,
"Etymology-only %s (<code>%s</code>) has a parent language or family code that is %s rather than a string.",
link(canonical_name), code, parent == nil and "nil" or "a " .. type(parent))
elseif not (m_language_data or m_family_data or m_etym_language_data) then
discrepancy(modname,
"Etymology-only %s (<code>%s</code>) has invalid parent language or family code <code>%s</code>.",
link(canonical_name), code, parent)
end
nonempty_families = true
else
discrepancy(modname,
"Etymology-only %s (<code>%s</code>) has no parent language or family code.",
link(canonical_name), code)
end
if ancestors then
check_ancestors(modname, code, data, ancestors, true)
end
end
local checked = {}
for code, data in pairs(m_etym_language_data) do
local stack = {}
while data do
if checked then
break
end
if stack then
discrepancy(modname, "%s (<code>%s</code>) has a cyclic parental relationship to %s (<code>%s</code>)",
link(data or data.canonicalName), code,
link(m_etym_language_data.canonicalName), data.parent
)
break
end
stack = true
code, data = data.parent, data.parent and m_etym_language_data
end
for data in pairs(stack) do
checked = true
end
end
end
local function check_families()
local modname = "families/data"
local check_family_data_keys = check_data_keys{
"canonicalName", "otherNames", "aliases", "varieties", "family",
"protoLanguage", "wikidata_item"
}
local function link(name)
if not name then
return "???"
elseif name:find("anguages$") then
return "]"
else
return "]"
end
end
for code, data in pairs(m_family_data) do
check_family_data_keys(modname, code, data)
if all_codes then
discrepancy(modname, "Code <code>%s</code> is not unique; it is also defined in ].", code, all_codes)
else
all_codes = modname
end
if not data.canonicalName then
discrepancy(modname, "<code>%s</code> has no canonical name specified.", code)
elseif family_names then
discrepancy(modname,
"%s (<code>%s</code>) has a canonical name that is not unique; it is also used by the code <code>%s</code>.",
link(data.canonicalName), code, family_names)
else
family_names = code
end
check_other_names_aliases_varieties(modname, code, data.canonicalName, data)
if data.family then
if data.family == code and code ~= "qfa-not" then
discrepancy(modname,
"%s (<code>%s</code>) has itself as its family.",
link(data.canonicalName), code)
elseif not m_family_data then
discrepancy(modname,
"%s (<code>%s</code>) has an invalid parent family code <code>%s</code>.",
link(data.canonicalName), code, data.family)
end
nonempty_families = true
end
end
for code, data in pairs(m_family_data) do
if not (nonempty_families or allowed_empty_families) then
discrepancy(modname, "%s (<code>%s</code>) has no child families or languages.", link(data.canonicalName), code)
end
end
local checked = { = true }
for code, data in pairs(m_family_data) do
local stack = {}
while data do
if checked then
break
end
if stack then
discrepancy(modname, "%s (<code>%s</code>) has a cyclic parental relationship to %s (<code>%s</code>)",
link(data or data.canonicalName), code,
link(m_family_data].canonicalName), data
)
break
end
stack = true
code, data = data.family, m_family_data]
end
for code in pairs(stack) do
checked = true
end
end
end
local function check_scripts()
local modname = "scripts/data"
local check_script_data_keys = check_data_keys({
"canonicalName", "otherNames", "aliases", "varieties", "parent",
"systems", "wikipedia_article", "characters", "direction",
"character_category",
}, true)
local m_script_codes = require('Module:scripts/code to canonical name')
local m_script_canonical_names = require('Module:scripts/by name')
for code, data in pairs(m_script_data) do
local canonical_name = data.canonicalName
if not m_script_codes and #code == 4 then
discrepancy('scripts/code to canonical name', '<code>%s</code> (%s) is missing', code, canonical_name)
end
check_script_data_keys(modname, code, data)
if not canonical_name then
discrepancy(modname, "Code <code>%s</code> has no canonical name specified.", code)
elseif script_names then
--[=[
discrepancy(modname,
"%s (<code>%s</code>) has a canonical name that is not unique; it is also used by the code <code>%s</code>.",
link_script(data.names), code, script_names])
--]=]
else
if not m_script_canonical_names and #code == 4 then
discrepancy('scripts/by name', '%s (<code>%s</code>) is missing', canonical_name, code)
end
script_names = code
end
check_other_names_aliases_varieties(modname, code, canonical_name, data)
if not nonempty_scripts then
discrepancy(modname,
"%s (<code>%s</code>) is not used by any language%s.",
link_script(canonical_name), code, data.characters and ""
or " and has no characters listed for auto-detection")
--[[
elseif not data.characters then
discrepancy(modname, "%s (<code>%s</code>) has no characters listed for auto-detection.", link_script(canonical_name), code)
--]]
end
if data.characters then
validate_pattern(data.characters, modname, code, data, false)
end
end
end
-- Warning: cannot be called twice in the same module invocation because
-- some module-global variables are not reset between calls.
function export.do_checks()
messages = setmetatable({}, {
__index = function (self, k)
local val = Array()
self = val
return val
end
})
check_languages()
check_etym_languages()
-- families and scripts must be checked AFTER languages; languages checks fill out
-- the nonempty_families and nonempty_scripts tables, used for testing if a family/script
-- is ever used in the data
check_families()
check_scripts()
setmetatable(messages, nil)
local function find_code(message)
return string.match(message, "<code>(+)</code>")
end
find_code = require("Module:fun").memoize(find_code)
local function comp(message1, message2)
local code1, code2 = find_code(message1), find_code(message2)
if code1 and code2 then
return code1 < code2
else
return message1 < message2
end
end
for modname, msglist in pairs(messages) do
msglist:sort(comp)
end
local ret = messages
messages = nil
return ret
end
function export.format_message(modname, msglist)
return '===]==='
.. msglist
:map(
function(msg)
return "\n* " .. msg
end)
:concat()
end
function export.check_modules(...)
local ret = Array()
local messages = export.do_checks()
for _, module in ipairs {...} do
local msglist = messages
if msglist then
ret:insert(export.format_message(module, msglist))
end
end
return ret:concat("\n")
end
function export.check_modules_t(frame)
local args = m_table.shallowcopy(frame.args)
return export.check_modules(unpack(args))
end
function export.perform(frame)
local messages = export.do_checks()
-- Format the messages
local ret = Array()
for modname, msglist in m_table.sortedPairs(messages) do
ret:insert(export.format_message(modname, msglist))
end
-- Are there any messages?
if i == 1 then
return '<b class="success">Glory to Arstotzka.</b>'
else
ret:insert(1, '<b class="warning">Discrepancies detected:</b>')
return ret:concat('\n')
end
end
return export