├── js ├── dataTypes │ ├── __namespace.js │ ├── DataTypeStore.js │ └── DataType.js └── resources.php ├── i18n ├── ig.json ├── mt.json ├── lv.json ├── ckb.json ├── nds.json ├── or.json ├── so.json ├── ce.json ├── ug-arab.json ├── hy.json ├── ps.json ├── frp.json ├── bs.json ├── mr.json ├── ta.json ├── bn.json ├── te.json ├── el.json ├── ja.json ├── si.json ├── pms.json ├── ka.json ├── lt.json ├── ml.json ├── ms.json ├── dsb.json ├── vi.json ├── hsb.json ├── ilo.json ├── ba.json ├── nn.json ├── da.json ├── kab.json ├── ro.json ├── eu.json ├── ko.json ├── eo.json ├── zh-hans.json ├── zh-hant.json ├── lb.json ├── mk.json ├── tt-cyrl.json ├── he.json ├── sco.json ├── cy.json ├── et.json ├── it.json ├── uk.json ├── ast.json ├── fa.json ├── oc.json ├── be-tarask.json ├── gd.json ├── bg.json ├── ksh.json ├── roa-tara.json ├── hi.json ├── ia.json ├── id.json ├── pl.json ├── br.json ├── sr-ec.json ├── fr.json ├── gl.json ├── mg.json ├── ar.json ├── cs.json ├── de.json ├── nl.json ├── nb.json ├── diq.json ├── en.json ├── sv.json ├── fi.json ├── hu.json ├── pt-br.json ├── ru.json ├── ca.json ├── es.json ├── pt.json └── qqq.json ├── src ├── DataTypesModule.php ├── DataType.php ├── DataTypeFactory.php └── Modules │ └── DataTypesModule.php ├── DataTypes.php ├── package.json ├── DataTypes.mw.php ├── README.md └── COPYING /js/dataTypes/__namespace.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ignore 3 | */ 4 | this.dataTypes = {}; 5 | -------------------------------------------------------------------------------- /i18n/ig.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ukabia" 5 | ] 6 | }, 7 | "datatypes-type-number": "Ọ́nụ́ọ̀gụ̀gụ̀" 8 | } -------------------------------------------------------------------------------- /i18n/mt.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Chrisportelli" 5 | ] 6 | }, 7 | "datatypes-type-number": "Numru" 8 | } -------------------------------------------------------------------------------- /i18n/lv.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Papuass" 5 | ] 6 | }, 7 | "datatypes-type-globe-coordinate": "Ģeogrāfiskās koordinātas" 8 | } -------------------------------------------------------------------------------- /i18n/ckb.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Calak" 5 | ] 6 | }, 7 | "datatypes-type-string": "زنجیرەنووسە", 8 | "datatypes-type-time": "کات" 9 | } -------------------------------------------------------------------------------- /i18n/nds.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Joachim Mos" 5 | ] 6 | }, 7 | "datatypes-type-boolean": "Boolean", 8 | "datatypes-type-time": "Tied" 9 | } -------------------------------------------------------------------------------- /i18n/or.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ansumang" 5 | ] 6 | }, 7 | "datatypes-type-quantity": "ପରିମାଣ", 8 | "datatypes-type-number": "ନମ୍ବର" 9 | } -------------------------------------------------------------------------------- /i18n/so.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Abshirdheere" 5 | ] 6 | }, 7 | "datatypes-type-quantity": "Tayo", 8 | "datatypes-type-number": "Tiro" 9 | } -------------------------------------------------------------------------------- /i18n/ce.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Умар" 5 | ] 6 | }, 7 | "datatypes-type-globe-coordinate": "Географин координаташ", 8 | "datatypes-type-time": "Хан" 9 | } -------------------------------------------------------------------------------- /src/DataTypesModule.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | namespace DataTypes; 11 | 12 | if ( defined( 'DataTypes_VERSION' ) ) { 13 | // Do not initialize more than once. 14 | return 1; 15 | } 16 | 17 | define( 'DataTypes_VERSION', '1.1.0' ); 18 | 19 | if ( defined( 'MEDIAWIKI' ) ) { 20 | include __DIR__ . '/DataTypes.mw.php'; 21 | } 22 | -------------------------------------------------------------------------------- /i18n/te.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Veeven" 5 | ] 6 | }, 7 | "datatypes-type-string": "పదబంధం", 8 | "datatypes-type-quantity": "రాశి", 9 | "datatypes-type-monolingual-text": "ఏకభాషా పాఠ్యం", 10 | "datatypes-type-multilingual-text": "పలు భాషల పాఠ్యం", 11 | "datatypes-type-number": "సంఖ్య", 12 | "datatypes-type-mediawiki-title": "మీడియావికీ శీర్షిక", 13 | "datatypes-type-time": "సమయం" 14 | } -------------------------------------------------------------------------------- /i18n/el.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Glavkos", 5 | "Protnet", 6 | "ZaDiak" 7 | ] 8 | }, 9 | "datatypes-desc": "Συλλογή από ορισμούς τύπων δεδομένων", 10 | "datatypes-type-string": "Συμβολοσειρά", 11 | "datatypes-type-quantity": "Ποσότητα", 12 | "datatypes-type-number": "Αριθμός", 13 | "datatypes-type-mediawiki-title": "Τίτλος MediaWiki", 14 | "datatypes-type-unknown": "Αδιευκρίνιστο", 15 | "datatypes-type-boolean": "Δυαδική τιμή" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Fryed-peach", 5 | "Shirayuki" 6 | ] 7 | }, 8 | "datatypes-desc": "データ型の定義のコレクション", 9 | "datatypes-type-string": "文字列", 10 | "datatypes-type-quantity": "数量", 11 | "datatypes-type-number": "数値", 12 | "datatypes-type-mediawiki-title": "MediaWiki ページ名", 13 | "datatypes-type-unknown": "未指定", 14 | "datatypes-type-boolean": "ブール値", 15 | "datatypes-type-globe-coordinate": "緯度経度", 16 | "datatypes-type-time": "時刻" 17 | } 18 | -------------------------------------------------------------------------------- /i18n/si.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "පසිඳු කාවින්ද" 5 | ] 6 | }, 7 | "datatypes-desc": "දත්ත වර්ග නිර්වචනවල එකතුවක්", 8 | "datatypes-type-string": "තන්තුව", 9 | "datatypes-type-quantity": "ප්‍රමාණය", 10 | "datatypes-type-number": "අංකය", 11 | "datatypes-type-mediawiki-title": "මාධ්‍යවිකි ශීර්ෂය", 12 | "datatypes-type-unknown": "විශේෂණය නොකෙරූ", 13 | "datatypes-type-boolean": "බූලියන්", 14 | "datatypes-type-globe-coordinate": "භූගෝලීය ඛණ්ඩාංකය" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/pms.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Dragonòt" 5 | ] 6 | }, 7 | "datatypes-desc": "Colession ëd definission ëd sòrt ëd dat", 8 | "datatypes-type-string": "Stringa", 9 | "datatypes-type-quantity": "Quantità", 10 | "datatypes-type-number": "Nùmer", 11 | "datatypes-type-mediawiki-title": "Tìtol MediaWiki", 12 | "datatypes-type-unknown": "Pa specificà", 13 | "datatypes-type-boolean": "Boolean", 14 | "datatypes-type-globe-coordinate": "Coordinà geogràfica" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/ka.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "David1010" 5 | ] 6 | }, 7 | "datatypes-type-string": "ველი", 8 | "datatypes-type-quantity": "რაოდენობა", 9 | "datatypes-type-number": "ნომერი", 10 | "datatypes-type-mediawiki-title": "მედიავიკის სათაური", 11 | "datatypes-type-unknown": "არ არის მითითებული", 12 | "datatypes-type-boolean": "ლოგიკური მნიშვნელობა", 13 | "datatypes-type-globe-coordinate": "გეოგრაფიული კოორდინატები", 14 | "datatypes-type-time": "დროის მომენტი" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/lt.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Eitvys200" 5 | ] 6 | }, 7 | "datatypes-type-quantity": "Kiekis", 8 | "datatypes-type-monolingualtext": "Vienkalbis tekstas", 9 | "datatypes-type-multilingualtext": "Daugiakalbis tekstas", 10 | "datatypes-type-number": "Numeris", 11 | "datatypes-type-mediawiki-title": "MediaWiki pavadinimas", 12 | "datatypes-type-unknown": "Nenurodyta", 13 | "datatypes-type-globe-coordinate": "Geografinės koordinatės", 14 | "datatypes-type-time": "Laikas" 15 | } 16 | -------------------------------------------------------------------------------- /i18n/ml.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Praveenp" 5 | ] 6 | }, 7 | "datatypes-desc": "ഡേറ്റാ ടൈപ്പ് നിർവചനങ്ങളുടെ ശേഖരം", 8 | "datatypes-type-string": "പദം", 9 | "datatypes-type-quantity": "അളവ്", 10 | "datatypes-type-number": "സംഖ്യ", 11 | "datatypes-type-mediawiki-title": "മീഡിയവിക്കി തലക്കെട്ട്", 12 | "datatypes-type-unknown": "വ്യക്തമാക്കാത്തവ", 13 | "datatypes-type-boolean": "ബൂളിയൻ", 14 | "datatypes-type-globe-coordinate": "ഭൗമനിർദ്ദേശാങ്കങ്ങൾ", 15 | "datatypes-type-time": "സമയം" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/ms.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Anakmalaysia" 5 | ] 6 | }, 7 | "datatypes-desc": "Koleksi definisi jenis data", 8 | "datatypes-type-string": "Rentetan", 9 | "datatypes-type-quantity": "Kuantiti", 10 | "datatypes-type-number": "Nombor", 11 | "datatypes-type-mediawiki-title": "Tajuk MediaWiki", 12 | "datatypes-type-unknown": "Tidak ditentukan", 13 | "datatypes-type-boolean": "Boolean", 14 | "datatypes-type-globe-coordinate": "Koordinat geografi", 15 | "datatypes-type-time": "Waktu" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/dsb.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Michawiki" 5 | ] 6 | }, 7 | "datatypes-desc": "Zběrka definicijow datowych typow", 8 | "datatypes-type-string": "Znamuškowy rjeśazk", 9 | "datatypes-type-quantity": "Tšocha", 10 | "datatypes-type-number": "Licba", 11 | "datatypes-type-mediawiki-title": "Titel MediaWiki", 12 | "datatypes-type-unknown": "Njepódany", 13 | "datatypes-type-boolean": "Boolean", 14 | "datatypes-type-globe-coordinate": "Geografiske koordinaty", 15 | "datatypes-type-time": "Cas" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/vi.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Minh Nguyen" 5 | ] 6 | }, 7 | "datatypes-desc": "Bộ sưu tập các định nghĩa kiểu dữ liệu", 8 | "datatypes-type-string": "Chuỗi", 9 | "datatypes-type-quantity": "Số lượng", 10 | "datatypes-type-number": "Số", 11 | "datatypes-type-mediawiki-title": "Tiêu đề MediaWiki", 12 | "datatypes-type-unknown": "Không xác định", 13 | "datatypes-type-boolean": "Luận lý", 14 | "datatypes-type-globe-coordinate": "Tọa độ địa lý", 15 | "datatypes-type-time": "Thời điểm" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/hsb.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Michawiki" 5 | ] 6 | }, 7 | "datatypes-desc": "Zběrka definicijow datowych typow", 8 | "datatypes-type-string": "Znamješkowy rjećazk", 9 | "datatypes-type-quantity": "Mnóstwo", 10 | "datatypes-type-number": "Ličba", 11 | "datatypes-type-mediawiki-title": "Titul MediaWiki", 12 | "datatypes-type-unknown": "Njepodaty", 13 | "datatypes-type-boolean": "Boolean", 14 | "datatypes-type-globe-coordinate": "Geografiske koordinaty", 15 | "datatypes-type-time": "Čas" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/ilo.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Lam-ang" 5 | ] 6 | }, 7 | "datatypes-desc": "Urnong dagiti panangilawlawag iti kita ti datos", 8 | "datatypes-type-string": "Kuerdas", 9 | "datatypes-type-quantity": "Kaadu", 10 | "datatypes-type-number": "Numero", 11 | "datatypes-type-mediawiki-title": "Titulo ti MediaWiki", 12 | "datatypes-type-unknown": "Di naibagbaga", 13 | "datatypes-type-boolean": "Boolean", 14 | "datatypes-type-globe-coordinate": "Heograpiko a nagsasabtan", 15 | "datatypes-type-time": "Oras" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/ba.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Lizalizaufa", 5 | "Ләйсән" 6 | ] 7 | }, 8 | "datatypes-desc": "Бирем төрҙәре билдәләмәһе коллекцияһы", 9 | "datatypes-type-quantity": "Миҡдары", 10 | "datatypes-type-monolingualtext": "Бер телле текст", 11 | "datatypes-type-multilingualtext": "Күп телле текст", 12 | "datatypes-type-mediawiki-title": "MediaWiki исеме", 13 | "datatypes-type-unknown": "Аныҡланмаған", 14 | "datatypes-type-globe-coordinate": "Географик координаталар", 15 | "datatypes-type-time": "Ваҡыт мәле" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/nn.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Njardarlogar" 5 | ] 6 | }, 7 | "datatypes-desc": "Samling av definisjonar på datatypar", 8 | "datatypes-type-string": "Streng", 9 | "datatypes-type-quantity": "Kvantitet", 10 | "datatypes-type-monolingualtext": "Einspråkleg tekst", 11 | "datatypes-type-number": "Tal", 12 | "datatypes-type-mediawiki-title": "MediaWiki-tittel", 13 | "datatypes-type-unknown": "Uspesifisert", 14 | "datatypes-type-boolean": "Boolsk", 15 | "datatypes-type-globe-coordinate": "Geografisk koordinat" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/da.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Byrial", 5 | "Christian List", 6 | "Tjernobyl" 7 | ] 8 | }, 9 | "datatypes-desc": "Samling af datatypedefinitioner", 10 | "datatypes-type-string": "Streng", 11 | "datatypes-type-quantity": "Mængde", 12 | "datatypes-type-number": "Tal", 13 | "datatypes-type-mediawiki-title": "MediaWiki-titel", 14 | "datatypes-type-unknown": "Uspecificeret", 15 | "datatypes-type-boolean": "Boolesk", 16 | "datatypes-type-globe-coordinate": "Geografiske koordinater", 17 | "datatypes-type-time": "Tid" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/kab.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Belkacem77" 5 | ] 6 | }, 7 | "datatypes-desc": "Tagrumma n tidbadutin n wanawen n isefka", 8 | "datatypes-type-string": "Azrar", 9 | "datatypes-type-quantity": "Tasmekta", 10 | "datatypes-type-monolingualtext": "Aḍris n yiwet n tutlayt", 11 | "datatypes-type-multilingualtext": "Aḍris s ddeqs n tutlayin", 12 | "datatypes-type-number": "Amḍan", 13 | "datatypes-type-mediawiki-title": "Azwel MediaWiki", 14 | "datatypes-type-unknown": "Ur yettwammek ara", 15 | "datatypes-type-boolean": "Abulan" 16 | } 17 | -------------------------------------------------------------------------------- /i18n/ro.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Firilacroco", 5 | "Minisarm", 6 | "Stelistcristi" 7 | ] 8 | }, 9 | "datatypes-desc": "Colecție cu definiții pentru tipuri de date", 10 | "datatypes-type-string": "Șir", 11 | "datatypes-type-quantity": "Cantitate", 12 | "datatypes-type-number": "Număr", 13 | "datatypes-type-mediawiki-title": "Titlu MediaWiki", 14 | "datatypes-type-unknown": "Nespecificat", 15 | "datatypes-type-boolean": "Adevărat/fals", 16 | "datatypes-type-globe-coordinate": "Coordonate geografice", 17 | "datatypes-type-time": "Timp" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/eu.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "An13sa", 5 | "Sator" 6 | ] 7 | }, 8 | "datatypes-type-string": "Katea", 9 | "datatypes-type-quantity": "Kopurua", 10 | "datatypes-type-monolingualtext": "Hizkuntza bakarreko testua", 11 | "datatypes-type-multilingualtext": "Hizkuntza anitzeko testua", 12 | "datatypes-type-number": "Zenbakia", 13 | "datatypes-type-mediawiki-title": "MediaWiki izenburua", 14 | "datatypes-type-unknown": "Zehaztugabea", 15 | "datatypes-type-boolean": "Boolearra", 16 | "datatypes-type-globe-coordinate": "Koordenatu geografikoak" 17 | } 18 | -------------------------------------------------------------------------------- /i18n/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Hym411", 5 | "아라", 6 | "Revi", 7 | "Kwj2772" 8 | ] 9 | }, 10 | "datatypes-desc": "데이터 형식 정의의 모음집", 11 | "datatypes-type-string": "문자열", 12 | "datatypes-type-quantity": "양", 13 | "datatypes-type-monolingualtext": "단일 언어 텍스트", 14 | "datatypes-type-multilingualtext": "다언어 텍스트", 15 | "datatypes-type-number": "숫자", 16 | "datatypes-type-mediawiki-title": "미디어위키 제목", 17 | "datatypes-type-unknown": "지정되지 않음", 18 | "datatypes-type-boolean": "부울", 19 | "datatypes-type-globe-coordinate": "지리적 좌표", 20 | "datatypes-type-time": "시점" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/eo.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Yekrats", 5 | "Robin van der Vliet" 6 | ] 7 | }, 8 | "datatypes-type-string": "Bitĉeno", 9 | "datatypes-type-quantity": "Kvanto", 10 | "datatypes-type-monolingualtext": "Unulingva teksto", 11 | "datatypes-type-multilingualtext": "Plurlingva teksto", 12 | "datatypes-type-number": "Nombro", 13 | "datatypes-type-mediawiki-title": "Titolo MidaWiki", 14 | "datatypes-type-unknown": "Nespecifa", 15 | "datatypes-type-boolean": "Bulea", 16 | "datatypes-type-globe-coordinate": "Geografiaj koordinatoj", 17 | "datatypes-type-time": "Tempopunkto" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/zh-hans.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Dimension", 5 | "Hydra", 6 | "Yfdyh000", 7 | "Liuxinyu970226" 8 | ] 9 | }, 10 | "datatypes-desc": "数据类型定义的集合", 11 | "datatypes-type-string": "字符串", 12 | "datatypes-type-quantity": "数量", 13 | "datatypes-type-monolingualtext": "单语文本", 14 | "datatypes-type-multilingualtext": "多语文本", 15 | "datatypes-type-number": "数值", 16 | "datatypes-type-mediawiki-title": "MediaWiki 标题", 17 | "datatypes-type-unknown": "未指定", 18 | "datatypes-type-boolean": "布尔值", 19 | "datatypes-type-globe-coordinate": "地理坐标", 20 | "datatypes-type-time": "时间点" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/zh-hant.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Justincheng12345", 5 | "Simon Shek", 6 | "Liuxinyu970226", 7 | "Wehwei" 8 | ] 9 | }, 10 | "datatypes-desc": "資料類型定義的集合", 11 | "datatypes-type-string": "字串", 12 | "datatypes-type-quantity": "數量", 13 | "datatypes-type-monolingualtext": "單語言內容", 14 | "datatypes-type-multilingualtext": "多語言內容", 15 | "datatypes-type-number": "數字", 16 | "datatypes-type-mediawiki-title": "MediaWiki 標題", 17 | "datatypes-type-unknown": "未指定", 18 | "datatypes-type-boolean": "布林值", 19 | "datatypes-type-globe-coordinate": "地理座標", 20 | "datatypes-type-time": "時間點" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/lb.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Robby", 5 | "Soued031" 6 | ] 7 | }, 8 | "datatypes-desc": "Kollektioun vun Definitioune vun Datentypen", 9 | "datatypes-type-string": "Zeecheketten", 10 | "datatypes-type-quantity": "Quantitéit", 11 | "datatypes-type-monolingualtext": "Text an enger Sprooch", 12 | "datatypes-type-multilingualtext": "Text a méi Sproochen", 13 | "datatypes-type-number": "Zuel", 14 | "datatypes-type-mediawiki-title": "MediaWiki-Titel", 15 | "datatypes-type-unknown": "Net uginn", 16 | "datatypes-type-globe-coordinate": "Geographesch Koordinaten", 17 | "datatypes-type-time": "Zäitpunkt" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/mk.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Bjankuloski06" 5 | ] 6 | }, 7 | "datatypes-desc": "Збир дефиниции на податочни типови", 8 | "datatypes-type-string": "Низа", 9 | "datatypes-type-quantity": "Количина", 10 | "datatypes-type-monolingualtext": "Еднојазичен текст", 11 | "datatypes-type-multilingualtext": "Повеќејазичен текст", 12 | "datatypes-type-number": "Број", 13 | "datatypes-type-mediawiki-title": "МедијаВики-наслов", 14 | "datatypes-type-unknown": "Неукажано", 15 | "datatypes-type-boolean": "Булов", 16 | "datatypes-type-globe-coordinate": "Географски координати", 17 | "datatypes-type-time": "Точка во времето" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/tt-cyrl.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ильнар" 5 | ] 6 | }, 7 | "datatypes-desc": "Мәгълүмат төрләре билгеләмәсе җыелмасы", 8 | "datatypes-type-string": "Юл", 9 | "datatypes-type-quantity": "Микъдары", 10 | "datatypes-type-monolingualtext": "Бертелле текст", 11 | "datatypes-type-multilingualtext": "Күптелле текст", 12 | "datatypes-type-number": "Саны", 13 | "datatypes-type-mediawiki-title": "MediaWiki исеме", 14 | "datatypes-type-unknown": "Ачыкланмаган", 15 | "datatypes-type-boolean": "Логик мәгънәсе", 16 | "datatypes-type-globe-coordinate": "Географик координаталар", 17 | "datatypes-type-time": "Вакыт мәле" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/he.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Amire80", 5 | "Inkbug", 6 | "Guycn2" 7 | ] 8 | }, 9 | "datatypes-desc": "אוסף של הגדרות סוגי נתונים", 10 | "datatypes-type-string": "מחרוזת", 11 | "datatypes-type-quantity": "כמות", 12 | "datatypes-type-monolingualtext": "טקסט חד־לשוני", 13 | "datatypes-type-multilingualtext": "טקסט רב־לשוני", 14 | "datatypes-type-number": "מספר", 15 | "datatypes-type-mediawiki-title": "כותרת מדיה־ויקי", 16 | "datatypes-type-unknown": "בלתי־מוגדר", 17 | "datatypes-type-boolean": "בוליאני", 18 | "datatypes-type-globe-coordinate": "נקודות ציון גאוגרפיות", 19 | "datatypes-type-time": "נקודת זמן" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/sco.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "AmaryllisGardener" 5 | ] 6 | }, 7 | "datatypes-desc": "Collection o data teep defineetions", 8 | "datatypes-type-string": "String", 9 | "datatypes-type-quantity": "Quantity", 10 | "datatypes-type-monolingualtext": "Monolingual text", 11 | "datatypes-type-multilingualtext": "Multilingual text", 12 | "datatypes-type-number": "Nummer", 13 | "datatypes-type-mediawiki-title": "MediaWiki teetle", 14 | "datatypes-type-unknown": "Unspecified", 15 | "datatypes-type-boolean": "Boolean", 16 | "datatypes-type-globe-coordinate": "Geografic coordinates", 17 | "datatypes-type-time": "Pynt in time" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/cy.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Lloffiwr", 5 | "Robin Owain" 6 | ] 7 | }, 8 | "datatypes-desc": "Casgliad o ddiffiniadau o fathau o ddata", 9 | "datatypes-type-string": "Llinyn", 10 | "datatypes-type-quantity": "Mesur", 11 | "datatypes-type-monolingualtext": "Testun uniaith", 12 | "datatypes-type-multilingualtext": "Testun amlieithog", 13 | "datatypes-type-number": "Rhif", 14 | "datatypes-type-mediawiki-title": "Teitl yn MediaWiki", 15 | "datatypes-type-unknown": "Heb ei nodi", 16 | "datatypes-type-boolean": "Boole", 17 | "datatypes-type-globe-coordinate": "Cyfesurynnau daearyddol", 18 | "datatypes-type-time": "Amser" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/et.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Avjoska", 5 | "Pikne" 6 | ] 7 | }, 8 | "datatypes-desc": "Andmetüübi määratluste kogu", 9 | "datatypes-type-string": "Sõne", 10 | "datatypes-type-quantity": "Suurus", 11 | "datatypes-type-monolingualtext": "Ühekeelne tekst", 12 | "datatypes-type-multilingualtext": "Mitmekeelne tekst", 13 | "datatypes-type-number": "Number", 14 | "datatypes-type-mediawiki-title": "MediaWiki pealkiri", 15 | "datatypes-type-unknown": "Määratlemata", 16 | "datatypes-type-boolean": "Kahendmuutuja", 17 | "datatypes-type-globe-coordinate": "Geograafilised koordinaadid", 18 | "datatypes-type-time": "Ajahetk" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/it.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Beta16" 5 | ] 6 | }, 7 | "datatypes-desc": "Collezione di definizione di tipi di dati", 8 | "datatypes-type-string": "Stringa", 9 | "datatypes-type-quantity": "Quantità", 10 | "datatypes-type-monolingualtext": "Testo monolingua", 11 | "datatypes-type-multilingualtext": "Testo multilingua", 12 | "datatypes-type-number": "Numero", 13 | "datatypes-type-mediawiki-title": "Titolo MediaWiki", 14 | "datatypes-type-unknown": "Non specificato", 15 | "datatypes-type-boolean": "Booleano", 16 | "datatypes-type-globe-coordinate": "Coordinate geografiche", 17 | "datatypes-type-time": "Punto nel tempo" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/uk.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Base", 5 | "Piramidion" 6 | ] 7 | }, 8 | "datatypes-desc": "Набір визначень типів даних", 9 | "datatypes-type-string": "Рядок", 10 | "datatypes-type-quantity": "Кількість", 11 | "datatypes-type-monolingualtext": "Одномовний текст", 12 | "datatypes-type-multilingualtext": "Багатомовний текст", 13 | "datatypes-type-number": "Число", 14 | "datatypes-type-mediawiki-title": "Заголовок MediaWiki", 15 | "datatypes-type-unknown": "Не визначений", 16 | "datatypes-type-boolean": "Булев", 17 | "datatypes-type-globe-coordinate": "Географічні координати", 18 | "datatypes-type-time": "Момент часу" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/ast.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Xuacu" 5 | ] 6 | }, 7 | "datatypes-desc": "Coleición de definiciones de tipos de datos", 8 | "datatypes-type-string": "Cadena", 9 | "datatypes-type-quantity": "Cantidá", 10 | "datatypes-type-monolingualtext": "Testu monollingüe", 11 | "datatypes-type-multilingualtext": "Testu multillingüe", 12 | "datatypes-type-number": "Númberu", 13 | "datatypes-type-mediawiki-title": "Títulu de MediaWiki", 14 | "datatypes-type-unknown": "No especificáu", 15 | "datatypes-type-boolean": "Booleanu", 16 | "datatypes-type-globe-coordinate": "Coordenaes xeográfiques", 17 | "datatypes-type-time": "Puntu nel tiempu" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/fa.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Calak", 5 | "Mjbmr", 6 | "Ebraminio", 7 | "Mahdy Saffar" 8 | ] 9 | }, 10 | "datatypes-desc": "مجموعه‌ای از تعاریف نوع داده", 11 | "datatypes-type-string": "رشته", 12 | "datatypes-type-quantity": "مقدار", 13 | "datatypes-type-monolingualtext": "متن تک‌زبانه", 14 | "datatypes-type-multilingualtext": "متن چندزبانه", 15 | "datatypes-type-number": "عدد", 16 | "datatypes-type-mediawiki-title": "عنوان مدیاویکی", 17 | "datatypes-type-unknown": "مشخصنشده", 18 | "datatypes-type-boolean": "بولی", 19 | "datatypes-type-globe-coordinate": "مختصات جغرافیایی", 20 | "datatypes-type-time": "نقطه در زمان" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/oc.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Cedric31" 5 | ] 6 | }, 7 | "datatypes-desc": "Colleccion de definicions de tipes de donadas", 8 | "datatypes-type-string": "Cadena", 9 | "datatypes-type-quantity": "Quantitat", 10 | "datatypes-type-monolingualtext": "Tèxte monolingüe", 11 | "datatypes-type-multilingualtext": "Tèxte multilingüe", 12 | "datatypes-type-number": "Nombre", 13 | "datatypes-type-mediawiki-title": "Títol MediaWiki", 14 | "datatypes-type-unknown": "Pas especificat", 15 | "datatypes-type-boolean": "Boolean", 16 | "datatypes-type-globe-coordinate": "Coordenadas geograficas", 17 | "datatypes-type-time": "Punt dins lo temps" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/be-tarask.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Wizardist", 5 | "Red Winged Duck" 6 | ] 7 | }, 8 | "datatypes-desc": "Збор вызначэньняў тыпаў зьвестак", 9 | "datatypes-type-string": "Радок", 10 | "datatypes-type-quantity": "Колькасьць", 11 | "datatypes-type-monolingualtext": "Аднамоўны тэкст", 12 | "datatypes-type-multilingualtext": "Шматмоўны тэкст", 13 | "datatypes-type-number": "Лік", 14 | "datatypes-type-mediawiki-title": "Загаловак MediaWiki", 15 | "datatypes-type-unknown": "Не пазначаны", 16 | "datatypes-type-boolean": "Булевы", 17 | "datatypes-type-globe-coordinate": "Геаграфічныя каардынаты", 18 | "datatypes-type-time": "Момант часу" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/gd.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "GunChleoc" 5 | ] 6 | }, 7 | "datatypes-desc": "Cruinneachadh dhe dheifiniseanan air seòrsaichean dàta", 8 | "datatypes-type-string": "Sreang", 9 | "datatypes-type-quantity": "Uiread", 10 | "datatypes-type-monolingualtext": "Teacsa aon-chànanach", 11 | "datatypes-type-multilingualtext": "Teacsa ioma-chànanach", 12 | "datatypes-type-number": "Àireamh", 13 | "datatypes-type-mediawiki-title": "Tiotal MediaWiki", 14 | "datatypes-type-unknown": "Gun sònrachadh", 15 | "datatypes-type-boolean": "Booleach", 16 | "datatypes-type-globe-coordinate": "Co-chomharran cruinn-eòlasach", 17 | "datatypes-type-time": "Àm" 18 | } 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataTypes", 3 | "repository": { 4 | "type": "git", 5 | "url": "https://github.com/wmde/DataTypes" 6 | }, 7 | "license": "GPL-2.0+", 8 | "dependencies": { 9 | "jquery": "^3.2.1" 10 | }, 11 | "devDependencies": { 12 | "eslint": "^3.19.0", 13 | "eslint-config-wikimedia": "0.4.0", 14 | "karma": "^1.7.0", 15 | "karma-cli": "^1.0.1", 16 | "karma-phantomjs-launcher": "^1.0.4", 17 | "karma-qunit": "^1.2.1", 18 | "qunitjs": "^2.3.2" 19 | }, 20 | "scripts": { 21 | "test": "npm run eslint && npm run run-tests", 22 | "eslint": "eslint .", 23 | "run-tests": "karma start --single-run" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /i18n/bg.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "පසිඳු කාවින්ද", 5 | "StanProg" 6 | ] 7 | }, 8 | "datatypes-desc": "Колекция от дефиниции на типове данни", 9 | "datatypes-type-string": "Низ", 10 | "datatypes-type-quantity": "Количество", 11 | "datatypes-type-monolingualtext": "Едноезичен текст", 12 | "datatypes-type-multilingualtext": "Многоезичен текст", 13 | "datatypes-type-number": "Число", 14 | "datatypes-type-mediawiki-title": "Заглавие на МедияУики", 15 | "datatypes-type-unknown": "Неуказано", 16 | "datatypes-type-boolean": "Булев", 17 | "datatypes-type-globe-coordinate": "Географски координати", 18 | "datatypes-type-time": "Момент във времето" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/ksh.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Purodha" 5 | ] 6 | }, 7 | "datatypes-desc": "En Versammlong vun Aate vun Daate iehr Defenizjuhne.", 8 | "datatypes-type-string": "En ZeischeKätt", 9 | "datatypes-type-quantity": "Mänge", 10 | "datatypes-type-monolingualtext": "Eijnschprohchejje Täx", 11 | "datatypes-type-multilingualtext": "Mihschprohchejje Täx", 12 | "datatypes-type-number": "Nommer", 13 | "datatypes-type-mediawiki-title": "MediaWiki Tittel", 14 | "datatypes-type-unknown": "Nit aanjejovve", 15 | "datatypes-type-boolean": "Joh udder Nää", 16 | "datatypes-type-globe-coordinate": "Ko'odenahte om Jlohbos", 17 | "datatypes-type-time": "Uhrzick" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/roa-tara.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Joetaras" 5 | ] 6 | }, 7 | "datatypes-desc": "Raccolte de definiziune de tipe de date", 8 | "datatypes-type-string": "Stringhe", 9 | "datatypes-type-quantity": "Quantitate", 10 | "datatypes-type-monolingualtext": "Teste monolènghe", 11 | "datatypes-type-multilingualtext": "Teste multilènghe", 12 | "datatypes-type-number": "Numere", 13 | "datatypes-type-mediawiki-title": "Titole de MediaUicchi", 14 | "datatypes-type-unknown": "Non specificate", 15 | "datatypes-type-boolean": "Buleane", 16 | "datatypes-type-globe-coordinate": "Coordinate sciugrafeche", 17 | "datatypes-type-time": "Punde jndr'à 'u tiembe" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/hi.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ansumang", 5 | "Siddhartha Ghai", 6 | "चक्रपाणी" 7 | ] 8 | }, 9 | "datatypes-desc": "डेटा प्रकार परिभाषाओं का संग्रह", 10 | "datatypes-type-string": "स्ट्रिंग", 11 | "datatypes-type-quantity": "मात्रा", 12 | "datatypes-type-monolingualtext": "एकभाषी टेक्स्ट", 13 | "datatypes-type-multilingualtext": "बहुभाषी टेक्स्ट", 14 | "datatypes-type-number": "संख्या", 15 | "datatypes-type-mediawiki-title": "मीडियाविकि शीर्षक", 16 | "datatypes-type-unknown": "अनिर्दिष्ट", 17 | "datatypes-type-boolean": "बूलियन", 18 | "datatypes-type-globe-coordinate": "भौगोलिक निर्देशांक", 19 | "datatypes-type-time": "समय में एक बिंदु" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/ia.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "McDutchie" 5 | ] 6 | }, 7 | "datatypes-desc": "Collection de definitiones de typos de datos", 8 | "datatypes-type-string": "Catena de characteres", 9 | "datatypes-type-quantity": "Quantitate", 10 | "datatypes-type-monolingualtext": "Texto monolingue", 11 | "datatypes-type-multilingualtext": "Texto multilingue", 12 | "datatypes-type-number": "Numero", 13 | "datatypes-type-mediawiki-title": "Titulo de MediaWiki", 14 | "datatypes-type-unknown": "Non specificate", 15 | "datatypes-type-boolean": "Boolean", 16 | "datatypes-type-globe-coordinate": "Coordinatas geographic", 17 | "datatypes-type-time": "Puncto in tempore" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/id.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Farras", 5 | "Rachmat.Wahidi", 6 | "Rachmat04" 7 | ] 8 | }, 9 | "datatypes-desc": "Koleksi definisi jenis data", 10 | "datatypes-type-string": "String", 11 | "datatypes-type-quantity": "Jumlah", 12 | "datatypes-type-monolingualtext": "Teks bahasa tunggal", 13 | "datatypes-type-multilingualtext": "Teks multibahasa", 14 | "datatypes-type-number": "Nomor", 15 | "datatypes-type-mediawiki-title": "Judul MediaWiki", 16 | "datatypes-type-unknown": "Tidak ditentukan", 17 | "datatypes-type-boolean": "Boolean", 18 | "datatypes-type-globe-coordinate": "Koordinat geografis", 19 | "datatypes-type-time": "Titik waktu" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/pl.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "WTM", 5 | "Chrumps", 6 | "Woytecr" 7 | ] 8 | }, 9 | "datatypes-desc": "Zbiór definicji typów danych", 10 | "datatypes-type-string": "Łańcuch", 11 | "datatypes-type-quantity": "Ilość", 12 | "datatypes-type-monolingualtext": "Tekst jednojęzyczny", 13 | "datatypes-type-multilingualtext": "Tekst wielojęzyczny", 14 | "datatypes-type-number": "Liczba", 15 | "datatypes-type-mediawiki-title": "Tytuł MediaWiki", 16 | "datatypes-type-unknown": "Nieokreślone", 17 | "datatypes-type-boolean": "Wartość logiczna", 18 | "datatypes-type-globe-coordinate": "Współrzędne geograficzne", 19 | "datatypes-type-time": "Moment w czasie" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/br.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Fohanno", 5 | "Y-M D", 6 | "Fulup" 7 | ] 8 | }, 9 | "datatypes-desc": "Dastumad termenadurioù diwar-benn ar seurtoù roadennoù", 10 | "datatypes-type-string": "Neudennad", 11 | "datatypes-type-quantity": "Kementad", 12 | "datatypes-type-monolingualtext": "Testenn unyezhek", 13 | "datatypes-type-multilingualtext": "Testenn liesyezhek", 14 | "datatypes-type-number": "Niver", 15 | "datatypes-type-mediawiki-title": "Titl MediaWiki", 16 | "datatypes-type-unknown": "Anspisaet", 17 | "datatypes-type-boolean": "Boulean", 18 | "datatypes-type-globe-coordinate": "Daveennoù douaroniel", 19 | "datatypes-type-time": "Mare en amzer" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/sr-ec.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Rancher", 5 | "Obsuser", 6 | "Милан Јелисавчић" 7 | ] 8 | }, 9 | "datatypes-desc": "Колекција дефиниција типа података", 10 | "datatypes-type-string": "ниска", 11 | "datatypes-type-quantity": "количина", 12 | "datatypes-type-monolingualtext": "Једнојезички текст", 13 | "datatypes-type-multilingualtext": "Вишејезички текст", 14 | "datatypes-type-number": "Број", 15 | "datatypes-type-mediawiki-title": "Медијавики наслов", 16 | "datatypes-type-unknown": "Неодређено", 17 | "datatypes-type-boolean": "Буловски", 18 | "datatypes-type-globe-coordinate": "Географске координате", 19 | "datatypes-type-time": "Тачка у времену" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Gomoko", 5 | "Zolo", 6 | "Wladek92" 7 | ] 8 | }, 9 | "datatypes-desc": "Collection de définitions de types de donnée", 10 | "datatypes-type-string": "Chaîne", 11 | "datatypes-type-quantity": "Quantité", 12 | "datatypes-type-monolingualtext": "Texte monolingue", 13 | "datatypes-type-multilingualtext": "Texte multilingue", 14 | "datatypes-type-number": "Nombre", 15 | "datatypes-type-mediawiki-title": "Titre MediaWiki", 16 | "datatypes-type-unknown": "Non spécifié", 17 | "datatypes-type-boolean": "Booléen", 18 | "datatypes-type-globe-coordinate": "Coordonnées géographiques", 19 | "datatypes-type-time": "Point dans le temps" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/gl.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Toliño", 5 | "Elisardojm" 6 | ] 7 | }, 8 | "datatypes-desc": "Colección de definicións de tipos de datos", 9 | "datatypes-type-string": "Cadea de caracteres", 10 | "datatypes-type-quantity": "Cantidade", 11 | "datatypes-type-monolingualtext": "Texto monolingüe", 12 | "datatypes-type-multilingualtext": "Texto multilingüe", 13 | "datatypes-type-number": "Número", 14 | "datatypes-type-mediawiki-title": "Título de MediaWiki", 15 | "datatypes-type-unknown": "Non especificado", 16 | "datatypes-type-boolean": "Booleano", 17 | "datatypes-type-globe-coordinate": "Coordenadas xeográficas", 18 | "datatypes-type-time": "Punto no tempo" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/mg.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Jagwar" 5 | ] 6 | }, 7 | "datatypes-desc": "Fitambaram-pamaritan'endrik'angona", 8 | "datatypes-type-string": "Soratra", 9 | "datatypes-type-quantity": "Habetsaka", 10 | "datatypes-type-monolingualtext": "Lahatsoratra amin'ny fiteny tokana", 11 | "datatypes-type-multilingualtext": "Lahatsoratraa ami'ny fiteny maro", 12 | "datatypes-type-number": "Isa", 13 | "datatypes-type-mediawiki-title": "Lohateny MediaWiki", 14 | "datatypes-type-unknown": "Tsy voalaza", 15 | "datatypes-type-boolean": "Booleanina", 16 | "datatypes-type-globe-coordinate": "Laharan-toerana ara-jeografika", 17 | "datatypes-type-time": "Toerana anatin'ny fotoana" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Antime", 5 | "Tarawneh", 6 | "محمد أحمد عبد الفتاح", 7 | "Mido", 8 | "Claw eg" 9 | ] 10 | }, 11 | "datatypes-desc": "مجموعة من تعريفات انواع البيانات", 12 | "datatypes-type-string": "نص", 13 | "datatypes-type-quantity": "كمية", 14 | "datatypes-type-monolingualtext": "نص بلغة وحيدة", 15 | "datatypes-type-multilingualtext": "نص متعدد اللغات", 16 | "datatypes-type-number": "رقم", 17 | "datatypes-type-mediawiki-title": "عنوان الميدياويكي", 18 | "datatypes-type-unknown": "غير محدد", 19 | "datatypes-type-boolean": "قيمة منطقية", 20 | "datatypes-type-globe-coordinate": "إحداثيات جغرافية", 21 | "datatypes-type-time": "نقطة زمنية" 22 | } 23 | -------------------------------------------------------------------------------- /i18n/cs.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Mormegil", 5 | "Reaperman", 6 | "Vks", 7 | "Matěj Suchánek" 8 | ] 9 | }, 10 | "datatypes-desc": "Soubor definic datových typů", 11 | "datatypes-type-string": "Řetězec", 12 | "datatypes-type-quantity": "Množství", 13 | "datatypes-type-monolingualtext": "Jednojazyčný text", 14 | "datatypes-type-multilingualtext": "Vícejazyčný text", 15 | "datatypes-type-number": "Číslo", 16 | "datatypes-type-mediawiki-title": "Titulek MediaWiki", 17 | "datatypes-type-unknown": "Neurčené", 18 | "datatypes-type-boolean": "Logická hodnota", 19 | "datatypes-type-globe-coordinate": "Zeměpisné souřadnice", 20 | "datatypes-type-time": "Bod v čase" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Kghbln", 5 | "Metalhead64" 6 | ] 7 | }, 8 | "datatypes-desc": "Stellt eine Zusammenstellung von Datentypdefinitionen bereit", 9 | "datatypes-type-string": "Zeichenkette", 10 | "datatypes-type-quantity": "Menge", 11 | "datatypes-type-monolingualtext": "Einsprachiger Text", 12 | "datatypes-type-multilingualtext": "Mehrsprachiger Text", 13 | "datatypes-type-number": "Zahl", 14 | "datatypes-type-mediawiki-title": "MediaWiki-Titel", 15 | "datatypes-type-unknown": "Nicht angegeben", 16 | "datatypes-type-boolean": "Wahrheitswert", 17 | "datatypes-type-globe-coordinate": "Geografische Koordinaten", 18 | "datatypes-type-time": "Zeitpunkt" 19 | } 20 | -------------------------------------------------------------------------------- /i18n/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Siebrand", 5 | "Wiki13", 6 | "Sjoerddebruin" 7 | ] 8 | }, 9 | "datatypes-desc": "Verameling gegevenstypedefinities", 10 | "datatypes-type-string": "Tekenreeks", 11 | "datatypes-type-quantity": "Hoeveelheid", 12 | "datatypes-type-monolingualtext": "Enkeltalige tekst", 13 | "datatypes-type-multilingualtext": "Meertalige tekst", 14 | "datatypes-type-number": "Getal", 15 | "datatypes-type-mediawiki-title": "MeidaWikipagina", 16 | "datatypes-type-unknown": "Niet opgegeven", 17 | "datatypes-type-boolean": "Booleaanse operator", 18 | "datatypes-type-globe-coordinate": "Geografische coördinaten", 19 | "datatypes-type-time": "Tijdstip" 20 | } 21 | -------------------------------------------------------------------------------- /i18n/nb.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Danmichaelo", 5 | "Jeblad", 6 | "Event", 7 | "Jon Harald Søby" 8 | ] 9 | }, 10 | "datatypes-desc": "Samling av datatypedefinisjoner", 11 | "datatypes-type-string": "streng", 12 | "datatypes-type-quantity": "størrelse", 13 | "datatypes-type-monolingualtext": "Enspråklig tekst", 14 | "datatypes-type-multilingualtext": "Flerspråklig tekst", 15 | "datatypes-type-number": "tall", 16 | "datatypes-type-mediawiki-title": "MediaWiki-tittel", 17 | "datatypes-type-unknown": "uspesifisert", 18 | "datatypes-type-boolean": "boolsk verdi", 19 | "datatypes-type-globe-coordinate": "geografiske koordinater", 20 | "datatypes-type-time": "Tidspunkt" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/diq.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Erdemaslancan", 5 | "Marmase", 6 | "Mirzali", 7 | "Kumkumuk" 8 | ] 9 | }, 10 | "datatypes-desc": "Agoznayeya babete malumat de koleksiyonan", 11 | "datatypes-type-string": "La", 12 | "datatypes-type-quantity": "Miktar", 13 | "datatypes-type-monolingualtext": "Nuştey yo zıwani", 14 | "datatypes-type-multilingualtext": "Nuştey zaf Zıwani", 15 | "datatypes-type-number": "Numre", 16 | "datatypes-type-mediawiki-title": "Sernamey MediaWiki", 17 | "datatypes-type-unknown": "Nêvaciyayo", 18 | "datatypes-type-boolean": "Boolean", 19 | "datatypes-type-globe-coordinate": "Koordinatê coğrafyayêni", 20 | "datatypes-type-time": "Noktay zemani" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Jeroen De Dauw" 5 | ] 6 | }, 7 | "datatypes-desc": "Collection of data type definitions", 8 | "datatypes-type-string": "String", 9 | "datatypes-type-quantity": "Quantity", 10 | "datatypes-type-monolingualtext": "Monolingual text", 11 | "datatypes-type-multilingualtext": "Multilingual text", 12 | "datatypes-type-number": "Number", 13 | "datatypes-type-mediawiki-title": "MediaWiki title", 14 | "datatypes-type-unknown": "Unspecified", 15 | "datatypes-type-boolean": "Boolean", 16 | "datatypes-type-globe-coordinate": "Geographic coordinates", 17 | "datatypes-type-time": "Point in time" 18 | } 19 | -------------------------------------------------------------------------------- /i18n/sv.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ainali", 5 | "Lokal Profil", 6 | "Rotsee", 7 | "WikiPhoenix" 8 | ] 9 | }, 10 | "datatypes-desc": "Samling av definitioner av olika datatyper", 11 | "datatypes-type-string": "Sträng", 12 | "datatypes-type-quantity": "Kvantitet", 13 | "datatypes-type-monolingualtext": "Enspråkig text", 14 | "datatypes-type-multilingualtext": "Flerspråkig text", 15 | "datatypes-type-number": "Nummer", 16 | "datatypes-type-mediawiki-title": "MediaWiki-titel", 17 | "datatypes-type-unknown": "Ospecificerad", 18 | "datatypes-type-boolean": "Boolesk", 19 | "datatypes-type-globe-coordinate": "Geografiska koordinater", 20 | "datatypes-type-time": "Tidpunkt" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/fi.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Nedergard", 5 | "Silvonen", 6 | "Stryn", 7 | "01miki10" 8 | ] 9 | }, 10 | "datatypes-desc": "Kokoelma tietotyyppimäärittelyjä", 11 | "datatypes-type-string": "Merkkijono", 12 | "datatypes-type-quantity": "Määrä", 13 | "datatypes-type-monolingualtext": "Yksikielinen teksti", 14 | "datatypes-type-multilingualtext": "Monikielinen teksti", 15 | "datatypes-type-number": "Numero", 16 | "datatypes-type-mediawiki-title": "MediaWiki-otsikko", 17 | "datatypes-type-unknown": "Määrittelemätön", 18 | "datatypes-type-boolean": "Totuusarvo", 19 | "datatypes-type-globe-coordinate": "Maantieteellinen koordinaatti", 20 | "datatypes-type-time": "Ajanhetki" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/hu.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Dj", 5 | "JulesWinnfield-hu", 6 | "Máté", 7 | "Wolf Rex", 8 | "Bináris" 9 | ] 10 | }, 11 | "datatypes-desc": "Adattípus-definíciók gyűjteménye", 12 | "datatypes-type-string": "Karakterlánc", 13 | "datatypes-type-quantity": "Mennyiség", 14 | "datatypes-type-monolingualtext": "Egynyelvű szöveg", 15 | "datatypes-type-multilingualtext": "Többnyelvű szöveg", 16 | "datatypes-type-number": "Szám", 17 | "datatypes-type-mediawiki-title": "MediaWiki-cím", 18 | "datatypes-type-unknown": "Meghatározatlan", 19 | "datatypes-type-boolean": "Logikai érték", 20 | "datatypes-type-globe-coordinate": "Földrajzi koordináták", 21 | "datatypes-type-time": "Időpont" 22 | } 23 | -------------------------------------------------------------------------------- /i18n/pt-br.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Cainamarques", 5 | "Jaideraf", 6 | "O andarilho", 7 | "!Silent" 8 | ] 9 | }, 10 | "datatypes-desc": "Coleção de definições de tipo de dados", 11 | "datatypes-type-string": "String", 12 | "datatypes-type-quantity": "Quantidade", 13 | "datatypes-type-monolingualtext": "Texto multilíngue", 14 | "datatypes-type-multilingualtext": "Texto multilíngue", 15 | "datatypes-type-number": "Número", 16 | "datatypes-type-mediawiki-title": "Título do MediaWiki", 17 | "datatypes-type-unknown": "Não especificado", 18 | "datatypes-type-boolean": "Booleano", 19 | "datatypes-type-globe-coordinate": "Coordenadas geográfica", 20 | "datatypes-type-time": "Ponto no tempo" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Ignatus", 5 | "Ole Yves", 6 | "Okras", 7 | "Александр Сигачёв" 8 | ] 9 | }, 10 | "datatypes-desc": "Коллекция определений типов данных", 11 | "datatypes-type-string": "Строка", 12 | "datatypes-type-quantity": "Количество", 13 | "datatypes-type-monolingualtext": "Одноязычный текст", 14 | "datatypes-type-multilingualtext": "Многоязычный текст", 15 | "datatypes-type-number": "Число", 16 | "datatypes-type-mediawiki-title": "Заголовок MediaWiki", 17 | "datatypes-type-unknown": "Не уточнено", 18 | "datatypes-type-boolean": "Логическое значение", 19 | "datatypes-type-globe-coordinate": "Географические координаты", 20 | "datatypes-type-time": "Момент времени" 21 | } 22 | -------------------------------------------------------------------------------- /i18n/ca.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Alvaro Vidal-Abarca", 5 | "Arnaugir", 6 | "Pitort", 7 | "Vogone", 8 | "Toniher" 9 | ] 10 | }, 11 | "datatypes-desc": "Col·lecció de definicions de tipus de dades", 12 | "datatypes-type-string": "Cadena", 13 | "datatypes-type-quantity": "Quantitat", 14 | "datatypes-type-monolingualtext": "Text monolingüe", 15 | "datatypes-type-multilingualtext": "Text multilingüe", 16 | "datatypes-type-number": "Nombre", 17 | "datatypes-type-mediawiki-title": "Títol de MediaWiki", 18 | "datatypes-type-unknown": "Sense especificar", 19 | "datatypes-type-boolean": "Booleà", 20 | "datatypes-type-globe-coordinate": "Coordenades geogràfiques", 21 | "datatypes-type-time": "Punt en el temps" 22 | } 23 | -------------------------------------------------------------------------------- /i18n/es.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Armando-Martin", 5 | "Fitoschido", 6 | "Minh Nguyen", 7 | "Vivaelcelta", 8 | "Macofe" 9 | ] 10 | }, 11 | "datatypes-desc": "Colección de definiciones de tipos de datos", 12 | "datatypes-type-string": "Cadena", 13 | "datatypes-type-quantity": "Cantidad", 14 | "datatypes-type-monolingualtext": "Texto monolingüe", 15 | "datatypes-type-multilingualtext": "Texto multilingüe", 16 | "datatypes-type-number": "Número", 17 | "datatypes-type-mediawiki-title": "Título de MediaWiki", 18 | "datatypes-type-unknown": "No especificado", 19 | "datatypes-type-boolean": "Expresión Booleana", 20 | "datatypes-type-globe-coordinate": "Coordenadas geográficas", 21 | "datatypes-type-time": "Punto en el tiempo" 22 | } 23 | -------------------------------------------------------------------------------- /i18n/pt.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Alchimista", 5 | "Luckas", 6 | "Imperadeiro98", 7 | "Vitorvicentevalente", 8 | "Fúlvio", 9 | "Hamilton Abreu" 10 | ] 11 | }, 12 | "datatypes-desc": "Conjunto de definições de tipos de dados", 13 | "datatypes-type-string": "String", 14 | "datatypes-type-quantity": "Quantidade", 15 | "datatypes-type-monolingualtext": "Texto monolingue", 16 | "datatypes-type-multilingualtext": "Texto multilingue", 17 | "datatypes-type-number": "Número", 18 | "datatypes-type-mediawiki-title": "Título do MediaWiki", 19 | "datatypes-type-unknown": "Não Especificado", 20 | "datatypes-type-boolean": "Booleano", 21 | "datatypes-type-globe-coordinate": "Coordenadas geográficas", 22 | "datatypes-type-time": "Ponto no tempo" 23 | } 24 | -------------------------------------------------------------------------------- /DataTypes.mw.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | namespace DataTypes; 11 | 12 | if ( !defined( 'MEDIAWIKI' ) ) { 13 | die( 'Not an entry point.' ); 14 | } 15 | 16 | $GLOBALS['wgExtensionCredits']['datavalues'][] = [ 17 | 'path' => __DIR__, 18 | 'name' => 'DataTypes', 19 | 'version' => DataTypes_VERSION, 20 | 'author' => [ 21 | 'The Wikidata team', 22 | ], 23 | 'url' => 'https://github.com/wmde/DataTypes', 24 | 'descriptionmsg' => 'datatypes-desc', 25 | 'license-name' => 'GPL-2.0+' 26 | ]; 27 | 28 | $GLOBALS['wgMessagesDirs']['DataTypes'] = __DIR__ . '/i18n'; 29 | 30 | $GLOBALS['wgHooks']['UnitTestsList'][] = function( array &$paths ) { 31 | $paths[] = __DIR__ . '/tests/Modules/'; 32 | $paths[] = __DIR__ . '/tests/Phpunit/'; 33 | 34 | return true; 35 | }; 36 | 37 | // Resource Loader module registration 38 | $GLOBALS['wgResourceModules'] = array_merge( 39 | $GLOBALS['wgResourceModules'], 40 | include __DIR__ . '/js/resources.php' 41 | ); 42 | -------------------------------------------------------------------------------- /js/resources.php: -------------------------------------------------------------------------------- 1 | 8 | * @author H. Snater < mediawiki@snater.com > 9 | * 10 | * @codeCoverageIgnoreStart 11 | */ 12 | return call_user_func( function() { 13 | preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . '(?:vendor|extensions)' 14 | . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', __DIR__, $remoteExtPath ); 15 | 16 | $moduleTemplate = [ 17 | 'localBasePath' => __DIR__, 18 | 'remoteExtPath' => '..' . $remoteExtPath[0], 19 | ]; 20 | 21 | return [ 22 | 'dataTypes.__namespace' => $moduleTemplate + [ 23 | 'scripts' => 'dataTypes/__namespace.js', 24 | ], 25 | 26 | 'dataTypes.DataType' => $moduleTemplate + [ 27 | 'scripts' => 'dataTypes/DataType.js', 28 | 'dependencies' => 'dataTypes.__namespace', 29 | ], 30 | 31 | 'dataTypes.DataTypeStore' => $moduleTemplate + [ 32 | 'scripts' => 'dataTypes/DataTypeStore.js', 33 | 'dependencies' => [ 34 | 'dataTypes.__namespace', 35 | 'dataTypes.DataType', 36 | ], 37 | ], 38 | ]; 39 | 40 | } ); 41 | -------------------------------------------------------------------------------- /i18n/qqq.json: -------------------------------------------------------------------------------- 1 | { 2 | "@metadata": { 3 | "authors": [ 4 | "Shirayuki", 5 | "Liuxinyu970226", 6 | "Umherirrender" 7 | ] 8 | }, 9 | "datatypes-desc": "{{desc|name=Data Types|url=https://www.mediawiki.org/wiki/Extension:DataTypes}}", 10 | "datatypes-type-string": "The name of a data type.\n{{Identical|String}}", 11 | "datatypes-type-quantity": "The name of a data type for quantities (proper name, capitalised in English; first letter capitalised anyway in this message and relatives).\n{{Identical|Quantity}}", 12 | "datatypes-type-monolingualtext": "The name of a data type.\n{{Identical|Monolingual text}}", 13 | "datatypes-type-multilingualtext": "The name of a data type.\n{{Identical|Multilingual text}}", 14 | "datatypes-type-number": "The name of a data type.\n{{Identical|Number}}", 15 | "datatypes-type-mediawiki-title": "The name of a data type", 16 | "datatypes-type-unknown": "The name of a data type\n{{Identical|Unspecified}}", 17 | "datatypes-type-boolean": "The name of a data type\n{{Identical|Boolean}}", 18 | "datatypes-type-globe-coordinate": "The name of a data type", 19 | "datatypes-type-time": "The name of a data type." 20 | } 21 | -------------------------------------------------------------------------------- /js/dataTypes/DataTypeStore.js: -------------------------------------------------------------------------------- 1 | ( function ( $, dt ) { 2 | 'use strict'; 3 | 4 | /** 5 | * @class dataTypes.DataTypeStore 6 | * @since 0.2 7 | * @license GPL-2.0+ 8 | * @author H. Snater < mediawiki@snater.com > 9 | * 10 | * @constructor 11 | */ 12 | var SELF = dt.DataTypeStore = function DtDataTypeStore() { 13 | this._dataTypes = {}; 14 | }; 15 | 16 | /** 17 | * @class dataTypes.DataTypeStore 18 | */ 19 | $.extend( SELF.prototype, { 20 | /** 21 | * Data type definitions. 22 | * @property {Object} [_dataTypes={}] 23 | * @private 24 | */ 25 | _dataTypes: null, 26 | 27 | /** 28 | * Returns the data type of a specific data type id. 29 | * 30 | * @param {string} dataTypeId 31 | * @return {dataTypes.DataType|null} 32 | * 33 | * @throws {Error} when supplied data type id is not a string. 34 | */ 35 | getDataType: function ( dataTypeId ) { 36 | if ( !dataTypeId || typeof dataTypeId !== 'string' ) { 37 | throw new Error( 'The ID given to identify a data type needs to be a string' ); 38 | } 39 | return this._dataTypes[ dataTypeId ] || null; 40 | }, 41 | 42 | /** 43 | * Returns if there is a DataType of the provided type. 44 | * 45 | * @param {string} dataTypeId 46 | * @return {boolean} 47 | */ 48 | hasDataType: function ( dataTypeId ) { 49 | return this._dataTypes[ dataTypeId ] !== undefined; 50 | }, 51 | 52 | /** 53 | * Registers a new data type. A data type already registered for the id of the new data type 54 | * will be overwritten. 55 | * 56 | * @param {dataTypes.DataType} dataType 57 | * 58 | * @throws {Error} if data type is not a dt.DataType instance. 59 | */ 60 | registerDataType: function ( dataType ) { 61 | if ( !( dataType instanceof dataTypes.DataType ) ) { 62 | throw new Error( 'Can only register instances of dataTypes.DataType' ); 63 | } 64 | this._dataTypes[ dataType.getId() ] = dataType; 65 | } 66 | } ); 67 | 68 | }( jQuery, dataTypes ) ); 69 | -------------------------------------------------------------------------------- /src/DataType.php: -------------------------------------------------------------------------------- 1 | 12 | * @author Thiemo Mättig 13 | */ 14 | class DataType { 15 | 16 | /** 17 | * Identifier of this data type (also referred to as "property type"). 18 | * 19 | * @since 0.1 20 | * 21 | * @var string 22 | */ 23 | protected $typeId; 24 | 25 | /** 26 | * Identifier for the type of the DataValue. 27 | * 28 | * @since 0.1 29 | * 30 | * @var string 31 | */ 32 | protected $dataValueType; 33 | 34 | /** 35 | * @since 0.5 36 | * 37 | * @param string $typeId Identifier of this data type (also referred to as "property type"). 38 | * @param string $dataValueType Identifier for the type of the DataValue. 39 | * 40 | * @throws InvalidArgumentException 41 | */ 42 | public function __construct( $typeId, $dataValueType ) { 43 | if ( !is_string( $typeId ) || $typeId === '' ) { 44 | throw new InvalidArgumentException( '$typeId must be a non-empty string' ); 45 | } 46 | 47 | if ( !is_string( $dataValueType ) || $dataValueType === '' ) { 48 | throw new InvalidArgumentException( '$dataValueType must be a non-empty string' ); 49 | } 50 | 51 | $this->typeId = $typeId; 52 | $this->dataValueType = $dataValueType; 53 | } 54 | 55 | /** 56 | * Returns the identifier of this data type (also referred to as "property type"). 57 | * 58 | * @since 0.1 59 | * 60 | * @return string 61 | */ 62 | public function getId() { 63 | return $this->typeId; 64 | } 65 | 66 | /** 67 | * Returns the type of the DataValue used by this data type. 68 | * 69 | * @since 0.1 70 | * 71 | * @return string 72 | */ 73 | public function getDataValueType() { 74 | return $this->dataValueType; 75 | } 76 | 77 | /** 78 | * @since 1.0 79 | * 80 | * @return string 81 | */ 82 | public function getMessageKey() { 83 | return 'datatypes-type-' . $this->typeId; 84 | } 85 | 86 | /** 87 | * @since 0.1 88 | * 89 | * @return string[] 90 | */ 91 | public function toArray() { 92 | return [ 93 | 'dataValueType' => $this->dataValueType 94 | ]; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /js/dataTypes/DataType.js: -------------------------------------------------------------------------------- 1 | ( function ( $, dt ) { 2 | 'use strict'; 3 | 4 | /** 5 | * Base constructor for objects representing a data type. 6 | * @class dataTypes.DataType 7 | * @abstract 8 | * @since 0.1 9 | * @license GPL-2.0+ 10 | * @author Daniel Werner 11 | * @author H. Snater < mediawiki@snater.com > 12 | * 13 | * @constructor 14 | * @param {string} dataTypeId 15 | * @param {string} dataValueType 16 | * 17 | * @throws {Error} if data type id is not provided as a string. 18 | * @throws {Error} if data value type is not provided as a string. 19 | */ 20 | var SELF = dt.DataType = function DtDataType( dataTypeId, dataValueType ) { 21 | if ( !dataTypeId || typeof dataTypeId !== 'string' ) { 22 | throw new Error( 'A data type\'s ID has to be a string' ); 23 | } 24 | 25 | if ( typeof dataValueType !== 'string' ) { 26 | throw new Error( 'A data value type has to be given in form of a string' ); 27 | } 28 | 29 | this._id = dataTypeId; 30 | this._dataValueType = dataValueType; 31 | }; 32 | 33 | /** 34 | * @class dataTypes.DataType 35 | */ 36 | $.extend( SELF.prototype, { 37 | /** 38 | * Data type (a.k.a. property type) identifier. 39 | * @property {string} 40 | * @private 41 | */ 42 | _id: null, 43 | 44 | /** 45 | * Identifier of the data value type internally used by this data type. 46 | * @property {string} 47 | * @private 48 | */ 49 | _dataValueType: null, 50 | 51 | /** 52 | * Returns the data type (a.k.a. property type) identifier. 53 | * 54 | * @return {string} 55 | */ 56 | getId: function () { 57 | return this._id; 58 | }, 59 | 60 | /** 61 | * Returns the identifier of the data value type internally used by this data type. 62 | * 63 | * @return {string} 64 | */ 65 | getDataValueType: function () { 66 | return this._dataValueType; 67 | } 68 | } ); 69 | 70 | /** 71 | * Creates a new DataType object from a given JSON structure. 72 | * @static 73 | * 74 | * @param {string} dataTypeId 75 | * @param {Object} json 76 | * @return {dataTypes.DataType} 77 | */ 78 | SELF.newFromJSON = function ( dataTypeId, json ) { 79 | return new SELF( dataTypeId, json.dataValueType ); 80 | }; 81 | 82 | }( jQuery, dataTypes ) ); 83 | -------------------------------------------------------------------------------- /src/DataTypeFactory.php: -------------------------------------------------------------------------------- 1 | $valueType ) { 38 | if ( !is_string( $typeId ) || $typeId === '' 39 | || !is_string( $valueType ) || $valueType === '' 40 | ) { 41 | throw new InvalidArgumentException( 42 | '$valueTypes must be an associative array of non-empty strings' 43 | ); 44 | } 45 | } 46 | 47 | $this->valueTypes = $valueTypes; 48 | } 49 | 50 | /** 51 | * @since 0.1 52 | * 53 | * @param DataType[] $dataTypes 54 | * 55 | * @return self 56 | */ 57 | public static function newFromTypes( array $dataTypes ) { 58 | $factory = new self( [] ); 59 | 60 | foreach ( $dataTypes as $dataType ) { 61 | $factory->registerDataType( $dataType ); 62 | } 63 | 64 | return $factory; 65 | } 66 | 67 | /** 68 | * @since 0.1 69 | * 70 | * @param DataType $dataType 71 | */ 72 | public function registerDataType( DataType $dataType ) { 73 | $this->types[$dataType->getId()] = $dataType; 74 | } 75 | 76 | /** 77 | * Returns the list of registered data type identifiers (also referred to as "property types"). 78 | * 79 | * @since 0.1 80 | * 81 | * @return string[] 82 | */ 83 | public function getTypeIds() { 84 | return array_keys( $this->valueTypes ); 85 | } 86 | 87 | /** 88 | * Returns the data type that has the specified type identifier. 89 | * Types may be instantiated on the fly using a type builder spec. 90 | * 91 | * @since 0.1 92 | * 93 | * @param string $typeId Data type identifier (also referred to as "property type"). 94 | * 95 | * @throws OutOfBoundsException if the requested type is not known. 96 | * @return DataType 97 | */ 98 | public function getType( $typeId ) { 99 | if ( !array_key_exists( $typeId, $this->types ) ) { 100 | if ( !array_key_exists( $typeId, $this->valueTypes ) ) { 101 | throw new OutOfBoundsException( "Unknown data type '$typeId'" ); 102 | } 103 | 104 | $valueType = $this->valueTypes[$typeId]; 105 | $this->types[$typeId] = new DataType( $typeId, $valueType ); 106 | } 107 | 108 | return $this->types[$typeId]; 109 | } 110 | 111 | /** 112 | * Returns all data types in an associative array with 113 | * the keys being data type identifiers (also referred to as "property types") pointing to their 114 | * corresponding data type. 115 | * 116 | * @since 0.1 117 | * 118 | * @return DataType[] 119 | */ 120 | public function getTypes() { 121 | $types = []; 122 | 123 | foreach ( $this->getTypeIds() as $typeId ) { 124 | $types[$typeId] = $this->getType( $typeId ); 125 | } 126 | 127 | return $types; 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DataTypes 2 | 3 | PHP library defining the `DataTypes\DataType` class of which instances represent a type of value, 4 | such as "positive integer" or "percentage". 5 | 6 | [![Build Status](https://secure.travis-ci.org/wmde/DataTypes.png?branch=master)](http://travis-ci.org/wmde/DataTypes) 7 | [![Code Coverage](https://scrutinizer-ci.com/g/wmde/DataTypes/badges/coverage.png?s=81ca9034e898d0ff2ee603ffdcf07835c9b5f0d3)](https://scrutinizer-ci.com/g/wmde/DataTypes/) 8 | [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/wmde/DataTypes/badges/quality-score.png?s=2405ce60c089e7454598ae50e235f001b68bd5cb)](https://scrutinizer-ci.com/g/wmde/DataTypes/) 9 | [![Dependency Status](https://www.versioneye.com/php/data-values:data-types/dev-master/badge.png)](https://www.versioneye.com/php/data-values:data-types/dev-master) 10 | 11 | On [Packagist](https://packagist.org/packages/data-values/data-types): 12 | [![Latest Stable Version](https://poser.pugx.org/data-values/data-types/version.png)](https://packagist.org/packages/data-values/data-types) 13 | [![Download count](https://poser.pugx.org/data-values/data-types/d/total.png)](https://packagist.org/packages/data-values/data-types) 14 | 15 | ## Installation 16 | 17 | You can use [Composer](http://getcomposer.org/) to download and install 18 | this package as well as its dependencies. Alternatively you can simply clone 19 | the git repository and take care of loading yourself. 20 | 21 | ### Composer 22 | 23 | To add this package as a local, per-project dependency to your project, simply add a 24 | dependency on `data-values/data-types` to your project's `composer.json` file. 25 | Here is a minimal example of a `composer.json` file that just defines a dependency on 26 | DataTypes 1.0: 27 | 28 | { 29 | "require": { 30 | "data-values/data-types": "~1.0" 31 | } 32 | } 33 | 34 | ### Manual 35 | 36 | Get the DataTypes code, either via git, or some other means. Also get all dependencies. 37 | You can find a list of the dependencies in the "require" section of the composer.json file. 38 | Load all dependencies and the load the DataTypes library by including its entry point: 39 | DataTypes.php. 40 | 41 | ## Tests 42 | 43 | This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these 44 | tests using the PHPUnit configuration file found in the root directory. The tests can also be run 45 | via TravisCI, as a TravisCI configuration file is also provided in the root directory. 46 | 47 | ## Authors 48 | 49 | DataTypes has been written by the Wikidata team at [Wikimedia Germany](https://wikimedia.de) 50 | for the [Wikidata project](https://wikidata.org/). 51 | 52 | ## Release notes 53 | 54 | ### 1.1.0 (dev) 55 | * Updated internationalizations. 56 | 57 | ### 1.0.0 (2016-12-29) 58 | * `DataType` and `DataTypeFactory` do not accept empty strings any more. 59 | * Removed `DataType::getLabel` along with the `DataTypes\Message` class. 60 | * Added `DataType::getMessageKey`. 61 | * Added a basic PHPCS rule set, can be run with `composer phpcs`. 62 | 63 | ### 0.5.2 (2016-02-17) 64 | * Fixed cache invalidation in `DataTypesModule`. 65 | * Fixed `DataTypeFactory` to report invalid arguments on construction. 66 | 67 | ### 0.5.1 (2015-10-20) 68 | * `DataTypeFactory::getTypes()` now returns array with typeId keys as documented 69 | 70 | ### 0.5.0 (2015-08-10) 71 | 72 | #### Breaking changes 73 | * `DataType` no longer takes an array of `ValueValidator` in its constructor 74 | * `DataType::getValidators` has been removed 75 | * `DataTypeFactory` now takes a map from data type id to data value type. 76 | * `DataTypeFactory::registerBuilder` has been removed 77 | 78 | ### 0.4.3 (2015-06-18) 79 | 80 | * Fixed version number constant. 81 | 82 | ### 0.4.2 (2015-06-18) 83 | 84 | * Updated code documentation for being able to automatically generate a proper documentation using JSDuck. 85 | * Removed the ResourceLoader module "dependencies" which had been defined by accident. 86 | 87 | ### 0.4.1 (2014-11-18) 88 | 89 | * Improved path detection so it does not break when the library is included in `vendor` rather than `extensions` 90 | 91 | ### 0.4.0 (2014-05-21) 92 | 93 | * Removed the global variable `wgDataTypes` 94 | 95 | ### 0.3.0 (2014-05-21) 96 | 97 | * Rename `monolingual-text` to `monolingualtext` 98 | * Rename `multilingual-text` to `multilingualtext` 99 | 100 | ### 0.2.1 (2014-05-06) 101 | 102 | * Migrated the i18n support to the new MediaWiki JSON format 103 | * The tests are now run on PHP 5.6 and HHVM on travis 104 | 105 | ### 0.2.0 (2014-03-14) 106 | 107 | #### Breaking changes 108 | 109 | * `dataTypes.DataType` JavaScript object may no longer be initialized from a `dataValues.DataValue` object. 110 | * Removed `dataTypes.DataType.getLabel`. 111 | * Removed global DataType registration in the `dataTypes` object; `DataTypeStore` is to be used instead. 112 | * Split up generic "dataTypes" ResourceLoader module into "dataTypes.DataType" and "dataTypes.DataTypeStore". 113 | 114 | #### Enhancements 115 | 116 | * Removed MediaWiki and DataValues dependencies from JavaScript code. 117 | * Made code PSR-4 compliant 118 | * Removed ResourceLoader dependency of QUnit tests. 119 | * Implemented DataTypeStore. 120 | 121 | ### 0.1.1 (2013-12-23) 122 | 123 | * Remove assumption about where the extension is installed in the resource loading paths. 124 | 125 | ### 0.1.0 (2013-12-15) 126 | 127 | Initial release. 128 | 129 | ## Links 130 | 131 | * [DataTypes on Packagist](https://packagist.org/packages/data-values/data-types) 132 | * [DataTypes on Ohloh](https://www.ohloh.net/p/DataTypesPHP) 133 | * [TravisCI build status](https://travis-ci.org/wmde/DataTypes) 134 | * [DataTypes on ScrutinizerCI](https://scrutinizer-ci.com/g/wmde/DataTypes/) 135 | * [Issue tracker](https://phabricator.wikimedia.org/project/view/123/) 136 | -------------------------------------------------------------------------------- /src/Modules/DataTypesModule.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | class DataTypesModule extends ResourceLoaderModule { 25 | 26 | /** 27 | * @var DataType[] 28 | */ 29 | protected $dataTypes; 30 | 31 | /** 32 | * @var string 33 | */ 34 | protected $dataTypesConfigVarName; 35 | 36 | /** 37 | * @var DataTypeFactory 38 | */ 39 | protected $dataTypeFactory; 40 | 41 | /** 42 | * @since 0.1 43 | * 44 | * @param array $resourceDefinition 45 | */ 46 | public function __construct( array $resourceDefinition ) { 47 | $this->dataTypesConfigVarName = 48 | static::extractDataTypesConfigVarNameFromResourceDefinition( $resourceDefinition ); 49 | 50 | $this->dataTypeFactory = 51 | static::extractDataTypeFactoryFromResourceDefinition( $resourceDefinition ); 52 | 53 | $dataTypeFactory = $this->getDataTypeFactory(); 54 | $this->dataTypes = $dataTypeFactory->getTypes(); 55 | } 56 | 57 | /** 58 | * @since 0.1 59 | * 60 | * @param array $resourceDefinition 61 | * 62 | * @return string 63 | * @throws Exception If the given resource definition is not sufficient 64 | */ 65 | public static function extractDataTypesConfigVarNameFromResourceDefinition( 66 | array $resourceDefinition 67 | ) { 68 | $dataTypesConfigVarName = array_key_exists( 'datatypesconfigvarname', $resourceDefinition ) 69 | ? $resourceDefinition['datatypesconfigvarname'] 70 | : null; 71 | 72 | if ( !is_string( $dataTypesConfigVarName ) || $dataTypesConfigVarName === '' ) { 73 | throw new Exception( 74 | 'The "datatypesconfigvarname" value of the resource definition' . 75 | ' has to be a non-empty string value' 76 | ); 77 | } 78 | 79 | return $dataTypesConfigVarName; 80 | } 81 | 82 | /** 83 | * @since 0.1 84 | * 85 | * @param array $resourceDefinition 86 | * 87 | * @return DataTypeFactory 88 | * @throws Exception If the given resource definition is not sufficient 89 | */ 90 | public static function extractDataTypeFactoryFromResourceDefinition( 91 | array $resourceDefinition 92 | ) { 93 | $dataTypeFactory = array_key_exists( 'datatypefactory', $resourceDefinition ) 94 | ? $resourceDefinition['datatypefactory'] 95 | : null; 96 | 97 | if ( is_callable( $dataTypeFactory ) ) { 98 | $dataTypeFactory = call_user_func( $dataTypeFactory ); 99 | } 100 | 101 | if ( !( $dataTypeFactory instanceof DataTypeFactory ) ) { 102 | throw new Exception( 103 | 'The "datatypefactory" value of the resource definition has' . 104 | ' to be an instance of DataTypeFactory or a callback returning one' 105 | ); 106 | } 107 | 108 | return $dataTypeFactory; 109 | } 110 | 111 | /** 112 | * Returns the name of the config var key under which the data type definition will be available 113 | * in JavaScript using "mw.config.get( '...' )" 114 | * 115 | * @since 0.1 116 | * 117 | * @return string 118 | */ 119 | public function getConfigVarName() { 120 | return $this->dataTypesConfigVarName; 121 | } 122 | 123 | /** 124 | * Returns the data types factory providing the data type information. 125 | * 126 | * @since 0.1 127 | * 128 | * @return DataTypeFactory 129 | */ 130 | public function getDataTypeFactory() { 131 | return $this->dataTypeFactory; 132 | } 133 | 134 | /** 135 | * Used to propagate available data type ids to JavaScript. 136 | * Data type ids will be available in 'wbDataTypeIds' config var. 137 | * @see ResourceLoaderModule::getScript 138 | * 139 | * @since 0.1 140 | * 141 | * @param ResourceLoaderContext $context 142 | * 143 | * @return string 144 | */ 145 | public function getScript( ResourceLoaderContext $context ) { 146 | $configVarName = $this->getConfigVarName(); 147 | $typesJson = []; 148 | 149 | foreach ( $this->dataTypes as $dataType ) { 150 | $typesJson[ $dataType->getId() ] = $dataType->toArray(); 151 | } 152 | $typesJson = FormatJson::encode( $typesJson ); 153 | 154 | return "mediaWiki.config.set( '$configVarName', $typesJson );"; 155 | } 156 | 157 | /** 158 | * Returns the message keys of the registered data types. 159 | * @see ResourceLoaderModule::getMessages 160 | * @since 0.1 161 | * 162 | * @return string[] 163 | */ 164 | public function getMessages() { 165 | $messageKeys = []; 166 | 167 | foreach ( $this->dataTypes as $dataType ) { 168 | // TODO: currently we assume that the type is using a message while it does not have to. 169 | // Either change the system to ensure that a message is used or put the type labels 170 | // directly into the JSON. Either way, the information should be in DataType::toArray. 171 | $messageKeys[] = 'datatypes-type-' . $dataType->getId(); 172 | } 173 | 174 | return $messageKeys; 175 | } 176 | 177 | /** 178 | * @see ResourceLoaderModule::getDefinitionSummary 179 | * 180 | * @param ResourceLoaderContext $context 181 | * 182 | * @return array 183 | */ 184 | public function getDefinitionSummary( ResourceLoaderContext $context ) { 185 | $summary = parent::getDefinitionSummary( $context ); 186 | 187 | $summary[] = [ 188 | 'dataHash' => sha1( json_encode( array_keys( $this->dataTypes ) ) ) 189 | ]; 190 | 191 | return $summary; 192 | } 193 | 194 | } 195 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | The license text below "----" applies to all files within this distribution, other 2 | than those that are in a directory which contains files named "LICENSE" or 3 | "COPYING", or a subdirectory thereof. For those files, the license text contained in 4 | said file overrides any license information contained in directories of smaller depth. 5 | Alternative licenses are typically used for software that is provided by external 6 | parties, and merely packaged with this software for convenience. 7 | ---- 8 | 9 | GNU GENERAL PUBLIC LICENSE 10 | Version 2, June 1991 11 | 12 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 13 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 14 | Everyone is permitted to copy and distribute verbatim copies 15 | of this license document, but changing it is not allowed. 16 | 17 | Preamble 18 | 19 | The licenses for most software are designed to take away your 20 | freedom to share and change it. By contrast, the GNU General Public 21 | License is intended to guarantee your freedom to share and change free 22 | software--to make sure the software is free for all its users. This 23 | General Public License applies to most of the Free Software 24 | Foundation's software and to any other program whose authors commit to 25 | using it. (Some other Free Software Foundation software is covered by 26 | the GNU Lesser General Public License instead.) You can apply it to 27 | your programs, too. 28 | 29 | When we speak of free software, we are referring to freedom, not 30 | price. Our General Public Licenses are designed to make sure that you 31 | have the freedom to distribute copies of free software (and charge for 32 | this service if you wish), that you receive source code or can get it 33 | if you want it, that you can change the software or use pieces of it 34 | in new free programs; and that you know you can do these things. 35 | 36 | To protect your rights, we need to make restrictions that forbid 37 | anyone to deny you these rights or to ask you to surrender the rights. 38 | These restrictions translate to certain responsibilities for you if you 39 | distribute copies of the software, or if you modify it. 40 | 41 | For example, if you distribute copies of such a program, whether 42 | gratis or for a fee, you must give the recipients all the rights that 43 | you have. You must make sure that they, too, receive or can get the 44 | source code. And you must show them these terms so they know their 45 | rights. 46 | 47 | We protect your rights with two steps: (1) copyright the software, and 48 | (2) offer you this license which gives you legal permission to copy, 49 | distribute and/or modify the software. 50 | 51 | Also, for each author's protection and ours, we want to make certain 52 | that everyone understands that there is no warranty for this free 53 | software. If the software is modified by someone else and passed on, we 54 | want its recipients to know that what they have is not the original, so 55 | that any problems introduced by others will not reflect on the original 56 | authors' reputations. 57 | 58 | Finally, any free program is threatened constantly by software 59 | patents. We wish to avoid the danger that redistributors of a free 60 | program will individually obtain patent licenses, in effect making the 61 | program proprietary. To prevent this, we have made it clear that any 62 | patent must be licensed for everyone's free use or not licensed at all. 63 | 64 | The precise terms and conditions for copying, distribution and 65 | modification follow. 66 | 67 | GNU GENERAL PUBLIC LICENSE 68 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 69 | 70 | 0. This License applies to any program or other work which contains 71 | a notice placed by the copyright holder saying it may be distributed 72 | under the terms of this General Public License. The "Program", below, 73 | refers to any such program or work, and a "work based on the Program" 74 | means either the Program or any derivative work under copyright law: 75 | that is to say, a work containing the Program or a portion of it, 76 | either verbatim or with modifications and/or translated into another 77 | language. (Hereinafter, translation is included without limitation in 78 | the term "modification".) Each licensee is addressed as "you". 79 | 80 | Activities other than copying, distribution and modification are not 81 | covered by this License; they are outside its scope. The act of 82 | running the Program is not restricted, and the output from the Program 83 | is covered only if its contents constitute a work based on the 84 | Program (independent of having been made by running the Program). 85 | Whether that is true depends on what the Program does. 86 | 87 | 1. You may copy and distribute verbatim copies of the Program's 88 | source code as you receive it, in any medium, provided that you 89 | conspicuously and appropriately publish on each copy an appropriate 90 | copyright notice and disclaimer of warranty; keep intact all the 91 | notices that refer to this License and to the absence of any warranty; 92 | and give any other recipients of the Program a copy of this License 93 | along with the Program. 94 | 95 | You may charge a fee for the physical act of transferring a copy, and 96 | you may at your option offer warranty protection in exchange for a fee. 97 | 98 | 2. You may modify your copy or copies of the Program or any portion 99 | of it, thus forming a work based on the Program, and copy and 100 | distribute such modifications or work under the terms of Section 1 101 | above, provided that you also meet all of these conditions: 102 | 103 | a) You must cause the modified files to carry prominent notices 104 | stating that you changed the files and the date of any change. 105 | 106 | b) You must cause any work that you distribute or publish, that in 107 | whole or in part contains or is derived from the Program or any 108 | part thereof, to be licensed as a whole at no charge to all third 109 | parties under the terms of this License. 110 | 111 | c) If the modified program normally reads commands interactively 112 | when run, you must cause it, when started running for such 113 | interactive use in the most ordinary way, to print or display an 114 | announcement including an appropriate copyright notice and a 115 | notice that there is no warranty (or else, saying that you provide 116 | a warranty) and that users may redistribute the program under 117 | these conditions, and telling the user how to view a copy of this 118 | License. (Exception: if the Program itself is interactive but 119 | does not normally print such an announcement, your work based on 120 | the Program is not required to print an announcement.) 121 | 122 | These requirements apply to the modified work as a whole. If 123 | identifiable sections of that work are not derived from the Program, 124 | and can be reasonably considered independent and separate works in 125 | themselves, then this License, and its terms, do not apply to those 126 | sections when you distribute them as separate works. But when you 127 | distribute the same sections as part of a whole which is a work based 128 | on the Program, the distribution of the whole must be on the terms of 129 | this License, whose permissions for other licensees extend to the 130 | entire whole, and thus to each and every part regardless of who wrote it. 131 | 132 | Thus, it is not the intent of this section to claim rights or contest 133 | your rights to work written entirely by you; rather, the intent is to 134 | exercise the right to control the distribution of derivative or 135 | collective works based on the Program. 136 | 137 | In addition, mere aggregation of another work not based on the Program 138 | with the Program (or with a work based on the Program) on a volume of 139 | a storage or distribution medium does not bring the other work under 140 | the scope of this License. 141 | 142 | 3. You may copy and distribute the Program (or a work based on it, 143 | under Section 2) in object code or executable form under the terms of 144 | Sections 1 and 2 above provided that you also do one of the following: 145 | 146 | a) Accompany it with the complete corresponding machine-readable 147 | source code, which must be distributed under the terms of Sections 148 | 1 and 2 above on a medium customarily used for software interchange; or, 149 | 150 | b) Accompany it with a written offer, valid for at least three 151 | years, to give any third party, for a charge no more than your 152 | cost of physically performing source distribution, a complete 153 | machine-readable copy of the corresponding source code, to be 154 | distributed under the terms of Sections 1 and 2 above on a medium 155 | customarily used for software interchange; or, 156 | 157 | c) Accompany it with the information you received as to the offer 158 | to distribute corresponding source code. (This alternative is 159 | allowed only for noncommercial distribution and only if you 160 | received the program in object code or executable form with such 161 | an offer, in accord with Subsection b above.) 162 | 163 | The source code for a work means the preferred form of the work for 164 | making modifications to it. For an executable work, complete source 165 | code means all the source code for all modules it contains, plus any 166 | associated interface definition files, plus the scripts used to 167 | control compilation and installation of the executable. However, as a 168 | special exception, the source code distributed need not include 169 | anything that is normally distributed (in either source or binary 170 | form) with the major components (compiler, kernel, and so on) of the 171 | operating system on which the executable runs, unless that component 172 | itself accompanies the executable. 173 | 174 | If distribution of executable or object code is made by offering 175 | access to copy from a designated place, then offering equivalent 176 | access to copy the source code from the same place counts as 177 | distribution of the source code, even though third parties are not 178 | compelled to copy the source along with the object code. 179 | 180 | 4. You may not copy, modify, sublicense, or distribute the Program 181 | except as expressly provided under this License. Any attempt 182 | otherwise to copy, modify, sublicense or distribute the Program is 183 | void, and will automatically terminate your rights under this License. 184 | However, parties who have received copies, or rights, from you under 185 | this License will not have their licenses terminated so long as such 186 | parties remain in full compliance. 187 | 188 | 5. You are not required to accept this License, since you have not 189 | signed it. However, nothing else grants you permission to modify or 190 | distribute the Program or its derivative works. These actions are 191 | prohibited by law if you do not accept this License. Therefore, by 192 | modifying or distributing the Program (or any work based on the 193 | Program), you indicate your acceptance of this License to do so, and 194 | all its terms and conditions for copying, distributing or modifying 195 | the Program or works based on it. 196 | 197 | 6. Each time you redistribute the Program (or any work based on the 198 | Program), the recipient automatically receives a license from the 199 | original licensor to copy, distribute or modify the Program subject to 200 | these terms and conditions. You may not impose any further 201 | restrictions on the recipients' exercise of the rights granted herein. 202 | You are not responsible for enforcing compliance by third parties to 203 | this License. 204 | 205 | 7. If, as a consequence of a court judgment or allegation of patent 206 | infringement or for any other reason (not limited to patent issues), 207 | conditions are imposed on you (whether by court order, agreement or 208 | otherwise) that contradict the conditions of this License, they do not 209 | excuse you from the conditions of this License. If you cannot 210 | distribute so as to satisfy simultaneously your obligations under this 211 | License and any other pertinent obligations, then as a consequence you 212 | may not distribute the Program at all. For example, if a patent 213 | license would not permit royalty-free redistribution of the Program by 214 | all those who receive copies directly or indirectly through you, then 215 | the only way you could satisfy both it and this License would be to 216 | refrain entirely from distribution of the Program. 217 | 218 | If any portion of this section is held invalid or unenforceable under 219 | any particular circumstance, the balance of the section is intended to 220 | apply and the section as a whole is intended to apply in other 221 | circumstances. 222 | 223 | It is not the purpose of this section to induce you to infringe any 224 | patents or other property right claims or to contest validity of any 225 | such claims; this section has the sole purpose of protecting the 226 | integrity of the free software distribution system, which is 227 | implemented by public license practices. Many people have made 228 | generous contributions to the wide range of software distributed 229 | through that system in reliance on consistent application of that 230 | system; it is up to the author/donor to decide if he or she is willing 231 | to distribute software through any other system and a licensee cannot 232 | impose that choice. 233 | 234 | This section is intended to make thoroughly clear what is believed to 235 | be a consequence of the rest of this License. 236 | 237 | 8. If the distribution and/or use of the Program is restricted in 238 | certain countries either by patents or by copyrighted interfaces, the 239 | original copyright holder who places the Program under this License 240 | may add an explicit geographical distribution limitation excluding 241 | those countries, so that distribution is permitted only in or among 242 | countries not thus excluded. In such case, this License incorporates 243 | the limitation as if written in the body of this License. 244 | 245 | 9. The Free Software Foundation may publish revised and/or new versions 246 | of the General Public License from time to time. Such new versions will 247 | be similar in spirit to the present version, but may differ in detail to 248 | address new problems or concerns. 249 | 250 | Each version is given a distinguishing version number. If the Program 251 | specifies a version number of this License which applies to it and "any 252 | later version", you have the option of following the terms and conditions 253 | either of that version or of any later version published by the Free 254 | Software Foundation. If the Program does not specify a version number of 255 | this License, you may choose any version ever published by the Free Software 256 | Foundation. 257 | 258 | 10. If you wish to incorporate parts of the Program into other free 259 | programs whose distribution conditions are different, write to the author 260 | to ask for permission. For software which is copyrighted by the Free 261 | Software Foundation, write to the Free Software Foundation; we sometimes 262 | make exceptions for this. Our decision will be guided by the two goals 263 | of preserving the free status of all derivatives of our free software and 264 | of promoting the sharing and reuse of software generally. 265 | 266 | NO WARRANTY 267 | 268 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 269 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 270 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 271 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 272 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 273 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 274 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 275 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 276 | REPAIR OR CORRECTION. 277 | 278 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 279 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 280 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 281 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 282 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 283 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 284 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 285 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 286 | POSSIBILITY OF SUCH DAMAGES. 287 | 288 | END OF TERMS AND CONDITIONS 289 | 290 | How to Apply These Terms to Your New Programs 291 | 292 | If you develop a new program, and you want it to be of the greatest 293 | possible use to the public, the best way to achieve this is to make it 294 | free software which everyone can redistribute and change under these terms. 295 | 296 | To do so, attach the following notices to the program. It is safest 297 | to attach them to the start of each source file to most effectively 298 | convey the exclusion of warranty; and each file should have at least 299 | the "copyright" line and a pointer to where the full notice is found. 300 | 301 | 302 | Copyright (C) 303 | 304 | This program is free software; you can redistribute it and/or modify 305 | it under the terms of the GNU General Public License as published by 306 | the Free Software Foundation; either version 2 of the License, or 307 | (at your option) any later version. 308 | 309 | This program is distributed in the hope that it will be useful, 310 | but WITHOUT ANY WARRANTY; without even the implied warranty of 311 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 312 | GNU General Public License for more details. 313 | 314 | You should have received a copy of the GNU General Public License along 315 | with this program; if not, write to the Free Software Foundation, Inc., 316 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 317 | 318 | Also add information on how to contact you by electronic and paper mail. 319 | 320 | If the program is interactive, make it output a short notice like this 321 | when it starts in an interactive mode: 322 | 323 | Gnomovision version 69, Copyright (C) year name of author 324 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 325 | This is free software, and you are welcome to redistribute it 326 | under certain conditions; type `show c' for details. 327 | 328 | The hypothetical commands `show w' and `show c' should show the appropriate 329 | parts of the General Public License. Of course, the commands you use may 330 | be called something other than `show w' and `show c'; they could even be 331 | mouse-clicks or menu items--whatever suits your program. 332 | 333 | You should also get your employer (if you work as a programmer) or your 334 | school, if any, to sign a "copyright disclaimer" for the program, if 335 | necessary. Here is a sample; alter the names: 336 | 337 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 338 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 339 | 340 | , 1 April 1989 341 | Ty Coon, President of Vice 342 | 343 | This General Public License does not permit incorporating your program into 344 | proprietary programs. If your program is a subroutine library, you may 345 | consider it more useful to permit linking proprietary applications with the 346 | library. If this is what you want to do, use the GNU Lesser General 347 | Public License instead of this License. 348 | --------------------------------------------------------------------------------