Nikerabbit has submitted this change and it was merged. Change subject: Migrate to JSON i18n ......................................................................
Migrate to JSON i18n Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: I750760836cd65848b3d90fe760c8873ea7203c92 --- M SimpleFarm.i18n.php M SimpleFarm.php A i18n/ast.json A i18n/de.json A i18n/dsb.json A i18n/en.json A i18n/es.json A i18n/fa.json A i18n/fr.json A i18n/gl.json A i18n/he.json A i18n/hsb.json A i18n/hu.json A i18n/ia.json A i18n/it.json A i18n/ja.json A i18n/ko.json A i18n/ksh.json A i18n/lb.json A i18n/mk.json A i18n/nl.json A i18n/pms.json A i18n/pt-br.json A i18n/qqq.json A i18n/roa-tara.json A i18n/ru.json A i18n/tl.json A i18n/uk.json A i18n/zh-hans.json A i18n/zh-hant.json 30 files changed, 262 insertions(+), 216 deletions(-) Approvals: Nikerabbit: Verified; Looks good to me, approved diff --git a/SimpleFarm.i18n.php b/SimpleFarm.i18n.php index d7812f5..eeb2776 100644 --- a/SimpleFarm.i18n.php +++ b/SimpleFarm.i18n.php @@ -1,213 +1,31 @@ <?php - /** - * Internationalization file of the 'Simple Farm' extension. + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php * - * @since 0.1 + * Beginning with MediaWiki 1.23, translation strings are stored in json files, + * and the EXTENSION.i18n.php file only exists to provide compatibility with + * older releases of MediaWiki. For more information about this migration, see: + * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format * - * @file - * @ingroup SimpleFarm - * @author Daniel Werner < danwe...@web.de > + * This shim maintains compatibility back to MediaWiki 1.17. */ - $messages = array(); +$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, &$cachedData ) { + $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); + foreach ( $codeSequence as $csCode ) { + $fileName = __DIR__ . "/i18n/$csCode.json"; + if ( is_readable( $fileName ) ) { + $data = FormatJson::decode( file_get_contents( $fileName ), true ); + foreach ( array_keys( $data ) as $key ) { + if ( $key === '' || $key[0] === '@' ) { + unset( $data[$key] ); + } + } + $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); + } -/** English - * @author Daniel Werner - */ -$messages['en'] = array( - 'simplefarm-desc' => 'Simple, yet powerful wiki farm extension without any fancy configuration pages', -); - -/** Message documentation (Message documentation) - * @author SPQRobin - * @author Shirayuki - */ -$messages['qqq'] = array( - 'simplefarm-desc' => '{{desc|name=Simple Farm|url=http://www.mediawiki.org/wiki/Extension:Simple_Farm}}', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'simplefarm-desc' => 'Simple, pero potente estensión de granxa wiki ensin denguna páxina de configuración guapa', -); - -/** German (Deutsch) - * @author Daniel Werner - * @author Kghbln - */ -$messages['de'] = array( - 'simplefarm-desc' => 'Ermöglicht den einfachen wie umfänglichen Betrieb einer Wikifarm, ohne dabei komplexe Konfigurationsseiten zu nutzen', -); - -/** Lower Sorbian (dolnoserbski) - * @author Michawiki - */ -$messages['dsb'] = array( - 'simplefarm-desc' => 'Jadnore, ale mócne wikifarmowe rozšyrjenje bźez wjelikich konfiguraciskich bokow', -); - -/** Spanish (español) - * @author Armando-Martin - */ -$messages['es'] = array( - 'simplefarm-desc' => 'Simple, pero potente extensión de granja wiki sin ninguna página de configuración sofisticada', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'simplefarm-desc' => 'ساده، هنوز فرمت زمینه ویکی قدرتمند بدون هر صفحه پیکربندی فانتزی است', -); - -/** French (français) - * @author Gomoko - */ -$messages['fr'] = array( - 'simplefarm-desc' => 'Simple mais puissante extension de ferme de wiki sans aucune page de configuration fantaisiste', -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'simplefarm-desc' => 'Simple, pero potente extensión de wiki granxa sen ningunha páxina de configuración luxosa', -); - -/** Hebrew (עברית) - * @author Amire80 - */ -$messages['he'] = array( - 'simplefarm-desc' => 'הרחבה פשוטה, אבל חזקה, לניהול חוות ויקי ללא דפי הגדרות מורכבים', -); - -/** Upper Sorbian (hornjoserbsce) - * @author Michawiki - */ -$messages['hsb'] = array( - 'simplefarm-desc' => 'Jednore, ale mócne wikifarmowe rozšěrjenje bjez wulkich konfiguraciskich stronow', -); - -/** Hungarian (magyar) - * @author Dj - */ -$messages['hu'] = array( - 'simplefarm-desc' => 'Egyszerű, mégis hatékony wiki farm kiterjesztés csili-vili konfigurációs oldalak nélkül', -); - -/** Interlingua (interlingua) - * @author McDutchie - */ -$messages['ia'] = array( - 'simplefarm-desc' => 'Extension de ferma wiki simple ma potente sin paginas de configuration special', -); - -/** Italian (italiano) - * @author Beta16 - */ -$messages['it'] = array( - 'simplefarm-desc' => 'Semplice, ma potente estensione per wiki farm senza alcuna pagina fantasiosa per la configurazione', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'simplefarm-desc' => '派手な設定ページがなく簡素でありながら強力なウィキファーム拡張機能', -); - -/** Korean (한국어) - * @author 아라 - */ -$messages['ko'] = array( - 'simplefarm-desc' => '어떤 멋진 설정 페이지 없이 단순하면서 강력한 위키 농장 확장 기능', -); - -/** Colognian (Ripoarisch) - * @author Purodha - */ -$messages['ksh'] = array( - 'simplefarm-desc' => 'E eijnfach, ävver kräftesch Projramm för ene Schtall vull Wikis ze verwallde, der ohne övverdrivve Sigge met Enschtällonge.', -); - -/** Luxembourgish (Lëtzebuergesch) - * @author Robby - */ -$messages['lb'] = array( - 'simplefarm-desc' => 'Einfach, an awer ëmfangräich Wiki-Farm-Erweiderung ouni komplex Konfiguratiounssäiten', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'simplefarm-desc' => 'Едноставен, но моќен додаток за викифарма без сложени страници за поставки', -); - -/** Dutch (Nederlands) - * @author SPQRobin - * @author Siebrand - */ -$messages['nl'] = array( - 'simplefarm-desc' => "Eenvoudige maar toch krachtige wikifarmuitbreiding zonder grootse configuratiepagina's", -); - -/** Piedmontese (Piemontèis) - * @author Borichèt - * @author Dragonòt - */ -$messages['pms'] = array( - 'simplefarm-desc' => 'Sempia ma potenta estension ëd fatorìa wiki sensa gnun-a pàgina sbërlusenta ëd configurassion', -); - -/** Brazilian Portuguese (português do Brasil) - * @author 555 - */ -$messages['pt-br'] = array( - 'simplefarm-desc' => 'Simples porém poderosa extensão para wikifarms, sem páginas complicadas de configurações', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'simplefarm-desc' => "Facile, angore 'n'estenzione d'a fabbriche de uicchi putende senze pàggene de configurazione a uecchie", -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'simplefarm-desc' => 'Простое, но мощное расширение для создания группы вики-проектов без каких-либо затейливых страниц настройки', -); - -/** Tagalog (Tagalog) - * @author AnakngAraw - */ -$messages['tl'] = array( - 'simplefarm-desc' => 'Payak, ngunit makapangyarihang dugtong ng bukid ng wika na walang anumang magagarang mga pahina ng kumpigurasyon', -); - -/** Ukrainian (українська) - * @author Vox - */ -$messages['uk'] = array( - 'simplefarm-desc' => 'Простие, але потужне wiki farm розширення без будь-яких сторінок кофігурації', -); - -/** Simplified Chinese (中文(简体)) - * @author Yfdyh000 - */ -$messages['zh-hans'] = array( - 'simplefarm-desc' => '简单但强大wiki农场扩展,没有任何花哨的配置页面', -); - -/** Traditional Chinese (中文(繁體)) - * @author Justincheng12345 - */ -$messages['zh-hant'] = array( - 'simplefarm-desc' => '簡單而強大,無需花巧設置的維基農場擴充插件', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/SimpleFarm.php b/SimpleFarm.php index 7c1a2c6..7401509 100644 --- a/SimpleFarm.php +++ b/SimpleFarm.php @@ -4,14 +4,13 @@ * are all using the same MediaWiki base installation and LocalSettings.php * Also comes with a useful maintenance script allowing to maintain several farm members * with just one command-line command. - * + * * Documentation: http://www.mediawiki.org/wiki/Extension:Simple_Farm * Support: http://www.mediawiki.org/wiki/Extension_talk:Simple_Farm - * - * @version: 0.1rc + * * @license: ISC license * @author: Daniel Werner < danwe...@web.de > - * + * * @file * @ingroup SimpleFarm */ @@ -26,6 +25,7 @@ ); // language file for extension description: +$wgMessagesDirs['SimpleFarm'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['SimpleFarm'] = ExtSimpleFarm::getDir() . '/SimpleFarm.i18n.php'; /* * We don't use $wgExtensionMessagesFiles for more messages since most of this extension happens during @@ -54,23 +54,23 @@ * 'Ext...' class representing the 'Simple Farm' extension. */ class ExtSimpleFarm { - + /** * Version of the 'Simple Farm' extension. - * + * * @since 0.1 */ - const VERSION = '0.1rc'; - + const VERSION = '0.2.0'; + /** * Returns the extensions base installation directory. * * @since 0.1 - * + * * @return boolean */ public static function getDir() { - static $dir = null; + static $dir = null; if( $dir === null ) { $dir = dirname( __FILE__ ); } diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..5897a57 --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "simplefarm-desc": "Simple, pero potente estensión de granxa wiki ensin denguna páxina de configuración guapa" +} diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..f2199f4 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Daniel Werner", + "Kghbln" + ] + }, + "simplefarm-desc": "Ermöglicht den einfachen wie umfänglichen Betrieb einer Wikifarm, ohne dabei komplexe Konfigurationsseiten zu nutzen" +} diff --git a/i18n/dsb.json b/i18n/dsb.json new file mode 100644 index 0000000..c61be40 --- /dev/null +++ b/i18n/dsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "simplefarm-desc": "Jadnore, ale mócne wikifarmowe rozšyrjenje bźez wjelikich konfiguraciskich bokow" +} diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..f085e92 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Daniel Werner" + ] + }, + "simplefarm-desc": "Simple, yet powerful wiki farm extension without any fancy configuration pages" +} diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..c5fdc8e --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Armando-Martin" + ] + }, + "simplefarm-desc": "Simple, pero potente extensión de granja wiki sin ninguna página de configuración sofisticada" +} diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..76d1991 --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Armin1392" + ] + }, + "simplefarm-desc": "ساده، هنوز فرمت زمینه ویکی قدرتمند بدون هر صفحه پیکربندی فانتزی است" +} diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..e032f52 --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gomoko" + ] + }, + "simplefarm-desc": "Simple mais puissante extension de ferme de wiki sans aucune page de configuration fantaisiste" +} diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..738c61e --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "simplefarm-desc": "Simple, pero potente extensión de wiki granxa sen ningunha páxina de configuración luxosa" +} diff --git a/i18n/he.json b/i18n/he.json new file mode 100644 index 0000000..ff8aa44 --- /dev/null +++ b/i18n/he.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Amire80" + ] + }, + "simplefarm-desc": "הרחבה פשוטה, אבל חזקה, לניהול חוות ויקי ללא דפי הגדרות מורכבים" +} diff --git a/i18n/hsb.json b/i18n/hsb.json new file mode 100644 index 0000000..1720901 --- /dev/null +++ b/i18n/hsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "simplefarm-desc": "Jednore, ale mócne wikifarmowe rozšěrjenje bjez wulkich konfiguraciskich stronow" +} diff --git a/i18n/hu.json b/i18n/hu.json new file mode 100644 index 0000000..f1494e7 --- /dev/null +++ b/i18n/hu.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Dj" + ] + }, + "simplefarm-desc": "Egyszerű, mégis hatékony wiki farm kiterjesztés csili-vili konfigurációs oldalak nélkül" +} diff --git a/i18n/ia.json b/i18n/ia.json new file mode 100644 index 0000000..0e18e9a --- /dev/null +++ b/i18n/ia.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "McDutchie" + ] + }, + "simplefarm-desc": "Extension de ferma wiki simple ma potente sin paginas de configuration special" +} diff --git a/i18n/it.json b/i18n/it.json new file mode 100644 index 0000000..6eaea6f --- /dev/null +++ b/i18n/it.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Beta16" + ] + }, + "simplefarm-desc": "Semplice, ma potente estensione per wiki farm senza alcuna pagina fantasiosa per la configurazione" +} diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..3a9f096 --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "simplefarm-desc": "派手な設定ページがなく簡素でありながら強力なウィキファーム拡張機能" +} diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..47bf2bf --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "아라" + ] + }, + "simplefarm-desc": "어떤 멋진 설정 페이지 없이 단순하면서 강력한 위키 농장 확장 기능" +} diff --git a/i18n/ksh.json b/i18n/ksh.json new file mode 100644 index 0000000..74816b3 --- /dev/null +++ b/i18n/ksh.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Purodha" + ] + }, + "simplefarm-desc": "E eijnfach, ävver kräftesch Projramm för ene Schtall vull Wikis ze verwallde, der ohne övverdrivve Sigge met Enschtällonge." +} diff --git a/i18n/lb.json b/i18n/lb.json new file mode 100644 index 0000000..87d4f70 --- /dev/null +++ b/i18n/lb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Robby" + ] + }, + "simplefarm-desc": "Einfach, an awer ëmfangräich Wiki-Farm-Erweiderung ouni komplex Konfiguratiounssäiten" +} diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..69da83e --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "simplefarm-desc": "Едноставен, но моќен додаток за викифарма без сложени страници за поставки" +} diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..fb5af44 --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "SPQRobin", + "Siebrand" + ] + }, + "simplefarm-desc": "Eenvoudige maar toch krachtige wikifarmuitbreiding zonder grootse configuratiepagina's" +} diff --git a/i18n/pms.json b/i18n/pms.json new file mode 100644 index 0000000..0e6bfbd --- /dev/null +++ b/i18n/pms.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Borichèt", + "Dragonòt" + ] + }, + "simplefarm-desc": "Sempia ma potenta estension ëd fatorìa wiki sensa gnun-a pàgina sbërlusenta ëd configurassion" +} diff --git a/i18n/pt-br.json b/i18n/pt-br.json new file mode 100644 index 0000000..f078d40 --- /dev/null +++ b/i18n/pt-br.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "555" + ] + }, + "simplefarm-desc": "Simples porém poderosa extensão para wikifarms, sem páginas complicadas de configurações" +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..4e8c5c4 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "SPQRobin", + "Shirayuki" + ] + }, + "simplefarm-desc": "{{desc|name=Simple Farm|url=http://www.mediawiki.org/wiki/Extension:Simple_Farm}}" +} diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..8335ac9 --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "simplefarm-desc": "Facile, angore 'n'estenzione d'a fabbriche de uicchi putende senze pàggene de configurazione a uecchie" +} diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..dd57de7 --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "simplefarm-desc": "Простое, но мощное расширение для создания группы вики-проектов без каких-либо затейливых страниц настройки" +} diff --git a/i18n/tl.json b/i18n/tl.json new file mode 100644 index 0000000..3746906 --- /dev/null +++ b/i18n/tl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "AnakngAraw" + ] + }, + "simplefarm-desc": "Payak, ngunit makapangyarihang dugtong ng bukid ng wika na walang anumang magagarang mga pahina ng kumpigurasyon" +} diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..80a464e --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Vox" + ] + }, + "simplefarm-desc": "Простие, але потужне wiki farm розширення без будь-яких сторінок кофігурації" +} diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..761d940 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Yfdyh000" + ] + }, + "simplefarm-desc": "简单但强大wiki农场扩展,没有任何花哨的配置页面" +} diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json new file mode 100644 index 0000000..04a0cc1 --- /dev/null +++ b/i18n/zh-hant.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Justincheng12345" + ] + }, + "simplefarm-desc": "簡單而強大,無需花巧設置的維基農場擴充插件" +} -- To view, visit https://gerrit.wikimedia.org/r/123081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I750760836cd65848b3d90fe760c8873ea7203c92 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SimpleFarm Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits