Index: tags/extensions/ExternalData/REL_1_2_2/ExternalData.i18n.magic.php |
— | — | @@ -0,0 +1,101 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$magicWords = array(); |
| 5 | + |
| 6 | +/** English (English) */ |
| 7 | +$magicWords['en'] = array( |
| 8 | + 'get_external_data' => array( 0, 'get_external_data' ), |
| 9 | + 'get_web_data' => array( 0, 'get_web_data' ), |
| 10 | + 'get_ldap_data' => array( 0, 'get_ldap_data' ), |
| 11 | + 'get_db_data' => array( 0, 'get_db_data' ), |
| 12 | + 'external_value' => array( 0, 'external_value' ), |
| 13 | + 'for_external_table' => array( 0, 'for_external_table' ), |
| 14 | + 'store_external_table' => array( 0, 'store_external_table' ), |
| 15 | +); |
| 16 | + |
| 17 | +/** Arabic (العربية) */ |
| 18 | +$magicWords['ar'] = array( |
| 19 | + 'get_external_data' => array( 0, 'عرض_بيانات_خارجية', 'get_external_data' ), |
| 20 | + 'get_ldap_data' => array( 0, 'عرض_بيانات_لداب', 'get_ldap_data' ), |
| 21 | + 'get_db_data' => array( 0, 'عرض_بيانات_قب', 'get_db_data' ), |
| 22 | + 'external_value' => array( 0, 'قيمة_خارجية', 'external_value' ), |
| 23 | + 'for_external_table' => array( 0, 'لجدول_خارجي', 'for_external_table' ), |
| 24 | + 'store_external_table' => array( 0, 'تخزين_جدول_خارجي', 'store_external_table' ), |
| 25 | +); |
| 26 | + |
| 27 | +/** Egyptian Spoken Arabic (مصرى) */ |
| 28 | +$magicWords['arz'] = array( |
| 29 | + 'get_external_data' => array( 0, 'عرض_بيانات_خارجية', 'get_external_data' ), |
| 30 | + 'get_ldap_data' => array( 0, 'عرض_بيانات_لداب', 'get_ldap_data' ), |
| 31 | + 'get_db_data' => array( 0, 'عرض_بيانات_قب', 'get_db_data' ), |
| 32 | + 'external_value' => array( 0, 'قيمة_خارجية', 'external_value' ), |
| 33 | + 'for_external_table' => array( 0, 'لجدول_خارجي', 'for_external_table' ), |
| 34 | + 'store_external_table' => array( 0, 'تخزين_جدول_خارجى', 'تخزين_جدول_خارجي', 'store_external_table' ), |
| 35 | +); |
| 36 | + |
| 37 | +/** Chechen (Нохчийн) */ |
| 38 | +$magicWords['ce'] = array( |
| 39 | + 'get_external_data' => array( 0, 'схьаэца_архьара_хаамаш', 'получить_внешние_данные', 'get_external_data' ), |
| 40 | + 'get_ldap_data' => array( 0, 'схьаэца_хаамаш_ldap', 'получить_данные_ldap', 'get_ldap_data' ), |
| 41 | + 'get_db_data' => array( 0, 'схьаэца_хаамаш_db', 'получить_данные_db', 'get_db_data' ), |
| 42 | + 'external_value' => array( 0, 'архьара_дозалла', 'внешнее_значение', 'external_value' ), |
| 43 | + 'for_external_table' => array( 0, 'оцу_архьара_тебалецlаш', 'для_внешней_таблицы', 'for_external_table' ), |
| 44 | +); |
| 45 | + |
| 46 | +/** Spanish (Español) */ |
| 47 | +$magicWords['es'] = array( |
| 48 | + 'get_external_data' => array( 0, 'obtener_datos_externos', 'get_external_data' ), |
| 49 | + 'get_db_data' => array( 0, 'obtener_datos_db', 'get_db_data' ), |
| 50 | + 'external_value' => array( 0, 'valor_externo', 'external_value' ), |
| 51 | +); |
| 52 | + |
| 53 | +/** Japanese (日本語) */ |
| 54 | +$magicWords['ja'] = array( |
| 55 | + 'get_external_data' => array( 0, '外部データ取得' ), |
| 56 | + 'get_ldap_data' => array( 0, 'ldapデータ取得' ), |
| 57 | + 'get_db_data' => array( 0, 'dbデータ取得' ), |
| 58 | + 'external_value' => array( 0, '外部値' ), |
| 59 | + 'for_external_table' => array( 0, '外部テーブル用' ), |
| 60 | + 'store_external_table' => array( 0, '外部テーブル格納' ), |
| 61 | +); |
| 62 | + |
| 63 | +/** Malayalam (മലയാളം) */ |
| 64 | +$magicWords['ml'] = array( |
| 65 | + 'get_external_data' => array( 0, 'ബാഹ്യ_വിവരങ്ങൾ_എടുക്കുക' ), |
| 66 | + 'external_value' => array( 0, 'ബാഹ്യ_മൂല്യം' ), |
| 67 | +); |
| 68 | + |
| 69 | +/** Marathi (मराठी) */ |
| 70 | +$magicWords['mr'] = array( |
| 71 | + 'get_external_data' => array( 0, 'मिळवा_बाह्य_विदा', 'get_external_data' ), |
| 72 | + 'get_ldap_data' => array( 0, 'मिळवा__एलडॅप_विदा', 'get_ldap_data' ), |
| 73 | + 'for_external_table' => array( 0, 'बाह्य_सारणी_करिता', 'for_external_table' ), |
| 74 | +); |
| 75 | + |
| 76 | +/** Nedersaksisch (Nedersaksisch) */ |
| 77 | +$magicWords['nds-nl'] = array( |
| 78 | + 'get_external_data' => array( 0, 'externe_gegevens_ophaolen', 'externe_gegevens_ophalen', 'get_external_data' ), |
| 79 | + 'get_ldap_data' => array( 0, 'ldap-gegevens_ophaolen', 'ldap_gegevens_ophalen', 'get_ldap_data' ), |
| 80 | + 'get_db_data' => array( 0, 'db-gegevens_ophaolen', 'db_gegevens_ophalen', 'get_db_data' ), |
| 81 | + 'external_value' => array( 0, 'externe_weerde', 'externe_waarde', 'external_value' ), |
| 82 | + 'for_external_table' => array( 0, 'veur_externe_tebel', 'voor_externe_tabel', 'for_external_table' ), |
| 83 | +); |
| 84 | + |
| 85 | +/** Dutch (Nederlands) */ |
| 86 | +$magicWords['nl'] = array( |
| 87 | + 'get_external_data' => array( 0, 'externe_gegevens_ophalen' ), |
| 88 | + 'get_ldap_data' => array( 0, 'ldap_gegevens_ophalen' ), |
| 89 | + 'get_db_data' => array( 0, 'db_gegevens_ophalen' ), |
| 90 | + 'external_value' => array( 0, 'externe_waarde' ), |
| 91 | + 'for_external_table' => array( 0, 'voor_externe_tabel' ), |
| 92 | +); |
| 93 | + |
| 94 | +/** Russian (Русский) */ |
| 95 | +$magicWords['ru'] = array( |
| 96 | + 'get_external_data' => array( 0, 'получить_внешние_данные', 'get_external_data' ), |
| 97 | + 'get_ldap_data' => array( 0, 'получить_данные_ldap', 'get_ldap_data' ), |
| 98 | + 'get_db_data' => array( 0, 'получить_данные_db', 'get_db_data' ), |
| 99 | + 'external_value' => array( 0, 'внешнее_значение', 'external_value' ), |
| 100 | + 'for_external_table' => array( 0, 'для_внешней_таблицы', 'for_external_table' ), |
| 101 | + 'store_external_table' => array( 0, 'внешняя_таблица_хранения', 'store_external_table' ), |
| 102 | +); |
\ No newline at end of file |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ExternalData.i18n.magic.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 103 | + Id |
Added: svn:eol-style |
2 | 104 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ExternalData.i18n.php |
— | — | @@ -0,0 +1,855 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalization file for the External Data extension |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + */ |
| 8 | + |
| 9 | +$messages = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Yaron Koren |
| 13 | + */ |
| 14 | +$messages['en'] = array( |
| 15 | + // user messages |
| 16 | + 'getdata' => 'Get data', |
| 17 | + 'externaldata-desc' => 'Allows for retrieving structured data from external URLs, databases and other sources', |
| 18 | + 'externaldata-ldap-unable-to-connect' => 'Unable to connect to $1', |
| 19 | + 'externaldata-json-decode-not-supported' => 'Error: json_decode() is not supported in this version of PHP', |
| 20 | + 'externaldata-xml-error' => 'XML error: $1 at line $2', |
| 21 | + 'externaldata-db-incomplete-information' => 'Error: Incomplete information for this server ID.', |
| 22 | + 'externaldata-db-could-not-get-url' => 'Could not get URL after $1 {{PLURAL:$1|try|tries}}.', |
| 23 | + 'externaldata-db-unknown-type' => 'Error: Unknown database type.', |
| 24 | + 'externaldata-db-could-not-connect' => 'Error: Could not connect to database.', |
| 25 | + 'externaldata-db-no-return-values' => 'Error: No return values specified.', |
| 26 | + 'externaldata-db-invalid-query' => 'Invalid query.', |
| 27 | +); |
| 28 | + |
| 29 | +/** Message documentation (Message documentation) |
| 30 | + * @author Dead3y3 |
| 31 | + * @author Fryed-peach |
| 32 | + */ |
| 33 | +$messages['qqq'] = array( |
| 34 | + 'externaldata-desc' => '{{desc}}', |
| 35 | +); |
| 36 | + |
| 37 | +/** Afrikaans (Afrikaans) |
| 38 | + * @author Naudefj |
| 39 | + */ |
| 40 | +$messages['af'] = array( |
| 41 | + 'getdata' => 'Kry data', |
| 42 | + 'externaldata-xml-error' => 'XML-fout: $1 op reël $2', |
| 43 | + 'externaldata-db-unknown-type' => 'Fout: onbekende databasistipe.', |
| 44 | + 'externaldata-db-could-not-connect' => "Fout: kon nie 'n verbinding met databasis bewerkstellig nie.", |
| 45 | + 'externaldata-db-invalid-query' => 'Ongeldige navraag.', |
| 46 | +); |
| 47 | + |
| 48 | +/** Gheg Albanian (Gegë) |
| 49 | + * @author Mdupont |
| 50 | + */ |
| 51 | +$messages['aln'] = array( |
| 52 | + 'getdata' => 'Merr të dhëna', |
| 53 | + 'externaldata-desc' => 'Lejon retrieving të dhënat e strukturuar nga URL jashtme, bazat e të dhënave dhe burimet tjera', |
| 54 | + 'externaldata-ldap-unable-to-connect' => "Në pamundësi për t'u lidhur tek $1", |
| 55 | + 'externaldata-json-decode-not-supported' => 'Gabim: json_decode() nuk është i mbështetur në këtë version të PHP', |
| 56 | + 'externaldata-xml-error' => 'XML error: $1 tek $2 linjë', |
| 57 | + 'externaldata-db-incomplete-information' => 'Gabim: informata jo të plota për këtë server të identitetit.', |
| 58 | + 'externaldata-db-could-not-get-url' => 'Nuk mund te merrni URL pasi $1 {{PLURAL:$1|provoni|përpiqet}}.', |
| 59 | + 'externaldata-db-unknown-type' => 'Gabim: Lloj i panjohur bazës së të dhënave.', |
| 60 | + 'externaldata-db-could-not-connect' => 'Gabim: Nuk mund të lidheni me bazën e të dhënave.', |
| 61 | + 'externaldata-db-no-return-values' => 'Gabim: Nuk ka kthim vlerat e caktuara.', |
| 62 | + 'externaldata-db-invalid-query' => 'pyetje e pavlefshme.', |
| 63 | +); |
| 64 | + |
| 65 | +/** Arabic (العربية) |
| 66 | + * @author Meno25 |
| 67 | + * @author OsamaK |
| 68 | + */ |
| 69 | +$messages['ar'] = array( |
| 70 | + 'getdata' => 'الحصول على البيانات', |
| 71 | + 'externaldata-desc' => 'يسمح باسترجاع البيانات الهيكلية من مسارات خارجية، قواعد البيانات ومصادر أخرى', |
| 72 | + 'externaldata-ldap-unable-to-connect' => 'تعذّر الاتصال ب$1', |
| 73 | + 'externaldata-json-decode-not-supported' => 'خطأ: json_decode() غير مدعوم في نسخة PHP هذه', |
| 74 | + 'externaldata-xml-error' => 'خطأ XML: $1 عند السطر $2', |
| 75 | + 'externaldata-db-incomplete-information' => 'خطأ: معلومات غير كاملة عن هوية هذا الخادوم.', |
| 76 | + 'externaldata-db-could-not-get-url' => 'تعذّر الحصول على المسار بعد {{PLURAL:$1||محاولة واحدة|محاوتين|$1 محاولات|$1 محاولة }}.', |
| 77 | + 'externaldata-db-unknown-type' => 'خطأ: نوع قاعدة بيانات غير معروف.', |
| 78 | + 'externaldata-db-could-not-connect' => 'خطأ: تعذّر الاتصال بقاعدة البيانات.', |
| 79 | + 'externaldata-db-no-return-values' => 'خطأ: لم تحدد أي قيم عائدة.', |
| 80 | + 'externaldata-db-invalid-query' => 'استعلام غير صالح.', |
| 81 | +); |
| 82 | + |
| 83 | +/** Egyptian Spoken Arabic (مصرى) |
| 84 | + * @author Dudi |
| 85 | + * @author Meno25 |
| 86 | + */ |
| 87 | +$messages['arz'] = array( |
| 88 | + 'getdata' => 'الحصول على البيانات', |
| 89 | + 'externaldata-desc' => 'بيسمح انك تجيب الداتا المتركبه من URLات برّانيه, و قواعد بيانات (databases) و مصادر تانيه', |
| 90 | +); |
| 91 | + |
| 92 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 93 | + * @author EugeneZelenko |
| 94 | + * @author Jim-by |
| 95 | + */ |
| 96 | +$messages['be-tarask'] = array( |
| 97 | + 'getdata' => 'Атрымаць зьвесткі', |
| 98 | + 'externaldata-desc' => 'Дазваляе атрымліваць структураваныя зьвесткі з вонкавых URL-адрасоў, базаў зьвестак і іншых крыніц', |
| 99 | + 'externaldata-ldap-unable-to-connect' => 'Немагчыма далучыцца да $1', |
| 100 | + 'externaldata-json-decode-not-supported' => 'Памылка: json_decode() не падтрымліваецца ў гэтай вэрсіі PHP', |
| 101 | + 'externaldata-xml-error' => 'Памылка XML: $1 у радку $2', |
| 102 | + 'externaldata-db-incomplete-information' => 'Памылка: Няпоўная інфармацыя для гэтага ідэнтыфікатара сэрвэра.', |
| 103 | + 'externaldata-db-could-not-get-url' => 'Немагчыма атрымаць URL-адрас пасьля $1 {{PLURAL:$1|спробы|спробаў|спробаў}}.', |
| 104 | + 'externaldata-db-unknown-type' => 'Памылка: Невядомы тып базы зьвестак.', |
| 105 | + 'externaldata-db-could-not-connect' => 'Памылка: Немагчыма далучыцца да базы зьвестак.', |
| 106 | + 'externaldata-db-no-return-values' => 'Памылка: Не пазначаныя выніковыя значэньні.', |
| 107 | + 'externaldata-db-invalid-query' => 'Няслушны запыт.', |
| 108 | +); |
| 109 | + |
| 110 | +/** Breton (Brezhoneg) |
| 111 | + * @author Fohanno |
| 112 | + * @author Fulup |
| 113 | + * @author Y-M D |
| 114 | + */ |
| 115 | +$messages['br'] = array( |
| 116 | + 'getdata' => 'Tapout roadennoù', |
| 117 | + 'externaldata-desc' => 'Talvezout a ra da adtapout roadennoù frammet adalek URLoù diavaez, diazoù titouroù ha mammennoù all.', |
| 118 | + 'externaldata-ldap-unable-to-connect' => "Ne c'haller ket kevreañ ouzh $1", |
| 119 | + 'externaldata-json-decode-not-supported' => "Fazi : json_decode() n'eo ket skoret er stumm-mañ eus PHP", |
| 120 | + 'externaldata-xml-error' => 'Fazi XML : $1 el linenn $2', |
| 121 | + 'externaldata-db-incomplete-information' => 'Fazi : Titouroù diglok evit an ID servijer-mañ.', |
| 122 | + 'externaldata-db-could-not-get-url' => 'Dibosupl eo tapout an URL goude $1 {{PLURAL:$1|taol-esae|taol-esae}}.', |
| 123 | + 'externaldata-db-unknown-type' => 'Fazi : Seurt diaz roadennoù dianav', |
| 124 | + 'externaldata-db-could-not-connect' => "Fazi : Ne c'haller ket kevreañ ouzh an diaz roadennoù.", |
| 125 | + 'externaldata-db-no-return-values' => "Fazi : N'eus bet resisaet talvoud distro ebet.", |
| 126 | + 'externaldata-db-invalid-query' => 'Reked direizh.', |
| 127 | +); |
| 128 | + |
| 129 | +/** Bosnian (Bosanski) |
| 130 | + * @author CERminator |
| 131 | + */ |
| 132 | +$messages['bs'] = array( |
| 133 | + 'getdata' => 'Uzmi podatke', |
| 134 | + 'externaldata-desc' => 'Omogućuje za preuzimanje strukturnih podataka iz vanjskih URLova, baza podataka i drugih izvora', |
| 135 | + 'externaldata-ldap-unable-to-connect' => 'Ne može se spojiti na $1', |
| 136 | + 'externaldata-json-decode-not-supported' => 'Greška: json_decode() nije podržan u ovoj PHP verziji', |
| 137 | + 'externaldata-xml-error' => 'XML greška: $1 na liniji $2', |
| 138 | + 'externaldata-db-incomplete-information' => 'Greška: Nepotpune informacije za ovaj ID servera.', |
| 139 | + 'externaldata-db-could-not-get-url' => 'Nije pronađen URL nakon $1 {{PLURAL:$1|pokušaja|pokušaja}}.', |
| 140 | + 'externaldata-db-unknown-type' => 'Greška: Nepoznat tip baze podataka.', |
| 141 | + 'externaldata-db-could-not-connect' => 'Greška: Ne može se spojiti na bazu podataka.', |
| 142 | + 'externaldata-db-no-return-values' => 'Greška: Nije navedena povratna vrijednost.', |
| 143 | + 'externaldata-db-invalid-query' => 'Nevaljan upit.', |
| 144 | +); |
| 145 | + |
| 146 | +/** Catalan (Català) |
| 147 | + * @author Paucabot |
| 148 | + * @author Solde |
| 149 | + */ |
| 150 | +$messages['ca'] = array( |
| 151 | + 'getdata' => 'Obtenir dades', |
| 152 | + 'externaldata-xml-error' => 'Error XML: $1 a la línia $2', |
| 153 | + 'externaldata-db-unknown-type' => 'Error: Tipus de base de dades desconegut.', |
| 154 | + 'externaldata-db-could-not-connect' => "Error: No s'ha pogut connectar a la base de dades.", |
| 155 | + 'externaldata-db-invalid-query' => 'Consulta no vàlida.', |
| 156 | +); |
| 157 | + |
| 158 | +/** Czech (Česky) |
| 159 | + * @author Jkjk |
| 160 | + */ |
| 161 | +$messages['cs'] = array( |
| 162 | + 'getdata' => 'Získat data', |
| 163 | + 'externaldata-desc' => 'Umožňuje získávání strukturovaných dat z externích webových stránek, databází a jiných zdrojů', |
| 164 | + 'externaldata-ldap-unable-to-connect' => 'Nepodařilo se spojit s $1', |
| 165 | + 'externaldata-json-decode-not-supported' => 'Chyba:tato verzie PHP nepodporuje json_decode()', |
| 166 | + 'externaldata-xml-error' => 'Chyba XML: $1 na řádku $2', |
| 167 | + 'externaldata-db-incomplete-information' => 'Chyba: Nekompletní informace pro toto ID serveru', |
| 168 | + 'externaldata-db-unknown-type' => 'Chyba: Neznámý typ databáze.', |
| 169 | + 'externaldata-db-could-not-connect' => 'Chyba: Nepodařilo se připojit k databázi.', |
| 170 | + 'externaldata-db-no-return-values' => 'Chyba: Nebyly zadány návratové hodnoty.', |
| 171 | + 'externaldata-db-invalid-query' => 'Neplatný požadavek.', |
| 172 | +); |
| 173 | + |
| 174 | +/** German (Deutsch) |
| 175 | + * @author Imre |
| 176 | + * @author MF-Warburg |
| 177 | + * @author Merlissimo |
| 178 | + * @author Purodha |
| 179 | + * @author Umherirrender |
| 180 | + */ |
| 181 | +$messages['de'] = array( |
| 182 | + 'getdata' => 'Daten holen', |
| 183 | + 'externaldata-desc' => 'Erlaubt das Einfügen von strukturierten Daten aus externen URLs, Datenbanken und anderen Quellen', |
| 184 | + 'externaldata-ldap-unable-to-connect' => 'Keine Verbindung zu $1', |
| 185 | + 'externaldata-json-decode-not-supported' => 'Fehler: json_decode() wird nicht von dieser PHP-Version unterstützt', |
| 186 | + 'externaldata-xml-error' => 'XML-Fehler: $1 in Zeile $2', |
| 187 | + 'externaldata-db-incomplete-information' => 'Fehler: Unvollständige Informationen für diese Server-ID.', |
| 188 | + 'externaldata-db-could-not-get-url' => 'URL konnte nach $1 {{PLURAL:$1|Versuch|Versuchen}} nicht abgerufen werden.', |
| 189 | + 'externaldata-db-unknown-type' => 'Fehler: Unbekannter Datenbanktyp.', |
| 190 | + 'externaldata-db-could-not-connect' => 'Fehler: Keine Verbindung zur Datenbank.', |
| 191 | + 'externaldata-db-no-return-values' => 'Fehler: Keine Rückgabewerte festgelegt.', |
| 192 | + 'externaldata-db-invalid-query' => 'Ungültige Abfrage.', |
| 193 | +); |
| 194 | + |
| 195 | +/** Lower Sorbian (Dolnoserbski) |
| 196 | + * @author Michawiki |
| 197 | + */ |
| 198 | +$messages['dsb'] = array( |
| 199 | + 'getdata' => 'Daty wobstaraś', |
| 200 | + 'externaldata-desc' => 'Zmóžnja wótwołowanje strukturěrowanych datow z eksternych URL, datowych bankow a drugich žrědłow', |
| 201 | + 'externaldata-ldap-unable-to-connect' => 'Njemóžno z $1 zwězaś', |
| 202 | + 'externaldata-json-decode-not-supported' => 'Zmólka: json_decode() njepódpěra se w toś tej wersiji PHP', |
| 203 | + 'externaldata-xml-error' => 'Zmólka XML: $1 na smužce $2', |
| 204 | + 'externaldata-db-incomplete-information' => "'''Zmólka: Njedopołne informacije za toś ten serwerowy ID.'''", |
| 205 | + 'externaldata-db-could-not-get-url' => 'Njemóžno URL pó $1 {{PLURAL:$1|wopyśe|wopytoma|wopytach|wopytach}} dostaś.', |
| 206 | + 'externaldata-db-unknown-type' => "'''Zmólka: Njeznata datowa banka.'''", |
| 207 | + 'externaldata-db-could-not-connect' => "'''Zmólka: Njemóžno z datoweju banku zwězaś.'''", |
| 208 | + 'externaldata-db-no-return-values' => "'''Zmólka: Žedne gódnoty slědkdaśa pódane.'''", |
| 209 | + 'externaldata-db-invalid-query' => 'Njepłaśiwe napšašowanje.', |
| 210 | +); |
| 211 | + |
| 212 | +/** Greek (Ελληνικά) |
| 213 | + * @author Dead3y3 |
| 214 | + * @author Omnipaedista |
| 215 | + */ |
| 216 | +$messages['el'] = array( |
| 217 | + 'getdata' => 'Πάρε δεδομένα', |
| 218 | + 'externaldata-desc' => 'Επιτρέπει την ανάκτηση δεδομένων σε μορφές CSV, JSON και XML και για εξωτερικά URLs και για σελίδες του τοπικού wiki', |
| 219 | + 'externaldata-xml-error' => 'Σφάλμα XML : $1 στη γραμμή $2', |
| 220 | + 'externaldata-db-invalid-query' => 'Άκυρο αίτημα.', |
| 221 | +); |
| 222 | + |
| 223 | +/** Esperanto (Esperanto) |
| 224 | + * @author Yekrats |
| 225 | + */ |
| 226 | +$messages['eo'] = array( |
| 227 | + 'externaldata-db-invalid-query' => 'Malvalida serĉomendo.', |
| 228 | +); |
| 229 | + |
| 230 | +/** Spanish (Español) |
| 231 | + * @author Crazymadlover |
| 232 | + * @author Imre |
| 233 | + * @author Manuelt15 |
| 234 | + * @author Sanbec |
| 235 | + * @author Translationista |
| 236 | + */ |
| 237 | +$messages['es'] = array( |
| 238 | + 'getdata' => 'Obtener datos', |
| 239 | + 'externaldata-desc' => 'Permite la recuperación de datos estructurados a partir de direcciones URL externas, bases de datos y otras fuentes', |
| 240 | + 'externaldata-ldap-unable-to-connect' => 'No se pudo conectar con $1', |
| 241 | + 'externaldata-json-decode-not-supported' => 'Error: json_decode() no es compatible con esta versión de PHP', |
| 242 | + 'externaldata-xml-error' => 'Error XML: $1 en línea $2', |
| 243 | + 'externaldata-db-incomplete-information' => 'Error: Información incompleta para este ID de servidor.', |
| 244 | + 'externaldata-db-could-not-get-url' => 'No se pudo obtener la URL después de $1 {{PLURAL:$1|intento|intentos}}.', |
| 245 | + 'externaldata-db-unknown-type' => 'Error: Tipo de base de datos desconocido.', |
| 246 | + 'externaldata-db-could-not-connect' => 'Error: No se pudo lograr conexión con la base de datos.', |
| 247 | + 'externaldata-db-no-return-values' => 'Error: No se ha especificado valores de retorno.', |
| 248 | + 'externaldata-db-invalid-query' => 'Consulta inválida.', |
| 249 | +); |
| 250 | + |
| 251 | +/** Basque (Euskara) |
| 252 | + * @author Kobazulo |
| 253 | + */ |
| 254 | +$messages['eu'] = array( |
| 255 | + 'getdata' => 'Datuak eskuratu', |
| 256 | +); |
| 257 | + |
| 258 | +/** Finnish (Suomi) |
| 259 | + * @author Centerlink |
| 260 | + * @author Crt |
| 261 | + * @author Silvonen |
| 262 | + * @author Str4nd |
| 263 | + */ |
| 264 | +$messages['fi'] = array( |
| 265 | + 'getdata' => 'Hae data', |
| 266 | + 'externaldata-desc' => 'Mahdollistaa muotoillun datan noutamisen ulkoisista verkko-osoitteista, tietokannoista ja muista lähteistä.', |
| 267 | + 'externaldata-ldap-unable-to-connect' => 'Ei voitu yhdistää palvelimelle $1', |
| 268 | + 'externaldata-json-decode-not-supported' => 'Virhe: json_decode() ei ole tuettu tässä PHP:n versiossa', |
| 269 | + 'externaldata-xml-error' => 'XML-virhe: $1 rivillä $2', |
| 270 | + 'externaldata-db-incomplete-information' => 'Virhe: Vaillinaiset tiedot tälle palvelintunnukselle.', |
| 271 | + 'externaldata-db-could-not-get-url' => 'Ei voitu hakea verkko-osoitetta $1 {{PLURAL:$1|yrityksen|yrityksen}} jälkeen.', |
| 272 | + 'externaldata-db-unknown-type' => 'Virhe: Tuntematon tietokantatyyppi.', |
| 273 | + 'externaldata-db-could-not-connect' => 'Virhe: Ei yhteyttä tietokantaan.', |
| 274 | + 'externaldata-db-no-return-values' => 'Virhe: Paluuarvoja ei ole annettu.', |
| 275 | + 'externaldata-db-invalid-query' => 'Virheellinen kysely.', |
| 276 | +); |
| 277 | + |
| 278 | +/** French (Français) |
| 279 | + * @author Crochet.david |
| 280 | + * @author IAlex |
| 281 | + * @author McDutchie |
| 282 | + * @author PieRRoMaN |
| 283 | + */ |
| 284 | +$messages['fr'] = array( |
| 285 | + 'getdata' => 'Obtenir des données', |
| 286 | + 'externaldata-desc' => "Permet de récupérer des données structurées à partir d'URL externes, de bases de données et d'autres sources", |
| 287 | + 'externaldata-ldap-unable-to-connect' => 'Impossible de se connecter à $1', |
| 288 | + 'externaldata-json-decode-not-supported' => "Erreur : json_decode() n'est pas supportée dans cette version de PHP", |
| 289 | + 'externaldata-xml-error' => 'Erreur XML : $1 à la ligne $2', |
| 290 | + 'externaldata-db-incomplete-information' => 'Erreur : Informations incomplètes pour cet identifiant de serveur.', |
| 291 | + 'externaldata-db-could-not-get-url' => "Impossible d'obtenir l'URL après $1 essai{{PLURAL:$1|s|s}}.", |
| 292 | + 'externaldata-db-unknown-type' => 'ERREUR: Type de base de données inconnu.', |
| 293 | + 'externaldata-db-could-not-connect' => 'Erreur : Impossible de se connecter à la base de données.', |
| 294 | + 'externaldata-db-no-return-values' => "Erreur : Aucune valeur de retour n'a été spécifiée.", |
| 295 | + 'externaldata-db-invalid-query' => 'Requête invalide.', |
| 296 | +); |
| 297 | + |
| 298 | +/** Galician (Galego) |
| 299 | + * @author Toliño |
| 300 | + */ |
| 301 | +$messages['gl'] = array( |
| 302 | + 'getdata' => 'Obter os datos', |
| 303 | + 'externaldata-desc' => 'Permite a recuperación de datos estruturados a partir de enderezos URL externos, bases de datos e outras fontes', |
| 304 | + 'externaldata-ldap-unable-to-connect' => 'Non se pode conectar a $1', |
| 305 | + 'externaldata-json-decode-not-supported' => 'Erro: json_decode() non está soportado nesta versión de PHP', |
| 306 | + 'externaldata-xml-error' => 'Erro XML: $1 na liña $2', |
| 307 | + 'externaldata-db-incomplete-information' => 'Erro: información incompleta para este ID de servidor.', |
| 308 | + 'externaldata-db-could-not-get-url' => 'Non se puido obter o enderezo URL despois de $1 {{PLURAL:$1|intento|intentos}}.', |
| 309 | + 'externaldata-db-unknown-type' => 'Erro: tipo de base de datos descoñecido.', |
| 310 | + 'externaldata-db-could-not-connect' => 'Erro: non se puido conectar á base de datos.', |
| 311 | + 'externaldata-db-no-return-values' => 'Erro: non se especificou ningún valor de retorno.', |
| 312 | + 'externaldata-db-invalid-query' => 'Consulta non válida.', |
| 313 | +); |
| 314 | + |
| 315 | +/** Swiss German (Alemannisch) |
| 316 | + * @author Als-Holder |
| 317 | + */ |
| 318 | +$messages['gsw'] = array( |
| 319 | + 'getdata' => 'Date hole', |
| 320 | + 'externaldata-desc' => 'Erlaubt strukturierti Daten abzruefe vu extärne URL un andre Quälle', |
| 321 | + 'externaldata-ldap-unable-to-connect' => 'Cha kei Verbindig härstellen zue $1', |
| 322 | + 'externaldata-json-decode-not-supported' => 'Fähler: json_decode() wird nit unterstitzt in däre Version vu PHP', |
| 323 | + 'externaldata-xml-error' => 'XML-Fähler: $1 in dr Zyyle $2', |
| 324 | + 'externaldata-db-incomplete-information' => 'Fähler: Nit vollständigi Information fir die Server-ID.', |
| 325 | + 'externaldata-db-could-not-get-url' => 'Cha d URL nit finde no $1 {{PLURAL:$1|Versuech|Versuech}}.', |
| 326 | + 'externaldata-db-unknown-type' => 'Fähler: Nit bekannte Datebanktyp.', |
| 327 | + 'externaldata-db-could-not-connect' => 'Fähler: Cha kei Verbindig härstelle zue dr Datebank.', |
| 328 | + 'externaldata-db-no-return-values' => 'Fähler: Kei Ruckgabewärt spezifiziert.', |
| 329 | + 'externaldata-db-invalid-query' => 'Nit giltigi Umfrog.', |
| 330 | +); |
| 331 | + |
| 332 | +/** Gujarati (ગુજરાતી) |
| 333 | + * @author Ashok modhvadia |
| 334 | + */ |
| 335 | +$messages['gu'] = array( |
| 336 | + 'getdata' => 'માહિતી પ્રાપ્ત કરો', |
| 337 | + 'externaldata-desc' => 'બાહ્ય કડીઓ અને સ્થાનિક વિકિ પાનાઓ પરથી CSV, JSON અને XML શૈલીમાં માહિતીની પુન:પ્રાપ્તિની છુટ', |
| 338 | +); |
| 339 | + |
| 340 | +/** Hebrew (עברית) |
| 341 | + * @author Rotemliss |
| 342 | + * @author YaronSh |
| 343 | + */ |
| 344 | +$messages['he'] = array( |
| 345 | + 'getdata' => 'קבלת נתונים', |
| 346 | + 'externaldata-desc' => 'אפשרות לקבלת נתונים במבנים מכתובות חיצוניות, מסדי נתונים ומקורות אחרים', |
| 347 | + 'externaldata-ldap-unable-to-connect' => 'לא ניתן להתחבר ל־$1', |
| 348 | + 'externaldata-json-decode-not-supported' => 'שגיאה: הפקודה json_decode() אינה נתמכת בגרסה זו של PHP', |
| 349 | + 'externaldata-xml-error' => 'שגיאת XML: $1 בשורה $2', |
| 350 | + 'externaldata-db-incomplete-information' => 'שגיאה: יש רק מידע חלקי על מספר השרת הזה.', |
| 351 | + 'externaldata-db-could-not-get-url' => 'לא ניתן לקבל את כתובת ה־URL לאחר {{PLURAL:$1|נסיון אחד|$1 נסיונות}}.', |
| 352 | + 'externaldata-db-unknown-type' => 'שגיאה: סוג בסיס הנתונים אינו מוכר.', |
| 353 | + 'externaldata-db-could-not-connect' => 'שגיאה: לא ניתן להתחבר אל בסיס הנתונים.', |
| 354 | + 'externaldata-db-no-return-values' => 'שגיאה: לא הוגדרו ערכים להחזרה.', |
| 355 | + 'externaldata-db-invalid-query' => 'שאילתה בלתי תקינה.', |
| 356 | +); |
| 357 | + |
| 358 | +/** Upper Sorbian (Hornjoserbsce) |
| 359 | + * @author Michawiki |
| 360 | + */ |
| 361 | +$messages['hsb'] = array( |
| 362 | + 'getdata' => 'Daty wobstarać', |
| 363 | + 'externaldata-desc' => 'Zmóžnja wotwołowanje strukturowanych datow z eksternych URL, datowych bankow a druhich žórłow', |
| 364 | + 'externaldata-ldap-unable-to-connect' => 'Njemóžno z $1 zwjazać', |
| 365 | + 'externaldata-json-decode-not-supported' => 'Zmylk: json_decode() so w tutej wersiji PHP njepodpěruje', |
| 366 | + 'externaldata-xml-error' => 'Zmylk XML: $1 na lince $2', |
| 367 | + 'externaldata-db-incomplete-information' => "'''Zmylk: Njedospołne informacije za ID tutoho serwera.'''", |
| 368 | + 'externaldata-db-could-not-get-url' => 'Njebě móžno URL po $1 {{PLURAL:$1|pospyće|pospytomaj|pospytach|pospytach}} dóstać.', |
| 369 | + 'externaldata-db-unknown-type' => "'''Zmylk: Njeznaty typ datoweje banki.'''", |
| 370 | + 'externaldata-db-could-not-connect' => "'''Zmylk: Njemóžno z datowej banku zwjazać.'''", |
| 371 | + 'externaldata-db-no-return-values' => "'''Zmylk: Žane hódnoty wróćenja podate.'''", |
| 372 | + 'externaldata-db-invalid-query' => 'Njepłaćiwe naprašowanje.', |
| 373 | +); |
| 374 | + |
| 375 | +/** Hungarian (Magyar) |
| 376 | + * @author Glanthor Reviol |
| 377 | + */ |
| 378 | +$messages['hu'] = array( |
| 379 | + 'getdata' => 'Adatok lekérése', |
| 380 | + 'externaldata-desc' => 'Strukturált adatok lekérése külső URL-ekről, adatbázisokból vagy más forrásokból', |
| 381 | + 'externaldata-ldap-unable-to-connect' => 'Sikertelen csatlakozás a következőhöz: $1', |
| 382 | + 'externaldata-json-decode-not-supported' => 'Hiba: a json_decode() nem támogatott ebben a PHP verzióban', |
| 383 | + 'externaldata-xml-error' => '$1 XML hiba, $2. sor', |
| 384 | + 'externaldata-db-incomplete-information' => 'Hiba: hiányos információ a szerver azonosítóhoz.', |
| 385 | + 'externaldata-db-could-not-get-url' => 'Nem sikerült lekérni az URL-t {{PLURAL:$1|egy|$1}} próbálkozás alatt.', |
| 386 | + 'externaldata-db-unknown-type' => 'Hiba: ismeretlen adatbázis típus.', |
| 387 | + 'externaldata-db-could-not-connect' => 'Hiba: nem sikerült csatlakozni az adatbázishoz.', |
| 388 | + 'externaldata-db-no-return-values' => 'Hiba: nem lettek megadva visszatérési értékek.', |
| 389 | + 'externaldata-db-invalid-query' => 'Érvénytelen lekérdezés.', |
| 390 | +); |
| 391 | + |
| 392 | +/** Interlingua (Interlingua) |
| 393 | + * @author McDutchie |
| 394 | + */ |
| 395 | +$messages['ia'] = array( |
| 396 | + 'getdata' => 'Obtener datos', |
| 397 | + 'externaldata-desc' => 'Permitte recuperar datos structurate ab adresses URL, bases de datos e altere fontes externe', |
| 398 | + 'externaldata-ldap-unable-to-connect' => 'Impossibile connecter se a $1', |
| 399 | + 'externaldata-json-decode-not-supported' => 'Error: json_decode() non es supportate in iste version de PHP', |
| 400 | + 'externaldata-xml-error' => 'Error de XML: $1 al linea $2', |
| 401 | + 'externaldata-db-incomplete-information' => 'Error: Information incomplete pro iste ID de servitor.', |
| 402 | + 'externaldata-db-could-not-get-url' => 'Non poteva obtener le URL post $1 {{PLURAL:$1|tentativa|tentativas}}.', |
| 403 | + 'externaldata-db-unknown-type' => 'Error: Typo de base de datos incognite.', |
| 404 | + 'externaldata-db-could-not-connect' => 'Error: Impossibile connecter se al base de datos.', |
| 405 | + 'externaldata-db-no-return-values' => 'Error: Nulle valor de retorno specificate.', |
| 406 | + 'externaldata-db-invalid-query' => 'Consulta invalide.', |
| 407 | +); |
| 408 | + |
| 409 | +/** Indonesian (Bahasa Indonesia) |
| 410 | + * @author Bennylin |
| 411 | + * @author Iwan Novirion |
| 412 | + */ |
| 413 | +$messages['id'] = array( |
| 414 | + 'getdata' => 'Ambil data', |
| 415 | + 'externaldata-desc' => 'Memungkinkan untuk mengambil data terstruktur dari URL eksternal, database dan sumber lainnya', |
| 416 | + 'externaldata-ldap-unable-to-connect' => 'Tidak dapat terhubung ke $1', |
| 417 | + 'externaldata-json-decode-not-supported' => 'Galat: json_decode() tidak didukung oleh versi PHP ini', |
| 418 | + 'externaldata-xml-error' => 'Galat XML: $1 pada baris $2', |
| 419 | + 'externaldata-db-incomplete-information' => 'Galat: Informasi tak lengkap untuk ID peladen ini.', |
| 420 | + 'externaldata-db-could-not-get-url' => 'Tidak dapat mengambil URL setelah dicoba {{PLURAL:$1||}}$1 kali.', |
| 421 | + 'externaldata-db-unknown-type' => 'Galat: Jenis basis data tidak diketahui.', |
| 422 | + 'externaldata-db-could-not-connect' => 'Galat: Tidak dapat terhubung ke basis data.', |
| 423 | + 'externaldata-db-no-return-values' => 'Galat: Nilai pengembalian tidak dispesifikasi.', |
| 424 | + 'externaldata-db-invalid-query' => 'Kueri tidak sah.', |
| 425 | +); |
| 426 | + |
| 427 | +/** Italian (Italiano) |
| 428 | + * @author Beta16 |
| 429 | + * @author Pietrodn |
| 430 | + */ |
| 431 | +$messages['it'] = array( |
| 432 | + 'getdata' => 'Ottieni dati', |
| 433 | + 'externaldata-desc' => 'Consente di recuperare dati strutturati da URL esterni, database o altre sorgenti', |
| 434 | + 'externaldata-ldap-unable-to-connect' => 'Impossibile connettersi a $1', |
| 435 | + 'externaldata-json-decode-not-supported' => 'Errore: json_decode() non è supportato in questa versione di PHP', |
| 436 | + 'externaldata-xml-error' => 'Errore XML: $1 alla linea $2', |
| 437 | + 'externaldata-db-incomplete-information' => 'Errore: informazioni incomplete per questo server ID.', |
| 438 | + 'externaldata-db-could-not-get-url' => "Impossibile raggiungere l'URL dopo $1 {{PLURAL:$1|tentativo|tentativi}}.", |
| 439 | + 'externaldata-db-unknown-type' => 'Errore: tipo di database sconosciuto.', |
| 440 | + 'externaldata-db-could-not-connect' => 'Errore: impossibile connettersi al database.', |
| 441 | + 'externaldata-db-no-return-values' => 'Errore: non è stato specificato alcun valore di ritorno.', |
| 442 | + 'externaldata-db-invalid-query' => 'Query non valida.', |
| 443 | +); |
| 444 | + |
| 445 | +/** Japanese (日本語) |
| 446 | + * @author Fryed-peach |
| 447 | + * @author 青子守歌 |
| 448 | + */ |
| 449 | +$messages['ja'] = array( |
| 450 | + 'getdata' => 'データ取得', |
| 451 | + 'externaldata-desc' => '外部URLやデータベース、その他のソースからデータを取得できるようにする', |
| 452 | + 'externaldata-ldap-unable-to-connect' => '$1 に接続できません', |
| 453 | + 'externaldata-json-decode-not-supported' => 'エラー: json_decode() はこのバージョンの PHP ではサポートされていません', |
| 454 | + 'externaldata-xml-error' => 'XMLエラー: 行$2で$1', |
| 455 | + 'externaldata-db-incomplete-information' => 'エラー: このサーバーIDに対する情報が不十分です。', |
| 456 | + 'externaldata-db-could-not-get-url' => '$1回の試行を行いましたが URL を取得できませんでした。', |
| 457 | + 'externaldata-db-unknown-type' => 'エラー: データベースの種類が不明です。', |
| 458 | + 'externaldata-db-could-not-connect' => 'エラー: データベースに接続できませんでした。', |
| 459 | + 'externaldata-db-no-return-values' => 'エラー: 戻り値が指定されていません。', |
| 460 | + 'externaldata-db-invalid-query' => '不正なクエリー', |
| 461 | +); |
| 462 | + |
| 463 | +/** Khmer (ភាសាខ្មែរ) |
| 464 | + * @author វ័ណថារិទ្ធ |
| 465 | + */ |
| 466 | +$messages['km'] = array( |
| 467 | + 'getdata' => 'យកទិន្នន័យ', |
| 468 | +); |
| 469 | + |
| 470 | +/** Colognian (Ripoarisch) |
| 471 | + * @author Purodha |
| 472 | + */ |
| 473 | +$messages['ksh'] = array( |
| 474 | + 'getdata' => 'Date holle!', |
| 475 | + 'externaldata-desc' => 'Määt et müjjelich, Date en beshtemmpte Fomaate fun främbde <i lang="en">URLs</i>, Daatebangke, un ander Quälle ze holle.', |
| 476 | + 'externaldata-ldap-unable-to-connect' => 'Kann nit noh $1 verbenge', |
| 477 | + 'externaldata-json-decode-not-supported' => '<span style="text-transform: uppercase">Fähler:</span> De Fungxuhn <code lang="en">json_decode()</code> weedt vun heh dä Version vun <i lang="en">PHP</i> nit ongerschtöz.', |
| 478 | + 'externaldata-xml-error' => 'Fähler em XML, op Reih $2: $1', |
| 479 | + 'externaldata-db-incomplete-information' => '<span style="text-transform: uppercase">Fähler:</span> De Enfomazjuhne vör di ẞööver-Kännong sin nit kumplätt.', |
| 480 | + 'externaldata-db-could-not-get-url' => 'Kunnt {{PLURAL:$1|noh eimohl Versöhke|och noh $1 Mohl Versöhke|ohne enne Versöhk}} nix vun däm <i lang="en">URL</i> krijje.', |
| 481 | + 'externaldata-db-unknown-type' => '<span style="text-transform: uppercase">Fähler:</span> Di Zoot Datebangk es unbikannt.', |
| 482 | + 'externaldata-db-could-not-connect' => '<span style="text-transform: uppercase">Fähler:</span> Kunnt kein Verbendung noh dä Datebangk krijje.', |
| 483 | + 'externaldata-db-no-return-values' => '<span style="text-transform: uppercase">Fähler:</span> Kein Wääte för Zerökzeävve aanjejovve.', |
| 484 | + 'externaldata-db-invalid-query' => 'Onjöltesch Frooch aan de Datebangk.', |
| 485 | +); |
| 486 | + |
| 487 | +/** Luxembourgish (Lëtzebuergesch) |
| 488 | + * @author Robby |
| 489 | + */ |
| 490 | +$messages['lb'] = array( |
| 491 | + 'getdata' => 'Donnéeë kréien', |
| 492 | + 'externaldata-desc' => 'Erlaabt et Donnéeën vun externen URLen, Datebanken an anere Quellen ze verschaffen', |
| 493 | + 'externaldata-ldap-unable-to-connect' => 'Onméiglech sech op $1 ze connectéieren', |
| 494 | + 'externaldata-json-decode-not-supported' => 'Feeler: json_decode() gëtt an dëser Versioun vu PHP net ënnerstëtzt', |
| 495 | + 'externaldata-xml-error' => 'XML Feeler: $1 an der Linn $2', |
| 496 | + 'externaldata-db-incomplete-information' => 'Feeler: Informatioun fir dës Server ID net komplett.', |
| 497 | + 'externaldata-db-could-not-get-url' => "D'URL konnt no {{PLURAL:$1|enger Kéier|$1 Versich}} net opgemaach ginn.", |
| 498 | + 'externaldata-db-unknown-type' => 'Feeler: Onbekannten Datebank-Typ.', |
| 499 | + 'externaldata-db-could-not-connect' => "Feeler: D'Verbindung mat der Datebank konnt net opgebaut ginn.", |
| 500 | + 'externaldata-db-no-return-values' => 'Feeler: Kee Retour-Wäert festgeluecht.', |
| 501 | + 'externaldata-db-invalid-query' => 'Net valabel Ufro.', |
| 502 | +); |
| 503 | + |
| 504 | +/** Macedonian (Македонски) |
| 505 | + * @author Bjankuloski06 |
| 506 | + */ |
| 507 | +$messages['mk'] = array( |
| 508 | + 'getdata' => 'Земи податоци', |
| 509 | + 'externaldata-desc' => 'Овозможува добивање структурирани податоци од надворешни URL-адреси, бази на податоци и други извори', |
| 510 | + 'externaldata-ldap-unable-to-connect' => 'Не можам да се поврзам со $1', |
| 511 | + 'externaldata-json-decode-not-supported' => 'Грешка: json_decode() не е поддржан во оваа верзија на PHP', |
| 512 | + 'externaldata-xml-error' => 'XML грешка: $1 во ред $2', |
| 513 | + 'externaldata-db-incomplete-information' => 'Грешка: Нецелосни информации за овој опслужувачки ид. бр.', |
| 514 | + 'externaldata-db-could-not-get-url' => 'Не можев да ја добијам URL адресата по $1 {{PLURAL:$1|обид|обиди}}.', |
| 515 | + 'externaldata-db-unknown-type' => 'Грешка: Непознат тип на база на податоци.', |
| 516 | + 'externaldata-db-could-not-connect' => 'Грешка: Не можев да се поврзам со базата на податоци.', |
| 517 | + 'externaldata-db-no-return-values' => 'Грешка: Нема назначено повратни вредности.', |
| 518 | + 'externaldata-db-invalid-query' => 'Грешно барање.', |
| 519 | +); |
| 520 | + |
| 521 | +/** Erzya (Эрзянь) |
| 522 | + * @author Botuzhaleny-sodamo |
| 523 | + */ |
| 524 | +$messages['myv'] = array( |
| 525 | + 'getdata' => 'Дата мельга', |
| 526 | +); |
| 527 | + |
| 528 | +/** Dutch (Nederlands) |
| 529 | + * @author Siebrand |
| 530 | + */ |
| 531 | +$messages['nl'] = array( |
| 532 | + 'getdata' => 'Gegevens ophalen', |
| 533 | + 'externaldata-desc' => "Maakt het mogelijk gegevens van externe URL's, database en andere externe bronnen op te halen", |
| 534 | + 'externaldata-ldap-unable-to-connect' => 'Het was niet mogelijk te verbinden met $1', |
| 535 | + 'externaldata-json-decode-not-supported' => 'Fout: json_decode() wordt niet ondersteund in deze versie van PHP', |
| 536 | + 'externaldata-xml-error' => 'XML-fout: $1 op regel $2', |
| 537 | + 'externaldata-db-incomplete-information' => 'Fout: Onvolledige informatie voor dit servernummer.', |
| 538 | + 'externaldata-db-could-not-get-url' => 'Na $1 {{PLURAL:$1|poging|pogingen}} gaf de URL geen resultaat.', |
| 539 | + 'externaldata-db-unknown-type' => 'Fout: onbekend databasetype.', |
| 540 | + 'externaldata-db-could-not-connect' => 'Fout: het was niet mogelijk met de database te verbinden.', |
| 541 | + 'externaldata-db-no-return-values' => 'Fout: er zijn geen return-waarden ingesteld.', |
| 542 | + 'externaldata-db-invalid-query' => 'Ongeldige zoekopdracht.', |
| 543 | +); |
| 544 | + |
| 545 | +/** Norwegian Nynorsk (Norsk (nynorsk)) |
| 546 | + * @author Gunnernett |
| 547 | + * @author Harald Khan |
| 548 | + */ |
| 549 | +$messages['nn'] = array( |
| 550 | + 'getdata' => 'Hent data', |
| 551 | + 'externaldata-desc' => 'Gjev høve til å henta strukturerte data frå eksterne URL-ar, databasar og andre kjelder', |
| 552 | + 'externaldata-ldap-unable-to-connect' => 'Kunne ikkje kopla til $1', |
| 553 | + 'externaldata-json-decode-not-supported' => 'Feil: json_decode() er ikkje stødd i denne versjonen av PHP', |
| 554 | + 'externaldata-xml-error' => 'XML-feil: $1 på line $2', |
| 555 | + 'externaldata-db-incomplete-information' => 'Feil: Ufullstendig informasjon for denne tenar-ID-en.', |
| 556 | + 'externaldata-db-could-not-get-url' => 'Kunne ikkje henta URL etter {{PLURAL:$1|eitt forsøk|$1 forsøk}}.', |
| 557 | + 'externaldata-db-unknown-type' => 'Feil: Ukjend databasetype.', |
| 558 | + 'externaldata-db-could-not-connect' => 'Feil: Kunne ikkje kopla til databasen.', |
| 559 | + 'externaldata-db-no-return-values' => 'Feil: Ingen returverdiar oppgjevne.', |
| 560 | + 'externaldata-db-invalid-query' => 'Ugyldig spørjing.', |
| 561 | +); |
| 562 | + |
| 563 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 564 | + * @author Harald Khan |
| 565 | + * @author Nghtwlkr |
| 566 | + */ |
| 567 | +$messages['no'] = array( |
| 568 | + 'getdata' => 'Hent data', |
| 569 | + 'externaldata-desc' => 'Gir mulighet til å hente strukturerte data fra eksterne internettadresser, databaser og andre kilder', |
| 570 | + 'externaldata-ldap-unable-to-connect' => 'Klarte ikke å koble til $1', |
| 571 | + 'externaldata-json-decode-not-supported' => 'Feil: json_decode() er ikke støttet i denne versjonen av PHP', |
| 572 | + 'externaldata-xml-error' => 'XML-feil: $1 på linje $2', |
| 573 | + 'externaldata-db-incomplete-information' => 'Feil: Ufullstendig informasjon for denne tjener-IDen.', |
| 574 | + 'externaldata-db-could-not-get-url' => 'Kunne ikke hente URL etter {{PLURAL:$1|ett forsøk|$1 forsøk}}.', |
| 575 | + 'externaldata-db-unknown-type' => 'Feil: Ukjent databasetype.', |
| 576 | + 'externaldata-db-could-not-connect' => 'Feil: Kunne ikke koble til database.', |
| 577 | + 'externaldata-db-no-return-values' => 'Feil: Ingen returverdi spesifisert.', |
| 578 | + 'externaldata-db-invalid-query' => 'Ugyldig spørring.', |
| 579 | +); |
| 580 | + |
| 581 | +/** Occitan (Occitan) |
| 582 | + * @author Cedric31 |
| 583 | + */ |
| 584 | +$messages['oc'] = array( |
| 585 | + 'getdata' => 'Obténer de donadas', |
| 586 | + 'externaldata-desc' => "Permet de recuperar de donadas estructuradas a partir d'URL extèrnas, de bancas de donadas e d'autras fonts", |
| 587 | + 'externaldata-ldap-unable-to-connect' => 'Impossible de se connectar a $1', |
| 588 | + 'externaldata-json-decode-not-supported' => 'Error : json_decode() es pas suportada dins aquesta version de PHP', |
| 589 | + 'externaldata-xml-error' => 'Error XML : $1 a la linha $2', |
| 590 | + 'externaldata-db-incomplete-information' => 'Error : Informacions incompletas per aqueste identificant de servidor.', |
| 591 | + 'externaldata-db-could-not-get-url' => "Impossible d'obténer l'URL aprèp $1 {{PLURAL:$1|ensag|ensages}}.", |
| 592 | + 'externaldata-db-unknown-type' => 'ERROR: Tipe de banca de donadas desconegut.', |
| 593 | + 'externaldata-db-could-not-connect' => 'Error : Impossible de se connectar a la banca de donadas.', |
| 594 | + 'externaldata-db-no-return-values' => 'Error : Cap de valor de retorn es pas estada especificada.', |
| 595 | + 'externaldata-db-invalid-query' => 'Requèsta invalida.', |
| 596 | +); |
| 597 | + |
| 598 | +/** Polish (Polski) |
| 599 | + * @author Leinad |
| 600 | + * @author Sp5uhe |
| 601 | + */ |
| 602 | +$messages['pl'] = array( |
| 603 | + 'getdata' => 'Pobierz dane', |
| 604 | + 'externaldata-desc' => 'Umożliwia pobieranie strukturalnych danych z zewnętrznych adresów URL, baz danych i innych źródeł', |
| 605 | + 'externaldata-ldap-unable-to-connect' => 'Nie można połączyć się z $1', |
| 606 | + 'externaldata-json-decode-not-supported' => 'Błąd – json_decode() nie jest obsługiwana w tej wersji PHP', |
| 607 | + 'externaldata-xml-error' => 'Błąd XML – $1 w wierszu $2', |
| 608 | + 'externaldata-db-incomplete-information' => 'Błąd – niepełne informacje o tym identyfikatorze serwera.', |
| 609 | + 'externaldata-db-could-not-get-url' => 'Nie można uzyskać adresu URL po $1 {{PLURAL:$1|próbie|próbach}}.', |
| 610 | + 'externaldata-db-unknown-type' => 'Błąd: Nieznany typ bazy danych.', |
| 611 | + 'externaldata-db-could-not-connect' => 'Błąd: Nie można połączyć się z bazą danych.', |
| 612 | + 'externaldata-db-no-return-values' => 'Błąd – nie określono zwracanej wartości.', |
| 613 | + 'externaldata-db-invalid-query' => 'Nieprawidłowe zapytanie.', |
| 614 | +); |
| 615 | + |
| 616 | +/** Piedmontese (Piemontèis) |
| 617 | + * @author Borichèt |
| 618 | + * @author Dragonòt |
| 619 | + */ |
| 620 | +$messages['pms'] = array( |
| 621 | + 'getdata' => 'Oten dij dat', |
| 622 | + 'externaldata-desc' => "A përmët d'arcuperé dat struturà da adrësse dl'aragnà esterne, base ëd dàit e d'àutre sorgiss", |
| 623 | + 'externaldata-ldap-unable-to-connect' => 'A peul pa coleghesse a $1', |
| 624 | + 'externaldata-json-decode-not-supported' => "Eror: json_decode() a l'é pa suportà an sta vërsion ëd PHP", |
| 625 | + 'externaldata-xml-error' => 'Eror XML: $1 a la linia $2', |
| 626 | + 'externaldata-db-incomplete-information' => 'Eror: Anformassion pa completa për sto server ID-sì.', |
| 627 | + 'externaldata-db-could-not-get-url' => "A peul pa oten-e l'URL d'apress ëd $1 {{PLURAL:$1|preuva|preuve}}.", |
| 628 | + 'externaldata-db-unknown-type' => 'Eror: Sòrt ëd database pa conossùa', |
| 629 | + 'externaldata-db-could-not-connect' => 'Eror: a peul pa coleghesse al database.', |
| 630 | + 'externaldata-db-no-return-values' => "Eror: Pa gnun valor d'artorn spessifià.", |
| 631 | + 'externaldata-db-invalid-query' => 'Ciamà pa bon-a.', |
| 632 | +); |
| 633 | + |
| 634 | +/** Portuguese (Português) |
| 635 | + * @author Giro720 |
| 636 | + * @author Hamilton Abreu |
| 637 | + * @author Waldir |
| 638 | + */ |
| 639 | +$messages['pt'] = array( |
| 640 | + 'getdata' => 'Obter dados', |
| 641 | + 'externaldata-desc' => 'Permite a importação de dados estruturados a partir de URLs, bases de dados e outras fontes externas', |
| 642 | + 'externaldata-ldap-unable-to-connect' => 'Não foi possível estabelecer ligação a $1', |
| 643 | + 'externaldata-json-decode-not-supported' => 'Erro: json_decode() não é suportado nesta versão do PHP', |
| 644 | + 'externaldata-xml-error' => 'Erro XML: $1 na linha $2', |
| 645 | + 'externaldata-db-incomplete-information' => 'Erro: Informação incompleta para o ID deste servidor.', |
| 646 | + 'externaldata-db-could-not-get-url' => 'Não foi possível importar a URL após {{PLURAL:$1|uma tentativa|$1 tentativas}}.', |
| 647 | + 'externaldata-db-unknown-type' => 'Erro: Tipo de base de dados desconhecido.', |
| 648 | + 'externaldata-db-could-not-connect' => 'Erro: Não foi possível estabelecer ligação à base de dados.', |
| 649 | + 'externaldata-db-no-return-values' => 'Erro: Nenhum valor de retorno especificado.', |
| 650 | + 'externaldata-db-invalid-query' => "''Query'' inválida.", |
| 651 | +); |
| 652 | + |
| 653 | +/** Brazilian Portuguese (Português do Brasil) |
| 654 | + * @author Eduardo.mps |
| 655 | + * @author Giro720 |
| 656 | + */ |
| 657 | +$messages['pt-br'] = array( |
| 658 | + 'getdata' => 'Obter dados', |
| 659 | + 'externaldata-desc' => 'Permite a obtenção de dados em CSV, JSON e XML a partir de URLs externos, banco de dados e outras fontes', |
| 660 | + 'externaldata-ldap-unable-to-connect' => 'Não foi possível conectar-se a $1', |
| 661 | + 'externaldata-json-decode-not-supported' => 'Erro: json_decode() não é suportado nesta versão do PHP', |
| 662 | + 'externaldata-xml-error' => 'Erro no XML: $1 na linha $2', |
| 663 | + 'externaldata-db-incomplete-information' => 'Erro: Informação incompleta para o ID deste servidor</P>', |
| 664 | + 'externaldata-db-could-not-get-url' => 'Não foi possível obter o URL após $1 {{PLURAL:$1|tentativa|tentativas}}.', |
| 665 | + 'externaldata-db-unknown-type' => 'Erro: Tipo de base de dados desconhecido.', |
| 666 | + 'externaldata-db-could-not-connect' => 'Erro: Não foi possível conectar-se a base de dados.', |
| 667 | + 'externaldata-db-no-return-values' => 'Erro: Nenhum valor de retorno especificado.', |
| 668 | + 'externaldata-db-invalid-query' => 'Consulta inválida.', |
| 669 | +); |
| 670 | + |
| 671 | +/** Romanian (Română) |
| 672 | + * @author Firilacroco |
| 673 | + * @author KlaudiuMihaila |
| 674 | + * @author Stelistcristi |
| 675 | + */ |
| 676 | +$messages['ro'] = array( |
| 677 | + 'getdata' => 'Obține date', |
| 678 | + 'externaldata-desc' => 'Permite obținerea datelor în format CSV, JSON și XML din atât adrese URL externe, cât și pagini wiki locale', |
| 679 | + 'externaldata-ldap-unable-to-connect' => 'Nu se poate conecta la $1', |
| 680 | + 'externaldata-xml-error' => 'Eroare XML: $1 la linia $2', |
| 681 | + 'externaldata-db-unknown-type' => 'Eroare: Tipul bazei de date necunoscut.', |
| 682 | + 'externaldata-db-could-not-connect' => 'Eroare: Nu s-a putut conecta la baza de date.', |
| 683 | + 'externaldata-db-invalid-query' => 'Interogare invalidă.', |
| 684 | +); |
| 685 | + |
| 686 | +/** Tarandíne (Tarandíne) |
| 687 | + * @author Joetaras |
| 688 | + */ |
| 689 | +$messages['roa-tara'] = array( |
| 690 | + 'getdata' => 'Pigghie le date', |
| 691 | + 'externaldata-desc' => 'Permette de repigghià data strutturate da URL fore a Uicchipèdie, database e otre sorgende', |
| 692 | +); |
| 693 | + |
| 694 | +/** Russian (Русский) |
| 695 | + * @author Ferrer |
| 696 | + * @author Александр Сигачёв |
| 697 | + */ |
| 698 | +$messages['ru'] = array( |
| 699 | + 'getdata' => 'Получить данные', |
| 700 | + 'externaldata-desc' => 'Позволяет получать структурированные данные с внешних адресов, баз данных и других источников', |
| 701 | + 'externaldata-ldap-unable-to-connect' => 'Не удаётся подключиться к $1', |
| 702 | + 'externaldata-json-decode-not-supported' => 'Ошибка. json_decode() не поддерживается в данной версии PHP', |
| 703 | + 'externaldata-xml-error' => 'Ошибка XML. $1 в строке $2', |
| 704 | + 'externaldata-db-incomplete-information' => 'ОШИБКА. Неполная информация для этого ID сервера.', |
| 705 | + 'externaldata-db-could-not-get-url' => 'Не удалось получить URL после $1 {{PLURAL:$1|попытки|попыток|попыток}}.', |
| 706 | + 'externaldata-db-unknown-type' => 'ОШИБКА. Неизвестный тип базы данных.', |
| 707 | + 'externaldata-db-could-not-connect' => 'ОШИБКА. Не удаётся подключиться к базе данных.', |
| 708 | + 'externaldata-db-no-return-values' => 'ОШИБКА. Не указаны возвращаемые значение.', |
| 709 | + 'externaldata-db-invalid-query' => 'Ошибочный запрос.', |
| 710 | +); |
| 711 | + |
| 712 | +/** Slovak (Slovenčina) |
| 713 | + * @author Helix84 |
| 714 | + */ |
| 715 | +$messages['sk'] = array( |
| 716 | + 'getdata' => 'Získať dáta', |
| 717 | + 'externaldata-desc' => 'Umožňuje získavanie štrukturovaných údajov z externých URL, databáz a iných zdrojov', |
| 718 | + 'externaldata-ldap-unable-to-connect' => 'Nepodarilo sa pripojiť k $1', |
| 719 | + 'externaldata-json-decode-not-supported' => 'Chyba: táto verzia PHP nepodporuje json_decode()', |
| 720 | + 'externaldata-xml-error' => 'Chyba XML: $1 na riadku $2', |
| 721 | + 'externaldata-db-incomplete-information' => 'Chyba: Nekompletné informácie s týmto ID servera.', |
| 722 | + 'externaldata-db-could-not-get-url' => 'Nepodarilo sa získať URL po $1 {{PLURAL:$1|pokuse|pokusoch}}.', |
| 723 | + 'externaldata-db-unknown-type' => 'Chyba: Neznámy typ databázy.', |
| 724 | + 'externaldata-db-could-not-connect' => 'Chyba: Nepodarilo sa pripojiť k databáze.', |
| 725 | + 'externaldata-db-no-return-values' => 'Chyba: Neboli zadané žiadne návratové hodnoty.', |
| 726 | + 'externaldata-db-invalid-query' => 'Neplatná požiadavka.', |
| 727 | +); |
| 728 | + |
| 729 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 730 | + * @author Charmed94 |
| 731 | + * @author Михајло Анђелковић |
| 732 | + */ |
| 733 | +$messages['sr-ec'] = array( |
| 734 | + 'getdata' => 'Преузми податке', |
| 735 | + 'externaldata-desc' => 'Омогућава преузимање података из спољашњих адреса, бази података и других извора', |
| 736 | + 'externaldata-ldap-unable-to-connect' => 'Повезивање на $1 није успело', |
| 737 | + 'externaldata-json-decode-not-supported' => 'Грешка: json_decode() није подржан у овом издању PHP-а', |
| 738 | + 'externaldata-xml-error' => 'XML грешка: $1 по линији $2', |
| 739 | + 'externaldata-db-incomplete-information' => 'Грешка: Непотпуни подаци за овај ID сервера.', |
| 740 | + 'externaldata-db-could-not-get-url' => 'Преузимање адресе после $1 {{PLURAL:$1|try|покушаја}} није успело.', |
| 741 | + 'externaldata-db-unknown-type' => 'Грешка: Непозната врста базе података.', |
| 742 | + 'externaldata-db-could-not-connect' => 'Грешка: Повезивање с базом података није успело.', |
| 743 | + 'externaldata-db-no-return-values' => 'Грешка: Повратне вредности нису одређене.', |
| 744 | + 'externaldata-db-invalid-query' => 'Неисправан упит.', |
| 745 | +); |
| 746 | + |
| 747 | +/** Serbian Latin ekavian (Srpski (latinica)) |
| 748 | + * @author Michaello |
| 749 | + */ |
| 750 | +$messages['sr-el'] = array( |
| 751 | + 'getdata' => 'Preuzmi podatke', |
| 752 | + 'externaldata-desc' => 'Omogućava preuzimanje podataka iz spoljašnjih adresa, bazi podataka i drugih izvora', |
| 753 | + 'externaldata-ldap-unable-to-connect' => 'Povezivanje na $1 nije uspelo', |
| 754 | + 'externaldata-json-decode-not-supported' => 'Greška: json_decode() nije podržan u ovom izdanju PHP-a', |
| 755 | + 'externaldata-xml-error' => 'XML greška: $1 po liniji $2', |
| 756 | + 'externaldata-db-incomplete-information' => 'Greška: Nepotpuni podaci za ovaj ID servera.', |
| 757 | + 'externaldata-db-could-not-get-url' => 'Preuzimanje adrese posle $1 {{PLURAL:$1|try|pokušaja}} nije uspelo.', |
| 758 | + 'externaldata-db-unknown-type' => 'Greška: Nepoznata vrsta baze podataka.', |
| 759 | + 'externaldata-db-could-not-connect' => 'Greška: Povezivanje s bazom podataka nije uspelo.', |
| 760 | + 'externaldata-db-no-return-values' => 'Greška: Povratne vrednosti nisu određene.', |
| 761 | + 'externaldata-db-invalid-query' => 'Neispravan upit.', |
| 762 | +); |
| 763 | + |
| 764 | +/** Swedish (Svenska) |
| 765 | + * @author Ainali |
| 766 | + * @author Boivie |
| 767 | + * @author Najami |
| 768 | + * @author Per |
| 769 | + */ |
| 770 | +$messages['sv'] = array( |
| 771 | + 'getdata' => 'Hämta data', |
| 772 | + 'externaldata-desc' => 'Ger möjlighet att hämta strukturerad data från externa URL:er, databaser och andra källor', |
| 773 | + 'externaldata-ldap-unable-to-connect' => 'Kunde inte koppla till $1', |
| 774 | + 'externaldata-json-decode-not-supported' => 'Fel: json_decode() stöds inte i denna version av PHP', |
| 775 | + 'externaldata-xml-error' => 'XML-fel: $1 på rad $2', |
| 776 | + 'externaldata-db-incomplete-information' => 'Fel: Informationen för server-ID inte komplett.', |
| 777 | + 'externaldata-db-could-not-get-url' => 'Kunde inte hämta URL på $1 {{PLURAL:$1|försök|försök}}.', |
| 778 | + 'externaldata-db-unknown-type' => 'Fel: Okänd databastyp.', |
| 779 | + 'externaldata-db-could-not-connect' => 'Fel: Kunde inte koppla till databasen.', |
| 780 | + 'externaldata-db-no-return-values' => 'Fel: Inga returvärden specificerade.', |
| 781 | + 'externaldata-db-invalid-query' => 'Ogiltig fråga.', |
| 782 | +); |
| 783 | + |
| 784 | +/** Telugu (తెలుగు) |
| 785 | + * @author Kiranmayee |
| 786 | + */ |
| 787 | +$messages['te'] = array( |
| 788 | + 'getdata' => 'విషయములు తీసుకునిరా', |
| 789 | +); |
| 790 | + |
| 791 | +/** Tagalog (Tagalog) |
| 792 | + * @author AnakngAraw |
| 793 | + * @author Sky Harbor |
| 794 | + */ |
| 795 | +$messages['tl'] = array( |
| 796 | + 'getdata' => 'Kunin ang dato', |
| 797 | + 'externaldata-desc' => 'Nagpapahintulot sa pagkuha ng nakabalangkas na datos mula sa panlabas na mga URL, mga kalipunan ng datos at sa ibang mga pinagmulan', |
| 798 | + 'externaldata-ldap-unable-to-connect' => 'Hindi makakunekta sa $1', |
| 799 | + 'externaldata-json-decode-not-supported' => 'Kamalian: hindi sinusuporta ang json_decode() sa bersyong ito ng PHP', |
| 800 | + 'externaldata-xml-error' => 'Kamalian sa XML: $1 sa linyang $2', |
| 801 | + 'externaldata-db-incomplete-information' => 'Kamalian: Hindi-kumpletong impormasyon para sa itong ID ng serbidor.', |
| 802 | + 'externaldata-db-could-not-get-url' => 'Hindi makuha ang URL pagkatapos ng $1 {{PLURAL:$1|pagsubok|pagsubok}}', |
| 803 | + 'externaldata-db-unknown-type' => 'Kamalian: Hindi-kilalang uri ng kalipunan ng datos.', |
| 804 | + 'externaldata-db-could-not-connect' => 'Kamalian: Hindi makakunekta sa talaan ng dato.', |
| 805 | + 'externaldata-db-no-return-values' => 'Kamalian: Walang tinukoy na halagang pabalik.', |
| 806 | + 'externaldata-db-invalid-query' => 'Hindi tanggap na katanungan.', |
| 807 | +); |
| 808 | + |
| 809 | +/** Turkish (Türkçe) |
| 810 | + * @author Karduelis |
| 811 | + * @author Vito Genovese |
| 812 | + */ |
| 813 | +$messages['tr'] = array( |
| 814 | + 'getdata' => 'Veri al', |
| 815 | + 'externaldata-db-unknown-type' => 'Hata: Bilinmeyen veritabanı türü.', |
| 816 | + 'externaldata-db-could-not-connect' => 'Hata: Veritabanına bağlanılamıyor.', |
| 817 | + 'externaldata-db-no-return-values' => 'Hata: Dönüş değeri belirtilmedi.', |
| 818 | + 'externaldata-db-invalid-query' => 'Geçersiz sorgu.', |
| 819 | +); |
| 820 | + |
| 821 | +/** Ukrainian (Українська) |
| 822 | + * @author Тест |
| 823 | + */ |
| 824 | +$messages['uk'] = array( |
| 825 | + 'getdata' => 'Отримати дані', |
| 826 | + 'externaldata-ldap-unable-to-connect' => 'Не вдається підключитися до $1', |
| 827 | + 'externaldata-xml-error' => 'Помилка XML: $1 в рядку $2', |
| 828 | + 'externaldata-db-could-not-get-url' => 'Не вдалося отримати URL після $1 {{PLURAL:$1|спроби|спроб}}.', |
| 829 | + 'externaldata-db-unknown-type' => 'Помилка: Невідомий тип бази даних.', |
| 830 | + 'externaldata-db-could-not-connect' => 'Помилка: не вдалося підключитися до бази даних.', |
| 831 | +); |
| 832 | + |
| 833 | +/** Veps (Vepsan kel') |
| 834 | + * @author Игорь Бродский |
| 835 | + */ |
| 836 | +$messages['vep'] = array( |
| 837 | + 'getdata' => 'Sada andmused', |
| 838 | +); |
| 839 | + |
| 840 | +/** Vietnamese (Tiếng Việt) |
| 841 | + * @author Minh Nguyen |
| 842 | + * @author Vinhtantran |
| 843 | + */ |
| 844 | +$messages['vi'] = array( |
| 845 | + 'getdata' => 'Lấy dữ liệu', |
| 846 | + 'externaldata-desc' => 'Cho phép truy xuất dữ liệu từ các địa chỉ URL bên ngoài, cơ sở dữ liệu, và nguồn khác', |
| 847 | + 'externaldata-xml-error' => 'Lỗi XML ở dòng $2: $1', |
| 848 | +); |
| 849 | + |
| 850 | +/** Yiddish (ייִדיש) |
| 851 | + * @author פוילישער |
| 852 | + */ |
| 853 | +$messages['yi'] = array( |
| 854 | + 'getdata' => 'באַקומען דאַטן', |
| 855 | +); |
| 856 | + |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ExternalData.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 857 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ExternalData.php |
— | — | @@ -0,0 +1,77 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Initialization file for the External Data extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup ExternalData |
| 8 | + * @author Yaron Koren |
| 9 | + */ |
| 10 | + |
| 11 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 12 | + |
| 13 | +$wgExtensionCredits['parserhook'][] = array( |
| 14 | + 'path' => __FILE__, |
| 15 | + 'name' => 'External Data', |
| 16 | + 'version' => '1.2.2', |
| 17 | + 'author' => array( 'Yaron Koren', 'Michael Dale', 'David Macdonald' ), |
| 18 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:External_Data', |
| 19 | + 'descriptionmsg' => 'externaldata-desc', |
| 20 | +); |
| 21 | + |
| 22 | +$wgHooks['ParserFirstCallInit'][] = 'edgRegisterParser'; |
| 23 | +$wgExtensionMessagesFiles['ExternalData'] = dirname(__FILE__) . '/ExternalData.i18n.php'; |
| 24 | + |
| 25 | +if ( version_compare( $wgVersion, '1.16alpha', '>=' ) ) { |
| 26 | + $wgExtensionMessagesFiles['ExternalDataMagic'] = dirname(__FILE__) . '/ExternalData.i18n.magic.php'; |
| 27 | +} else { |
| 28 | + // Pre 1.16alpha backward compatibility for magic words |
| 29 | + $wgHooks['LanguageGetMagic'][] = 'edgLanguageGetMagic'; |
| 30 | +} |
| 31 | + |
| 32 | +// register all special pages and other classes |
| 33 | +$wgAutoloadClasses['EDUtils'] = dirname(__FILE__) . '/ED_Utils.php'; |
| 34 | +$wgAutoloadClasses['EDParserFunctions'] = dirname(__FILE__) . '/ED_ParserFunctions.php'; |
| 35 | +$wgSpecialPages['GetData'] = 'EDGetData'; |
| 36 | +$wgAutoloadClasses['EDGetData'] = dirname(__FILE__) . '/ED_GetData.php'; |
| 37 | +$wgSpecialPageGroups['GetData'] = 'pagetools'; |
| 38 | + |
| 39 | +$edgValues = array(); |
| 40 | +$edgStringReplacements = array(); |
| 41 | +$edgCacheTable = null; |
| 42 | +$edgAllowSSL = false; |
| 43 | + |
| 44 | +// (in seconds) set to one week: |
| 45 | +$edgCacheExpireTime = 60 * 60 * 24 * 7; |
| 46 | + |
| 47 | +$edgDBServer = array(); |
| 48 | +$edgDBServerType = array(); |
| 49 | +$edgDBName = array(); |
| 50 | +$edgDBUser = array(); |
| 51 | +$edgDBPass = array(); |
| 52 | + |
| 53 | +function edgRegisterParser( &$parser ) { |
| 54 | + $parser->setFunctionHook( 'get_external_data', array( 'EDParserFunctions', 'doGetExternalData' ) ); |
| 55 | + $parser->setFunctionHook( 'get_web_data', array( 'EDParserFunctions', 'doGetWebData' ) ); |
| 56 | + $parser->setFunctionHook( 'get_ldap_data', array( 'EDParserFunctions', 'doGetLDAPData' ) ); |
| 57 | + $parser->setFunctionHook( 'get_db_data', array( 'EDParserFunctions', 'doGetDBData' ) ); |
| 58 | + $parser->setFunctionHook( 'external_value', array( 'EDParserFunctions', 'doExternalValue' ) ); |
| 59 | + $parser->setFunctionHook( 'for_external_table', array( 'EDParserFunctions', 'doForExternalTable' ) ); |
| 60 | + $parser->setFunctionHook( 'store_external_table', array( 'EDParserFunctions', 'doStoreExternalTable' ) ); |
| 61 | + |
| 62 | + return true; // always return true, in order not to stop MW's hook processing! |
| 63 | +} |
| 64 | + |
| 65 | +// Pre 1.16alpha backward compatibility for magic words |
| 66 | +function edgLanguageGetMagic( &$magicWords, $langCode = "en" ) { |
| 67 | + switch ( $langCode ) { |
| 68 | + default: |
| 69 | + $magicWords['get_external_data'] = array ( 0, 'get_external_data' ); |
| 70 | + $magicWords['get_web_data'] = array ( 0, 'get_web_data' ); |
| 71 | + $magicWords['get_ldap_data'] = array ( 0, 'get_ldap_data' ); |
| 72 | + $magicWords['get_db_data'] = array ( 0, 'get_db_data' ); |
| 73 | + $magicWords['external_value'] = array ( 0, 'external_value' ); |
| 74 | + $magicWords['for_external_table'] = array ( 0, 'for_external_table' ); |
| 75 | + $magicWords['store_external_table'] = array ( 0, 'store_external_table' ); |
| 76 | + } |
| 77 | + return true; |
| 78 | +} |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ExternalData.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 79 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ED_ParserFunctions.php |
— | — | @@ -0,0 +1,362 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Class for handling the parser functions for External Data |
| 5 | + */ |
| 6 | + |
| 7 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 8 | + die( 'This file is a MediaWiki extension; it is not a valid entry point' ); |
| 9 | +} |
| 10 | + |
| 11 | +class EDParserFunctions { |
| 12 | + |
| 13 | + /** |
| 14 | + * Render the #get_external_data parser function |
| 15 | + * @deprecated |
| 16 | + */ |
| 17 | + static function doGetExternalData( &$parser ) { |
| 18 | + global $wgTitle, $edgCurPageName, $edgValues; |
| 19 | + |
| 20 | + // if we're handling multiple pages, reset $edgValues |
| 21 | + // when we move from one page to another |
| 22 | + $cur_page_name = $wgTitle->getText(); |
| 23 | + if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) { |
| 24 | + $edgValues = array(); |
| 25 | + $edgCurPageName = $cur_page_name; |
| 26 | + } |
| 27 | + |
| 28 | + $params = func_get_args(); |
| 29 | + array_shift( $params ); // we already know the $parser ... |
| 30 | + $url = array_shift( $params ); |
| 31 | + $url = str_replace( ' ', '%20', $url ); // do some minor URL-encoding |
| 32 | + // if the URL isn't allowed (based on a whitelist), exit |
| 33 | + if ( ! EDUtils::isURLAllowed( $url ) ) { |
| 34 | + return; |
| 35 | + } |
| 36 | + |
| 37 | + $format = strtolower( array_shift( $params ) ); // make case-insensitive |
| 38 | + $external_values = EDUtils::getDataFromURL( $url, $format ); |
| 39 | + if ( count( $external_values ) == 0 ) { |
| 40 | + return; |
| 41 | + } |
| 42 | + |
| 43 | + // get set of filters and set of mappings, determining each |
| 44 | + // one by whether there's a double or single equals sign, |
| 45 | + // respectively |
| 46 | + $filters = array(); |
| 47 | + $mappings = array(); |
| 48 | + foreach ( $params as $param ) { |
| 49 | + if ( strpos( $param, '==' ) ) { |
| 50 | + list( $external_var, $value ) = explode( '==', $param ); |
| 51 | + // set to all lowercase to avoid casing issues |
| 52 | + $external_var = strtolower( $external_var ); |
| 53 | + $filters[$external_var] = $value; |
| 54 | + } elseif ( strpos( $param, '=' ) ) { |
| 55 | + list( $local_var, $external_var ) = explode( '=', $param ); |
| 56 | + // set to all lowercase to avoid casing issues |
| 57 | + $external_var = strtolower( $external_var ); |
| 58 | + $mappings[$local_var] = $external_var; |
| 59 | + } else { |
| 60 | + // if the parameter contains no equals signs, |
| 61 | + // do nothing |
| 62 | + } |
| 63 | + } |
| 64 | + self::setGlobalValuesArray( $external_values, $filters, $mappings ); |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * A helper function, since it's called by both doGetExternalData() |
| 69 | + * and doGetWebData() - the former is deprecated. |
| 70 | + */ |
| 71 | + static public function setGlobalValuesArray( $external_values, $filters, $mappings ) { |
| 72 | + global $edgValues; |
| 73 | + |
| 74 | + foreach ( $filters as $filter_var => $filter_value ) { |
| 75 | + // find the entry of $external_values that matches |
| 76 | + // the filter variable; if none exists, just ignore |
| 77 | + // the filter |
| 78 | + if ( array_key_exists( $filter_var, $external_values ) ) { |
| 79 | + if ( is_array( $external_values[$filter_var] ) ) { |
| 80 | + $column_values = $external_values[$filter_var]; |
| 81 | + foreach ( $column_values as $i => $single_value ) { |
| 82 | + // if a value doesn't match |
| 83 | + // the filter value, remove |
| 84 | + // the value from this row for |
| 85 | + // all columns |
| 86 | + if ( trim( $single_value ) != trim( $filter_value ) ) { |
| 87 | + foreach ( $external_values as $external_var => $external_value ) { |
| 88 | + unset( $external_values[$external_var][$i] ); |
| 89 | + } |
| 90 | + } |
| 91 | + } |
| 92 | + } else { |
| 93 | + // if we have only one row of values, |
| 94 | + // and the filter doesn't match, just |
| 95 | + // keep the results array blank and |
| 96 | + // return |
| 97 | + if ( $external_values[$filter_var] != $filter_value ) { |
| 98 | + return; |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | + } |
| 103 | + // for each external variable name specified in the function |
| 104 | + // call, get its value or values (if any exist), and attach it |
| 105 | + // or them to the local variable name |
| 106 | + foreach ( $mappings as $local_var => $external_var ) { |
| 107 | + if ( array_key_exists( $external_var, $external_values ) ) { |
| 108 | + if ( is_array( $external_values[$external_var] ) ) |
| 109 | + // array_values() restores regular |
| 110 | + // 1, 2, 3 indexes to array, after unset() |
| 111 | + // in filtering may have removed some |
| 112 | + $edgValues[$local_var] = array_values( $external_values[$external_var] ); |
| 113 | + else |
| 114 | + $edgValues[$local_var][] = $external_values[$external_var]; |
| 115 | + } |
| 116 | + } |
| 117 | + } |
| 118 | + |
| 119 | + /** |
| 120 | + * Render the #get_web_data parser function |
| 121 | + */ |
| 122 | + static function doGetWebData( &$parser ) { |
| 123 | + global $wgTitle, $edgCurPageName, $edgValues; |
| 124 | + |
| 125 | + // if we're handling multiple pages, reset $edgValues |
| 126 | + // when we move from one page to another |
| 127 | + $cur_page_name = $wgTitle->getText(); |
| 128 | + if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) { |
| 129 | + $edgValues = array(); |
| 130 | + $edgCurPageName = $cur_page_name; |
| 131 | + } |
| 132 | + |
| 133 | + $params = func_get_args(); |
| 134 | + array_shift( $params ); // we already know the $parser ... |
| 135 | + $args = EDUtils::parseParams( $params ); // parse params into name-value pairs |
| 136 | + if ( array_key_exists( 'url', $args ) ) { |
| 137 | + $url = $args['url']; |
| 138 | + } else { |
| 139 | + return; |
| 140 | + } |
| 141 | + $url = str_replace( ' ', '%20', $url ); // do some minor URL-encoding |
| 142 | + // if the URL isn't allowed (based on a whitelist), exit |
| 143 | + if ( ! EDUtils::isURLAllowed( $url ) ) { |
| 144 | + return; |
| 145 | + } |
| 146 | + |
| 147 | + if ( array_key_exists( 'format', $args ) ) { |
| 148 | + $format = strtolower( $args['format'] ); |
| 149 | + } else { |
| 150 | + $format = ''; |
| 151 | + } |
| 152 | + $external_values = EDUtils::getDataFromURL( $url, $format ); |
| 153 | + if ( count( $external_values ) == 0 ) { |
| 154 | + return; |
| 155 | + } |
| 156 | + |
| 157 | + if ( array_key_exists( 'data', $args ) ) { |
| 158 | + // parse the 'data' arg into mappings |
| 159 | + $mappings = EDUtils::paramToArray( $args['data'], false, true ); |
| 160 | + } else { |
| 161 | + return; |
| 162 | + } |
| 163 | + if ( array_key_exists( 'filters', $args ) ) { |
| 164 | + // parse the 'filters' arg |
| 165 | + $filters = EDUtils::paramToArray( $args['filters'], true, false ); |
| 166 | + } else { |
| 167 | + $filters = array(); |
| 168 | + } |
| 169 | + |
| 170 | + self::setGlobalValuesArray( $external_values, $filters, $mappings ); |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * Render the #get_ldap_data parser function |
| 175 | + */ |
| 176 | + static function doGetLDAPData( &$parser ) { |
| 177 | + global $wgTitle, $edgCurPageName, $edgValues; |
| 178 | + |
| 179 | + // if we're handling multiple pages, reset $edgValues |
| 180 | + // when we move from one page to another |
| 181 | + $cur_page_name = $wgTitle->getText(); |
| 182 | + if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) { |
| 183 | + $edgValues = array(); |
| 184 | + $edgCurPageName = $cur_page_name; |
| 185 | + } |
| 186 | + |
| 187 | + $params = func_get_args(); |
| 188 | + array_shift( $params ); // we already know the $parser ... |
| 189 | + $args = EDUtils::parseParams( $params ); // parse params into name-value pairs |
| 190 | + $mappings = EDUtils::paramToArray( $args['data'] ); // parse the data arg into mappings |
| 191 | + |
| 192 | + $external_values = EDUtils::getLDAPData( $args['filter'], $args['domain'], array_values( $mappings ) ); |
| 193 | + |
| 194 | + // Build $edgValues |
| 195 | + foreach ( $mappings as $local_var => $external_var ) { |
| 196 | + $edgValues[$local_var][] = $external_values[0][$external_var][0]; |
| 197 | + } |
| 198 | + return; |
| 199 | + } |
| 200 | + |
| 201 | + /** |
| 202 | + * Render the #get_db_data parser function |
| 203 | + */ |
| 204 | + static function doGetDBData( &$parser ) { |
| 205 | + global $wgTitle, $edgCurPageName, $edgValues; |
| 206 | + |
| 207 | + // if we're handling multiple pages, reset $edgValues |
| 208 | + // when we move from one page to another |
| 209 | + $cur_page_name = $wgTitle->getText(); |
| 210 | + if ( ! isset( $edgCurPageName ) || $edgCurPageName != $cur_page_name ) { |
| 211 | + $edgValues = array(); |
| 212 | + $edgCurPageName = $cur_page_name; |
| 213 | + } |
| 214 | + |
| 215 | + $params = func_get_args(); |
| 216 | + array_shift( $params ); // we already know the $parser ... |
| 217 | + $args = EDUtils::parseParams( $params ); // parse params into name-value pairs |
| 218 | + $mappings = EDUtils::paramToArray( $args['data'] ); // parse the data arg into mappings |
| 219 | + |
| 220 | + $external_values = EDUtils::getDBData( $args['server'], $args['from'], $args['where'], array_values( $mappings ) ); |
| 221 | + // handle error cases |
| 222 | + if ( is_null( $external_values ) ) |
| 223 | + return; |
| 224 | + |
| 225 | + // Build $edgValues |
| 226 | + foreach ( $mappings as $local_var => $external_var ) { |
| 227 | + if ( array_key_exists( $external_var, $external_values ) ) { |
| 228 | + foreach ( $external_values[$external_var] as $value ) { |
| 229 | + $edgValues[$local_var][] = $value; |
| 230 | + } |
| 231 | + } |
| 232 | + } |
| 233 | + return; |
| 234 | + } |
| 235 | + |
| 236 | + /** |
| 237 | + * Get the specified index of the array for the specified local |
| 238 | + * variable retrieved by #get_external_data |
| 239 | + */ |
| 240 | + static function getIndexedValue( $var, $i ) { |
| 241 | + global $edgValues; |
| 242 | + if ( array_key_exists( $var, $edgValues ) && count( $edgValues[$var] > $i ) ) |
| 243 | + return $edgValues[$var][$i]; |
| 244 | + else |
| 245 | + return ''; |
| 246 | + } |
| 247 | + |
| 248 | + /** |
| 249 | + * Render the #external_value parser function |
| 250 | + */ |
| 251 | + static function doExternalValue( &$parser, $local_var = '' ) { |
| 252 | + global $edgValues; |
| 253 | + if ( ! array_key_exists( $local_var, $edgValues ) ) |
| 254 | + return ''; |
| 255 | + elseif ( is_array( $edgValues[$local_var] ) ) |
| 256 | + return $edgValues[$local_var][0]; |
| 257 | + else |
| 258 | + return $edgValues[$local_var]; |
| 259 | + } |
| 260 | + |
| 261 | + /** |
| 262 | + * Render the #for_external_table parser function |
| 263 | + */ |
| 264 | + static function doForExternalTable( &$parser, $expression = '' ) { |
| 265 | + global $edgValues; |
| 266 | + |
| 267 | + // get the variables used in this expression, get the number |
| 268 | + // of values for each, and loop through |
| 269 | + $matches = array(); |
| 270 | + preg_match_all( '/{{{([^}]*)}}}/', $expression, $matches ); |
| 271 | + $variables = $matches[1]; |
| 272 | + $num_loops = 0; |
| 273 | + foreach ( $variables as $variable ) { |
| 274 | + // ignore the presence of '.urlencode' - it's a command, |
| 275 | + // not part of the actual variable name |
| 276 | + $variable = str_replace( '.urlencode', '', $variable ); |
| 277 | + if ( array_key_exists( $variable, $edgValues ) ) { |
| 278 | + $num_loops = max( $num_loops, count( $edgValues[$variable] ) ); |
| 279 | + } |
| 280 | + } |
| 281 | + $text = ""; |
| 282 | + for ( $i = 0; $i < $num_loops; $i++ ) { |
| 283 | + $cur_expression = $expression; |
| 284 | + foreach ( $variables as $variable ) { |
| 285 | + // if variable name ends with a ".urlencode", |
| 286 | + // that's a command - URL-encode the value of |
| 287 | + // the actual variable |
| 288 | + $loc_of_urlencode = strrpos( $variable, '.urlencode' ); |
| 289 | + if ( ( $loc_of_urlencode > 0 ) && ( $loc_of_urlencode == strlen( $variable ) - strlen( '.urlencode' ) ) ) { |
| 290 | + $real_var = str_replace( '.urlencode', '', $variable ); |
| 291 | + $value = urlencode( self::getIndexedValue( $real_var , $i ) ); |
| 292 | + } else { |
| 293 | + $value = self::getIndexedValue( $variable , $i ); |
| 294 | + } |
| 295 | + $cur_expression = str_replace( '{{{' . $variable . '}}}', $value, $cur_expression ); |
| 296 | + } |
| 297 | + $text .= $cur_expression; |
| 298 | + } |
| 299 | + return $text; |
| 300 | + } |
| 301 | + |
| 302 | + /** |
| 303 | + * Render the #store_external_table parser function |
| 304 | + */ |
| 305 | + static function doStoreExternalTable( &$parser ) { |
| 306 | + if ( ! class_exists( 'SIOHandler' ) ) { |
| 307 | + return 'Semantic Internal Objects is not installed'; |
| 308 | + } |
| 309 | + global $edgValues; |
| 310 | + |
| 311 | + $params = func_get_args(); |
| 312 | + array_shift( $params ); // we already know the $parser... |
| 313 | + |
| 314 | + // get the variables used in this expression, get the number |
| 315 | + // of values for each, and loop through |
| 316 | + $expression = implode( '|', $params ); |
| 317 | + $matches = array(); |
| 318 | + preg_match_all( '/{{{([^}]*)}}}/', $expression, $matches ); |
| 319 | + $variables = $matches[1]; |
| 320 | + $num_loops = 0; |
| 321 | + foreach ( $variables as $variable ) { |
| 322 | + // ignore the presence of '.urlencode' - it's a command, |
| 323 | + // not part of the actual variable name |
| 324 | + $variable = str_replace( '.urlencode', '', $variable ); |
| 325 | + if ( array_key_exists( $variable, $edgValues ) ) { |
| 326 | + $num_loops = max( $num_loops, count( $edgValues[$variable] ) ); |
| 327 | + } |
| 328 | + } |
| 329 | + $text = ""; |
| 330 | + for ( $i = 0; $i < $num_loops; $i++ ) { |
| 331 | + // re-get $params |
| 332 | + $params = func_get_args(); |
| 333 | + array_shift( $params ); |
| 334 | + foreach ( $params as $j => $param ) { |
| 335 | + foreach ( $variables as $variable ) { |
| 336 | + // if variable name ends with a ".urlencode", |
| 337 | + // that's a command - URL-encode the value of |
| 338 | + // the actual variable |
| 339 | + if ( strrpos( $variable, '.urlencode' ) == strlen( $variable ) - strlen( '.urlencode' ) ) { |
| 340 | + $real_var = str_replace( '.urlencode', '', $variable ); |
| 341 | + $value = urlencode( self::getIndexedValue( $real_var , $i ) ); |
| 342 | + } else { |
| 343 | + $value = self::getIndexedValue( $variable , $i ); |
| 344 | + } |
| 345 | + $params[$j] = str_replace( '{{{' . $variable . '}}}', $value, $params[$j] ); |
| 346 | + } |
| 347 | + } |
| 348 | + // Add $parser to the beginning of the $params array, |
| 349 | + // and pass the whole thing in as arguments to |
| 350 | + // doSetInternal, to mimic a call to #set_internal. |
| 351 | + array_unshift( $params, $parser ); |
| 352 | + // As of PHP 5.3.1, call_user_func_array() requires that |
| 353 | + // the function params be references. Workaround via |
| 354 | + // http://stackoverflow.com/questions/2045875/pass-by-reference-problem-with-php-5-3-1 |
| 355 | + $refParams = array(); |
| 356 | + foreach ( $params as $key => $value ) { |
| 357 | + $refParams[$key] = &$params[$key]; |
| 358 | + } |
| 359 | + call_user_func_array( array( 'SIOHandler', 'doSetInternal' ), $refParams ); |
| 360 | + } |
| 361 | + return null; |
| 362 | + } |
| 363 | +} |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ED_ParserFunctions.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 364 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ED_GetData.php |
— | — | @@ -0,0 +1,71 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * A special page for retrieving selected rows of any wiki page that contains |
| 5 | + * data in CSV format |
| 6 | + */ |
| 7 | + |
| 8 | +if ( !defined( 'MEDIAWIKI' ) ) die(); |
| 9 | + |
| 10 | +class EDGetData extends SpecialPage { |
| 11 | + |
| 12 | + /** |
| 13 | + * Constructor |
| 14 | + */ |
| 15 | + function __construct() { |
| 16 | + parent::__construct( 'GetData' ); |
| 17 | + wfLoadExtensionMessages( 'ExternalData' ); |
| 18 | + } |
| 19 | + |
| 20 | + function execute( $query ) { |
| 21 | + global $wgRequest, $wgOut; |
| 22 | + $wgOut->disable(); |
| 23 | + |
| 24 | + $this->setHeaders(); |
| 25 | + $page_name = $query; |
| 26 | + $title = Title::newFromText( $page_name ); |
| 27 | + if ( is_null( $title ) ) |
| 28 | + return; |
| 29 | + if ( ! $title->userCanRead() ) |
| 30 | + return; |
| 31 | + $article = new Article( $title ); |
| 32 | + $page_text = $article->fetchContent(); |
| 33 | + // Remove <noinclude> sections and <includeonly> tags from text |
| 34 | + $page_text = StringUtils::delimiterReplace( '<noinclude>', '</noinclude>', '', $page_text ); |
| 35 | + $page_text = strtr( $page_text, array( '<includeonly>' => '', '</includeonly>' => '' ) ); |
| 36 | + $orig_lines = explode( "\n", $page_text ); |
| 37 | + // ignore lines that are either blank or start with a semicolon |
| 38 | + $page_lines = array(); |
| 39 | + foreach ( $orig_lines as $i => $line ) |
| 40 | + if ( $line != '' && $line[0] != ';' ) |
| 41 | + $page_lines[] = $line; |
| 42 | + $headers = EDUtils::getValuesFromCSVLine( $page_lines[0] ); |
| 43 | + $queried_headers = array(); |
| 44 | + foreach ( $wgRequest->getValues() as $key => $value ) { |
| 45 | + foreach ( $headers as $header_index => $header_value ) { |
| 46 | + $header_value = str_replace( ' ', '_', $header_value ); |
| 47 | + if ( $key == $header_value ) { |
| 48 | + $queried_headers[$header_index] = $value; |
| 49 | + } |
| 50 | + } |
| 51 | + } |
| 52 | + // include header in output |
| 53 | + $text = $page_lines[0]; |
| 54 | + foreach ( $page_lines as $i => $line ) { |
| 55 | + if ( $i == 0 ) continue; |
| 56 | + $row_values = EDUtils::getValuesFromCSVLine( $line ); |
| 57 | + $found_match = true; |
| 58 | + foreach ( $queried_headers as $i => $query_value ) { |
| 59 | + $single_value = str_replace( ' ', '_', $row_values[$i] ); |
| 60 | + if ( $single_value != $query_value ) { |
| 61 | + $found_match = false; |
| 62 | + } |
| 63 | + } |
| 64 | + if ( $found_match ) { |
| 65 | + if ( $text != '' ) $text .= "\n"; |
| 66 | + $text .= $line; |
| 67 | + } |
| 68 | + } |
| 69 | + print $text; |
| 70 | + } |
| 71 | + |
| 72 | +} |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ED_GetData.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 73 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ExternalData.sql |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +CREATE TABLE IF NOT EXISTS `ed_url_cache` ( |
| 3 | + `id` int(10) unsigned NOT NULL auto_increment, |
| 4 | + `url` varchar(255) NOT NULL, |
| 5 | + `post_vars` text, |
| 6 | + `req_time` int(11) NOT NULL, |
| 7 | + `result` longtext character set utf8 collate utf8_unicode_ci, |
| 8 | + UNIQUE KEY `id` (`id`), |
| 9 | + KEY `url` (`url`) |
| 10 | +) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
\ No newline at end of file |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ExternalData.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/README |
— | — | @@ -0,0 +1,103 @@ |
| 2 | +External Data extension |
| 3 | + |
| 4 | + Version 1.2.2 |
| 5 | + Yaron Koren, Michael Dale and David Macdonald |
| 6 | + |
| 7 | +This is free software licensed under the GNU General Public License. Please |
| 8 | +see http://www.gnu.org/copyleft/gpl.html for further details, including the |
| 9 | +full text and terms of the license. |
| 10 | + |
| 11 | +== Overview == |
| 12 | + |
| 13 | +External Data is an extension to MediaWiki that allows for retrieving data |
| 14 | +from various sources: external URLs and local wiki pages (in CSV, GFF, JSON |
| 15 | +and XML formats), database tables, and LDAP servers. |
| 16 | + |
| 17 | +The extension defines seven parser functions - #get_web_data, |
| 18 | +#get_external_data, #get_db_data, #get_ldap_data, #external_value, |
| 19 | +#for_external_table and #store_external_table. They are described below: |
| 20 | + |
| 21 | +* #get_web_data retrieves the data from a URL that holds CSV, GFF, |
| 22 | +JSON or XML, and assigns it to local variables or arrays. |
| 23 | + |
| 24 | +* #get_external_data is an earlier version of #get_web_data that does |
| 25 | +the same thing; it is currently deprecated. |
| 26 | + |
| 27 | +* #get_db_data retrieves data from a database, using a SQL query, and |
| 28 | +assigns it to local variables or arrays. |
| 29 | + |
| 30 | +* #get_ldap_data retrieves data from an LDAP server and assigns it to |
| 31 | +local variables. |
| 32 | + |
| 33 | +* #external_value displays the value of any retrieved variable, or the |
| 34 | +first value if it's an array. |
| 35 | + |
| 36 | +* #for_external_table applies processing onto multiple rows retrieved by |
| 37 | +any of the #get_*_data functions |
| 38 | + |
| 39 | +* #store_external_table mimics a call to the Semantic Internal Objects |
| 40 | +extension's #set_internal parser function onto each row retrieved by |
| 41 | +any of the #get_*_data functions, in order to store the entire array |
| 42 | +of data semantically. |
| 43 | + |
| 44 | +In addition, the extension defines a new special page, 'GetData', that |
| 45 | +exports selected rows from a wiki page that holds CSV data, in a format |
| 46 | +that is readable by #get_web_data. |
| 47 | + |
| 48 | +For more information, see the extension homepage at: |
| 49 | +http://www.mediawiki.org/wiki/Extension:External_Data |
| 50 | + |
| 51 | +== Requirements == |
| 52 | + |
| 53 | +This version of the External Data extension requires MediaWiki 1.11 or higher. |
| 54 | + |
| 55 | +== Installation == |
| 56 | + |
| 57 | +To install the extension, place the entire 'ExternalData' directory |
| 58 | +within your MediaWiki 'extensions' directory, then add the following |
| 59 | +line to your 'LocalSettings.php' file: |
| 60 | + |
| 61 | + require_once( "$IP/extensions/ExternalData/ExternalData.php" ); |
| 62 | + |
| 63 | +To cache the data from the URLs being accessed, you can call the contents |
| 64 | +of ExternalData.sql in your database, then add the following to |
| 65 | +LocalSettings.php: |
| 66 | + |
| 67 | + $edgCacheTable = 'ed_url_cache'; |
| 68 | + |
| 69 | +You should also add a line like the following, to set the expiration time |
| 70 | +of the cache, in seconds; this line will cache data for a week: |
| 71 | + |
| 72 | + $edgCacheExpireTime = 7 * 24 * 60 * 60; |
| 73 | + |
| 74 | +You can also set for string replacements to be done on the URLs you call, |
| 75 | +for instance to hide API keys: |
| 76 | + |
| 77 | + $edgStringReplacements['MY_API_KEY'] = 'abcd1324'; |
| 78 | + |
| 79 | +You can create a "whitelist" to allow retrieval of data only from trusted |
| 80 | +sites, in the manner of MediaWiki's $wgAllowExternalImagesFrom - if you |
| 81 | +are hiding API keys, it is very much recommended to create such a |
| 82 | +whitelist, to prevent users from being able to discover their values: |
| 83 | + |
| 84 | + $edgAllowExternalDataFrom = array('http://example.com/api'); |
| 85 | + |
| 86 | +Finally, to use the database or LDAP retrieval capabilities, you need to |
| 87 | +set connection settings as well - see the online documentation for more |
| 88 | +information. |
| 89 | + |
| 90 | +== Contact == |
| 91 | + |
| 92 | +Most comments, questions, suggestions and bug reports should be sent to |
| 93 | +the Semantic MediaWiki mailing list: |
| 94 | + |
| 95 | + https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
| 96 | + |
| 97 | +Although the External Data extension in general is independent of Semantic |
| 98 | +MediaWiki, the fact that it uses Semantic Internal Objects for one of its |
| 99 | +functions, along with the fact that the two extensions are often used |
| 100 | +together, means that it can be considered part of the Semantic MediaWiki |
| 101 | +family for communication purposes. |
| 102 | + |
| 103 | +If possible, please add "[ED]" at the beginning of the subject line, to |
| 104 | +clarify the subject matter. |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/README |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 105 | + native |
Index: tags/extensions/ExternalData/REL_1_2_2/ED_Utils.php |
— | — | @@ -0,0 +1,484 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Utility functions for External Data |
| 5 | + */ |
| 6 | + |
| 7 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 8 | + die( 'This file is a MediaWiki extension; it is not a valid entry point' ); |
| 9 | +} |
| 10 | + |
| 11 | +class EDUtils { |
| 12 | + // how many times to try an HTTP request |
| 13 | + private static $http_number_of_tries = 3; |
| 14 | + |
| 15 | + // XML-handling functions based on code found at |
| 16 | + // http://us.php.net/xml_set_element_handler |
| 17 | + static function startElement( $parser, $name, $attrs ) { |
| 18 | + global $edgCurrentXMLTag, $edgXMLValues; |
| 19 | + // set to all lowercase to avoid casing issues |
| 20 | + $edgCurrentXMLTag = strtolower( $name ); |
| 21 | + foreach ( $attrs as $attr => $value ) { |
| 22 | + $attr = strtolower( $attr ); |
| 23 | + if ( array_key_exists( $attr, $edgXMLValues ) ) |
| 24 | + $edgXMLValues[$attr][] = $value; |
| 25 | + else |
| 26 | + $edgXMLValues[$attr] = array( $value ); |
| 27 | + } |
| 28 | + } |
| 29 | + |
| 30 | + static function endElement( $parser, $name ) { |
| 31 | + global $edgCurrentXMLTag; |
| 32 | + $edgCurrentXMLTag = ""; |
| 33 | + } |
| 34 | + |
| 35 | + static function getContent ( $parser, $content ) { |
| 36 | + global $edgCurrentXMLTag, $edgXMLValues; |
| 37 | + if ( array_key_exists( $edgCurrentXMLTag, $edgXMLValues ) ) |
| 38 | + $edgXMLValues[$edgCurrentXMLTag][] = $content; |
| 39 | + else |
| 40 | + $edgXMLValues[$edgCurrentXMLTag] = array( $content ); |
| 41 | + } |
| 42 | + |
| 43 | + static function parseParams( $params ) { |
| 44 | + $args = Array(); |
| 45 | + foreach ( $params as $param ) { |
| 46 | + $param = preg_replace ( "/\s\s+/", ' ', $param ); // whitespace |
| 47 | + $param_parts = explode( "=", $param, 2 ); |
| 48 | + if ( count( $param_parts ) < 2 ) { |
| 49 | + continue; |
| 50 | + } |
| 51 | + list( $name, $value ) = $param_parts; |
| 52 | + $args[$name] = $value; |
| 53 | + } |
| 54 | + return $args; |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * Parses an argument of the form "a=b,c=d,..." into an array |
| 59 | + */ |
| 60 | + static function paramToArray( $arg, $lowercaseKeys = false, $lowercaseValues = false ) { |
| 61 | + $arg = preg_replace ( "/\s\s+/", ' ', $arg ); // whitespace |
| 62 | + $keyValuePairs = explode( ',', $arg ); |
| 63 | + $returnArray = Array(); |
| 64 | + foreach ( $keyValuePairs as $keyValuePair ) { |
| 65 | + $keyAndValue = explode( '=', $keyValuePair, 2 ); |
| 66 | + if ( count( $keyAndValue ) == 2 ) { |
| 67 | + $key = trim( $keyAndValue[0] ); |
| 68 | + if ( $lowercaseKeys ) { |
| 69 | + $key = strtolower( $key ); |
| 70 | + } |
| 71 | + $value = trim( $keyAndValue[1] ); |
| 72 | + if ( $lowercaseValues ) { |
| 73 | + $value = strtolower( $value ); |
| 74 | + } |
| 75 | + $returnArray[$key] = $value; |
| 76 | + } |
| 77 | + } |
| 78 | + return $returnArray; |
| 79 | + } |
| 80 | + |
| 81 | + static function getLDAPData ( $filter, $domain, $params ) { |
| 82 | + global $edgLDAPServer; |
| 83 | + global $edgLDAPUser; |
| 84 | + global $edgLDAPPass; |
| 85 | + |
| 86 | + $ds = EDUtils::connectLDAP( $edgLDAPServer[$domain], $edgLDAPUser[$domain], $edgLDAPPass[$domain] ); |
| 87 | + $results = EDUtils::searchLDAP( $ds, $domain, $filter, $params ); |
| 88 | + |
| 89 | + return $results; |
| 90 | + } |
| 91 | + |
| 92 | + static function connectLDAP( $server, $username, $password ) { |
| 93 | + $ds = ldap_connect( $server ); |
| 94 | + if ( $ds ) { |
| 95 | + // these options for Active Directory only? |
| 96 | + ldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3 ); |
| 97 | + ldap_set_option( $ds, LDAP_OPT_REFERRALS, 0 ); |
| 98 | + |
| 99 | + if ( $username ) { |
| 100 | + $r = ldap_bind( $ds, $username, $password ); |
| 101 | + } else { |
| 102 | + # no username, so do anonymous bind |
| 103 | + $r = ldap_bind( $ds ); |
| 104 | + } |
| 105 | + |
| 106 | + # should check the result of the bind here |
| 107 | + return $ds; |
| 108 | + } else { |
| 109 | + echo ( wfMsgExt( "externaldata-ldap-unable-to-connect", array( 'parse', 'escape' ), $server ) ); |
| 110 | + } |
| 111 | + } |
| 112 | + |
| 113 | + static function searchLDAP( $ds, $domain, $filter, $attributes ) { |
| 114 | + global $edgLDAPBaseDN; |
| 115 | + |
| 116 | + $sr = ldap_search( $ds, $edgLDAPBaseDN[$domain], $filter, $attributes ); |
| 117 | + $results = ldap_get_entries( $ds, $sr ); |
| 118 | + return $results; |
| 119 | + } |
| 120 | + |
| 121 | + static function getDBData ( $server_id, $from, $where, $columns ) { |
| 122 | + global $edgDBServerType; |
| 123 | + global $edgDBServer; |
| 124 | + global $edgDBName; |
| 125 | + global $edgDBUser; |
| 126 | + global $edgDBPass; |
| 127 | + |
| 128 | + if ( ( ! array_key_exists( $server_id, $edgDBServerType ) ) || |
| 129 | + ( ! array_key_exists( $server_id, $edgDBServer ) ) || |
| 130 | + ( ! array_key_exists( $server_id, $edgDBName ) ) || |
| 131 | + ( ! array_key_exists( $server_id, $edgDBUser ) ) || |
| 132 | + ( ! array_key_exists( $server_id, $edgDBPass ) ) ) { |
| 133 | + echo ( wfMsgExt( "externaldata-db-incomplete-information", array( 'parse', 'escape' ) ) ); |
| 134 | + return; |
| 135 | + } |
| 136 | + |
| 137 | + |
| 138 | + $db_type = $edgDBServerType[$server_id]; |
| 139 | + $db_server = $edgDBServer[$server_id]; |
| 140 | + $db_name = $edgDBName[$server_id]; |
| 141 | + $db_username = $edgDBUser[$server_id]; |
| 142 | + $db_password = $edgDBPass[$server_id]; |
| 143 | + |
| 144 | + if ( $db_type == "mysql" ) { |
| 145 | + $db = new Database( $db_server, $db_username, $db_password, $db_name ); |
| 146 | + } elseif ( $db_type == "postgres" ) { |
| 147 | + $db = new DatabasePostgres( $db_server, $db_username, $db_password, $db_name ); |
| 148 | + } elseif ( $db_type == "mssql" ) { |
| 149 | + $db = new DatabaseMssql( $db_server, $db_username, $db_password, $db_name ); |
| 150 | + } elseif ( $db_type == "oracle" ) { |
| 151 | + $db = new DatabaseOracle( $db_server, $db_username, $db_password, $db_name ); |
| 152 | + } else { |
| 153 | + echo ( wfMsgExt( "externaldata-db-unknown-type", array( 'parse', 'escape' ) ) ); |
| 154 | + return; |
| 155 | + } |
| 156 | + if ( ! $db->isOpen() ) { |
| 157 | + echo ( wfMsgExt( "externaldata-db-could-not-connect", array( 'parse', 'escape' ) ) ); |
| 158 | + return; |
| 159 | + } |
| 160 | + |
| 161 | + if ( count( $columns ) == 0 ) { |
| 162 | + echo ( wfMsgExt( "externaldata-db-no-return-values", array( 'parse', 'escape' ) ) ); |
| 163 | + return; |
| 164 | + } |
| 165 | + |
| 166 | + $rows = EDUtils::searchDB( $db, $from, $where, $columns ); |
| 167 | + $db->close(); |
| 168 | + |
| 169 | + $values = Array(); |
| 170 | + foreach ( $rows as $row ) { |
| 171 | + foreach ( $columns as $column ) { |
| 172 | + $values[$column][] = $row[$column]; |
| 173 | + } |
| 174 | + } |
| 175 | + |
| 176 | + return $values; |
| 177 | + } |
| 178 | + |
| 179 | + static function searchDB ( $db, $from, $where, $columns ) { |
| 180 | + $sql = "SELECT " . implode( ",", $columns ) . " "; |
| 181 | + $sql .= "FROM " . $from . " "; |
| 182 | + $sql .= "WHERE " . $where; |
| 183 | + |
| 184 | + $result = $db->query( $sql ); |
| 185 | + if ( !$result ) { |
| 186 | + echo ( wfMsgExt( "externaldata-db-invalid-query", array( 'parse', 'escape' ) ) ); |
| 187 | + return false; |
| 188 | + } else { |
| 189 | + $rows = Array(); |
| 190 | + while ( $row = $db->fetchRow( $result ) ) { |
| 191 | + // Create a new row object, that uses the |
| 192 | + // passed-in column names as keys, so that |
| 193 | + // there's always an exact match between |
| 194 | + // what's in the query and what's in the |
| 195 | + // return value (so that "a.b", for instance, |
| 196 | + // doesn't get chopped off to just "b"). |
| 197 | + $new_row = array(); |
| 198 | + foreach ($columns as $i => $column_name) { |
| 199 | + $new_row[$column_name] = $row[$i]; |
| 200 | + } |
| 201 | + $rows[] = $new_row; |
| 202 | + } |
| 203 | + return $rows; |
| 204 | + } |
| 205 | + } |
| 206 | + |
| 207 | + static function getXMLData ( $xml ) { |
| 208 | + global $edgXMLValues; |
| 209 | + $edgXMLValues = array(); |
| 210 | + |
| 211 | + // Remove comments from XML - for some reason, xml_parse() |
| 212 | + // can't handle them. |
| 213 | + $xml = preg_replace( '/<!--.*?-->/s', '', $xml ); |
| 214 | + |
| 215 | + $xml_parser = xml_parser_create(); |
| 216 | + xml_set_element_handler( $xml_parser, array( 'EDUtils', 'startElement' ), array( 'EDUtils', 'endElement' ) ); |
| 217 | + xml_set_character_data_handler( $xml_parser, array( 'EDUtils', 'getContent' ) ); |
| 218 | + if ( !xml_parse( $xml_parser, $xml, true ) ) { |
| 219 | + echo ( wfMsgExt( 'externaldata-xml-error', |
| 220 | + xml_error_string( xml_get_error_code( $xml_parser ) ), |
| 221 | + xml_get_current_line_number( $xml_parser ), array( 'parse', 'escape' ) ) ); |
| 222 | + } |
| 223 | + xml_parser_free( $xml_parser ); |
| 224 | + return $edgXMLValues; |
| 225 | + } |
| 226 | + |
| 227 | + static function getValuesFromCSVLine( $csv_line ) { |
| 228 | + // regular expression copied from http://us.php.net/fgetcsv |
| 229 | + $vals = preg_split( '/,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))/', $csv_line ); |
| 230 | + $vals2 = array(); |
| 231 | + foreach ( $vals as $val ) |
| 232 | + $vals2[] = trim( $val, '"' ); |
| 233 | + return $vals2; |
| 234 | + } |
| 235 | + |
| 236 | + static function getCSVData( $csv, $has_header ) { |
| 237 | + // from http://us.php.net/manual/en/function.str-getcsv.php#88311 |
| 238 | + // str_getcsv() is a function that was only added in PHP 5.3.0, |
| 239 | + // so use the much older fgetcsv() if it's not there |
| 240 | + |
| 241 | + // actually, for now, always use fgetcsv(), since this call to |
| 242 | + // str_getcsv() doesn't work, and I can't test/debug it at the |
| 243 | + // moment |
| 244 | + //if ( function_exists( 'str_getcsv' ) ) { |
| 245 | + // $table = str_getcsv( $csv ); |
| 246 | + //} else { |
| 247 | + $fiveMBs = 5 * 1024 * 1024; |
| 248 | + $fp = fopen( "php://temp/maxmemory:$fiveMBs", 'r+' ); |
| 249 | + fputs( $fp, $csv ); |
| 250 | + rewind( $fp ); |
| 251 | + $table = array(); |
| 252 | + while ( $line = fgetcsv( $fp ) ) { |
| 253 | + array_push( $table, $line ); |
| 254 | + } |
| 255 | + fclose( $fp ); |
| 256 | + //} |
| 257 | + // now "flip" the data, turning it into a column-by-column |
| 258 | + // array, instead of row-by-row |
| 259 | + if ( $has_header ) { |
| 260 | + $header_vals = array_shift( $table ); |
| 261 | + } |
| 262 | + $values = array(); |
| 263 | + foreach ( $table as $line ) { |
| 264 | + foreach ( $line as $i => $row_val ) { |
| 265 | + if ( $has_header ) { |
| 266 | + $column = strtolower( $header_vals[$i] ); |
| 267 | + } else { |
| 268 | + // start with an index of 1 instead of 0 |
| 269 | + $column = $i + 1; |
| 270 | + } |
| 271 | + if ( array_key_exists( $column, $values ) ) |
| 272 | + $values[$column][] = $row_val; |
| 273 | + else |
| 274 | + $values[$column] = array( $row_val ); |
| 275 | + } |
| 276 | + } |
| 277 | + return $values; |
| 278 | + } |
| 279 | + |
| 280 | + /** |
| 281 | + * This function handles version 3 of the genomic-data format GFF, |
| 282 | + * defined here: |
| 283 | + * http://www.sequenceontology.org/gff3.shtml |
| 284 | + */ |
| 285 | + static function getGFFData( $gff ) { |
| 286 | + // use an fgetcsv() call, similar to the one in getCSVData() |
| 287 | + // (fgetcsv() can handle delimiters other than commas, in this |
| 288 | + // case a tab) |
| 289 | + $fiveMBs = 5 * 1024 * 1024; |
| 290 | + $fp = fopen( "php://temp/maxmemory:$fiveMBs", 'r+' ); |
| 291 | + fputs( $fp, $gff ); |
| 292 | + rewind( $fp ); |
| 293 | + $table = array(); |
| 294 | + while ( $line = fgetcsv( $fp, null, "\t" ) ) { |
| 295 | + // ignore comment lines |
| 296 | + if ( strpos( $line[0], '##' ) !== 0 ) { |
| 297 | + // special handling for final 'attributes' column |
| 298 | + if ( array_key_exists( 8, $line ) ) { |
| 299 | + $attributes = explode( ';', $line[8] ); |
| 300 | + foreach ( $attributes as $attribute ) { |
| 301 | + $keyAndValue = explode( '=', $attribute, 2 ); |
| 302 | + if ( count( $keyAndValue ) == 2 ) { |
| 303 | + $key = strtolower( $keyAndValue[0] ); |
| 304 | + $value = $keyAndValue[1]; |
| 305 | + $line[$key] = $value; |
| 306 | + } |
| 307 | + } |
| 308 | + } |
| 309 | + array_push( $table, $line ); |
| 310 | + } |
| 311 | + } |
| 312 | + fclose( $fp ); |
| 313 | + // now "flip" the data, turning it into a column-by-column |
| 314 | + // array, instead of row-by-row |
| 315 | + if ( $has_header ) { |
| 316 | + $header_vals = array_shift( $table ); |
| 317 | + } |
| 318 | + $values = array(); |
| 319 | + foreach ( $table as $line ) { |
| 320 | + foreach ( $line as $i => $row_val ) { |
| 321 | + // each of the columns in GFF have a |
| 322 | + // pre-defined name - even the last column |
| 323 | + // has its own name, "attributes" |
| 324 | + if ( $i === 0 ) { |
| 325 | + $column = 'seqid'; |
| 326 | + } elseif ( $i == 1 ) { |
| 327 | + $column = 'source'; |
| 328 | + } elseif ( $i == 2 ) { |
| 329 | + $column = 'type'; |
| 330 | + } elseif ( $i == 3 ) { |
| 331 | + $column = 'start'; |
| 332 | + } elseif ( $i == 4 ) { |
| 333 | + $column = 'end'; |
| 334 | + } elseif ( $i == 5 ) { |
| 335 | + $column = 'score'; |
| 336 | + } elseif ( $i == 6 ) { |
| 337 | + $column = 'strand'; |
| 338 | + } elseif ( $i == 7 ) { |
| 339 | + $column = 'phase'; |
| 340 | + } elseif ( $i == 8 ) { |
| 341 | + $column = 'attributes'; |
| 342 | + } else { |
| 343 | + // this is hopefully an attribute key |
| 344 | + $column = $i; |
| 345 | + } |
| 346 | + if ( array_key_exists( $column, $values ) ) |
| 347 | + $values[$column][] = $row_val; |
| 348 | + else |
| 349 | + $values[$column] = array( $row_val ); |
| 350 | + } |
| 351 | + } |
| 352 | + return $values; |
| 353 | + } |
| 354 | + |
| 355 | + /** |
| 356 | + * Recursive function for use by getJSONData() |
| 357 | + */ |
| 358 | + static function parseTree( $tree, &$retrieved_values ) { |
| 359 | + foreach ( $tree as $key => $val ) { |
| 360 | + if ( is_array( $val ) ) { |
| 361 | + self::parseTree( $val, $retrieved_values ); |
| 362 | + } else { |
| 363 | + $key = strtolower( $key ); |
| 364 | + if ( array_key_exists( $key, $retrieved_values ) ) |
| 365 | + $retrieved_values[$key][] = $val; |
| 366 | + else |
| 367 | + $retrieved_values[$key] = array( $val ); |
| 368 | + } |
| 369 | + } |
| 370 | + } |
| 371 | + |
| 372 | + static function getJSONData( $json ) { |
| 373 | + // escape if json_decode() isn't supported |
| 374 | + if ( ! function_exists( 'json_decode' ) ) { |
| 375 | + echo ( wfMsgExt( "externaldata-json-decode-not-supported", array( 'parse', 'escape' ) ) ); |
| 376 | + return array(); |
| 377 | + } |
| 378 | + $json_tree = json_decode( $json, true ); |
| 379 | + $values = array(); |
| 380 | + if ( is_array( $json_tree ) ) { |
| 381 | + self::parseTree( $json_tree, $values ); |
| 382 | + } |
| 383 | + return $values; |
| 384 | + } |
| 385 | + |
| 386 | + static function fetchURL( $url, $post_vars = array(), $get_fresh = false, $try_count = 1 ) { |
| 387 | + $dbr = wfGetDB( DB_SLAVE ); |
| 388 | + global $edgStringReplacements, $edgCacheTable, |
| 389 | + $edgCacheExpireTime, $edgAllowSSL; |
| 390 | + |
| 391 | + // do any special variable replacements in the URLs, for |
| 392 | + // secret API keys and the like |
| 393 | + foreach ( $edgStringReplacements as $key => $value ) { |
| 394 | + $url = str_replace( $key, $value, $url ); |
| 395 | + } |
| 396 | + |
| 397 | + if ( !isset( $edgCacheTable ) || is_null( $edgCacheTable ) ) { |
| 398 | + if ( $edgAllowSSL ) { |
| 399 | + return Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false, 'followRedirects' => false ) ); |
| 400 | + } else { |
| 401 | + return Http::get( $url ); |
| 402 | + } |
| 403 | + } |
| 404 | + |
| 405 | + // check the cache (only the first 254 chars of the url) |
| 406 | + $row = $dbr->selectRow( $edgCacheTable, '*', array( 'url' => substr( $url, 0, 254 ) ), 'EDUtils::fetchURL' ); |
| 407 | + |
| 408 | + if ( $row && ( ( time() - $row->req_time ) > $edgCacheExpireTime ) ) { |
| 409 | + $get_fresh = true; |
| 410 | + } |
| 411 | + |
| 412 | + if ( !$row || $get_fresh ) { |
| 413 | + if ( $edgAllowSSL ) { |
| 414 | + $page = Http::get( $url, 'default', array( CURLOPT_SSL_VERIFYPEER => false ) ); |
| 415 | + } else { |
| 416 | + $page = Http::get( $url ); |
| 417 | + } |
| 418 | + if ( $page === false ) { |
| 419 | + sleep( 1 ); |
| 420 | + if ( $try_count >= self::$http_number_of_tries ) { |
| 421 | + echo ( wfMsgExt( 'externaldata-db-could-not-get-url', array( 'parsemag', 'escape' ), self::$http_number_of_tries ) ); |
| 422 | + return ''; |
| 423 | + } |
| 424 | + $try_count++; |
| 425 | + return self::fetchURL( $url, $post_vars, $get_fresh, $try_count ); |
| 426 | + } |
| 427 | + if ( $page != '' ) { |
| 428 | + $dbw = wfGetDB( DB_MASTER ); |
| 429 | + // insert contents into the cache table |
| 430 | + $dbw->insert( $edgCacheTable, array( 'url' => substr( $url, 0, 254 ), 'result' => $page, 'req_time' => time() ) ); |
| 431 | + return $page; |
| 432 | + } |
| 433 | + } else { |
| 434 | + return $row->result; |
| 435 | + } |
| 436 | + } |
| 437 | + |
| 438 | + /** |
| 439 | + * Checks whether this URL is allowed, based on the |
| 440 | + * $edgAllowExternalDataFrom whitelist |
| 441 | + */ |
| 442 | + static public function isURLAllowed( $url ) { |
| 443 | + // this code is based on Parser::maybeMakeExternalImage() |
| 444 | + global $edgAllowExternalDataFrom; |
| 445 | + $data_from = $edgAllowExternalDataFrom; |
| 446 | + $text = false; |
| 447 | + if ( empty( $data_from ) ) { |
| 448 | + return true; |
| 449 | + } elseif ( is_array( $data_from ) ) { |
| 450 | + foreach ( $data_from as $match ) { |
| 451 | + if ( strpos( $url, $match ) === 0 ) { |
| 452 | + return true; |
| 453 | + } |
| 454 | + } |
| 455 | + return false; |
| 456 | + } else { |
| 457 | + if ( strpos( $url, $data_from ) === 0 ) { |
| 458 | + return true; |
| 459 | + } else { |
| 460 | + return false; |
| 461 | + } |
| 462 | + } |
| 463 | + } |
| 464 | + |
| 465 | + static public function getDataFromURL( $url, $format ) { |
| 466 | + $url_contents = EDUtils::fetchURL( $url ); |
| 467 | + // exit if there's nothing there |
| 468 | + if ( empty( $url_contents ) ) |
| 469 | + return array(); |
| 470 | + |
| 471 | + if ( $format == 'xml' ) { |
| 472 | + return self::getXMLData( $url_contents ); |
| 473 | + } elseif ( $format == 'csv' ) { |
| 474 | + return self::getCSVData( $url_contents, false ); |
| 475 | + } elseif ( $format == 'csv with header' ) { |
| 476 | + return self::getCSVData( $url_contents, true ); |
| 477 | + } elseif ( $format == 'json' ) { |
| 478 | + return self::getJSONData( $url_contents ); |
| 479 | + } elseif ( $format == 'gff' ) { |
| 480 | + return self::getGFFData( $url_contents ); |
| 481 | + } |
| 482 | + return array(); |
| 483 | + } |
| 484 | + |
| 485 | +} |
Property changes on: tags/extensions/ExternalData/REL_1_2_2/ED_Utils.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 486 | + native |