Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/122703
Change subject: Migrate to JSON i18n ...................................................................... Migrate to JSON i18n Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: I4943fdb26c591e6d3b6a101f43cc0b1f7939def4 --- M Model.i18n.php M Model.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/hsb.json A i18n/it.json A i18n/ja.json A i18n/ko.json A i18n/lb.json A i18n/mk.json A i18n/nl.json A i18n/oc.json A i18n/pt-br.json A i18n/pt.json A i18n/qqq.json A i18n/roa-tara.json A i18n/ru.json A i18n/uk.json A i18n/zh-hans.json 25 files changed, 214 insertions(+), 164 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Model refs/changes/03/122703/1 diff --git a/Model.i18n.php b/Model.i18n.php index f0877df..eeb2776 100644 --- a/Model.i18n.php +++ b/Model.i18n.php @@ -1,166 +1,31 @@ <?php -/* Language file for mediawiki extension Model */ - -$messages = array(); - /** - * English - * @author Andrew Garrett + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php + * + * 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 + * + * This shim maintains compatibility back to MediaWiki 1.17. */ -$messages['en'] = array( - 'model-desc' => 'ORM Abstraction model for MediaWiki developers' -); +$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'] ); + } -/** Message documentation (Message documentation) - * @author Raymond - */ -$messages['qqq'] = array( - 'model-desc' => '{{desc|name=Model|url=https://www.mediawiki.org/wiki/Extension:Model}}', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'model-desc' => "Modelu d'astracción ORM pa desendolcadores de MediaWiki", -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'model-desc' => 'ORM-Abstraktionsmodell für MediaWiki-Entwickler', -); - -/** Lower Sorbian (dolnoserbski) - * @author Michawiki - */ -$messages['dsb'] = array( - 'model-desc' => 'Abstrakciski model ORM za wuwijarjow MediaWiki', -); - -/** Spanish (español) - * @author Fitoschido - */ -$messages['es'] = array( - 'model-desc' => 'Modelo de abstracción ORM para los desarrolladores de MediaWiki', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'model-desc' => 'مدل انتزاعی اُآرام برای توسعهدهندگان مدیاویکی', -); - -/** French (français) - * @author Sherbrooke - */ -$messages['fr'] = array( - 'model-desc' => "Modèle d'abstraction ORM pour les programmeurs de MediaWiki", -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'model-desc' => 'Modelo de abstracción ORM para os desenvolvedores de MediaWiki', -); - -/** Upper Sorbian (hornjoserbsce) - * @author Michawiki - */ -$messages['hsb'] = array( - 'model-desc' => 'Abstrakciski model ORM za wuwiwarjow MediaWiki', -); - -/** Italian (italiano) - * @author Gianfranco - */ -$messages['it'] = array( - 'model-desc' => 'Modello di astrazione ORM per gli sviluppatori di MediaWiki', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'model-desc' => 'MediaWiki 開発者向けの ORM 抽象モデル', -); - -/** Korean (한국어) - * @author Priviet - */ -$messages['ko'] = array( - 'model-desc' => '미디어위키 개발자를 위한 ORM 추상화 모델', -); - -/** Luxembourgish (Lëtzebuergesch) - * @author Robby - */ -$messages['lb'] = array( - 'model-desc' => 'ORM-Abstraktiounsmodell fir MediaWiki-Entwéckler', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'model-desc' => 'ORM-модел за извадоци од програмерите на МедијаВики', -); - -/** Dutch (Nederlands) - * @author Siebrand - */ -$messages['nl'] = array( - 'model-desc' => 'ORM abstractiemodel voor ontwikkelaars van MediaWiki', -); - -/** Occitan (occitan) - * @author Cedric31 - */ -$messages['oc'] = array( - 'model-desc' => "Modèl d'abstraccion ORM pels programaires de MediaWiki", -); - -/** Portuguese (português) - * @author Cainamarques - */ -$messages['pt'] = array( - 'model-desc' => 'Modelo de abstração ORM para desenvolvedores do MediaWiki', -); - -/** Brazilian Portuguese (português do Brasil) - * @author Cainamarques - */ -$messages['pt-br'] = array( - 'model-desc' => 'Modelo de abstração ORM para desenvolvedores do MediaWiki', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'model-desc' => 'Modelle de astrazione ORM pe le sviluppature de MediaUicchi', -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'model-desc' => 'Модель ORM-абстракции для разработчиков MediaWiki', -); - -/** Ukrainian (українська) - * @author Andriykopanytsia - */ -$messages['uk'] = array( - 'model-desc' => 'ORM модель абстракції для розробників Медіавікі', -); - -/** Simplified Chinese (中文(简体)) - * @author Yfdyh000 - */ -$messages['zh-hans'] = array( - 'model-desc' => '为MediaWiki开发者的ORM抽象模型', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/Model.php b/Model.php index f6f3a66..398e42e 100644 --- a/Model.php +++ b/Model.php @@ -24,7 +24,7 @@ $wgExtensionCredits['specialpage'][] = array( 'path' => __FILE__, 'name' => 'Model', - 'version' => '0.1', + 'version' => '0.2.0', 'author' => 'Vedmaka', 'url' => 'https://www.mediawiki.org/wiki/Extension:Model', 'descriptionmsg' => 'model-desc', @@ -40,6 +40,7 @@ ); /* Message Files */ +$wgMessagesDirs['Model'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['Model'] = dirname( __FILE__ ) . '/Model.i18n.php'; /* Autoload classes */ @@ -62,4 +63,4 @@ #$wgSpecialPages['Model'] = 'ModelSpecial'; /* Hooks */ -#$wgHooks['example_hook'][] = 'ModelHooks::onExampleHook'; \ No newline at end of file +#$wgHooks['example_hook'][] = 'ModelHooks::onExampleHook'; diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..ac835c9 --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "model-desc": "Modelu d'astracción ORM pa desendolcadores de MediaWiki" +} \ No newline at end of file diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..2557650 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Metalhead64" + ] + }, + "model-desc": "ORM-Abstraktionsmodell für MediaWiki-Entwickler" +} \ No newline at end of file diff --git a/i18n/dsb.json b/i18n/dsb.json new file mode 100644 index 0000000..bf87f4f --- /dev/null +++ b/i18n/dsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "model-desc": "Abstrakciski model ORM za wuwijarjow MediaWiki" +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..e51917e --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Andrew Garrett" + ] + }, + "model-desc": "ORM Abstraction model for MediaWiki developers" +} \ No newline at end of file diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..d480b48 --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Fitoschido" + ] + }, + "model-desc": "Modelo de abstracción ORM para los desarrolladores de MediaWiki" +} \ No newline at end of file diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..7eb8fcd --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Armin1392" + ] + }, + "model-desc": "مدل انتزاعی اُآرام برای توسعهدهندگان مدیاویکی" +} \ No newline at end of file diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..76f9936 --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Sherbrooke" + ] + }, + "model-desc": "Modèle d'abstraction ORM pour les programmeurs de MediaWiki" +} \ No newline at end of file diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..89c21bc --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "model-desc": "Modelo de abstracción ORM para os desenvolvedores de MediaWiki" +} \ No newline at end of file diff --git a/i18n/hsb.json b/i18n/hsb.json new file mode 100644 index 0000000..dc16a02 --- /dev/null +++ b/i18n/hsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "model-desc": "Abstrakciski model ORM za wuwiwarjow MediaWiki" +} \ No newline at end of file diff --git a/i18n/it.json b/i18n/it.json new file mode 100644 index 0000000..9c904b0 --- /dev/null +++ b/i18n/it.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gianfranco" + ] + }, + "model-desc": "Modello di astrazione ORM per gli sviluppatori di MediaWiki" +} \ No newline at end of file diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..775d6a2 --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "model-desc": "MediaWiki 開発者向けの ORM 抽象モデル" +} \ No newline at end of file diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..c796b74 --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Priviet" + ] + }, + "model-desc": "미디어위키 개발자를 위한 ORM 추상화 모델" +} \ No newline at end of file diff --git a/i18n/lb.json b/i18n/lb.json new file mode 100644 index 0000000..f8ad30a --- /dev/null +++ b/i18n/lb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Robby" + ] + }, + "model-desc": "ORM-Abstraktiounsmodell fir MediaWiki-Entwéckler" +} \ No newline at end of file diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..6f69fe3 --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "model-desc": "ORM-модел за извадоци од програмерите на МедијаВики" +} \ No newline at end of file diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..4d8a50e --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Siebrand" + ] + }, + "model-desc": "ORM abstractiemodel voor ontwikkelaars van MediaWiki" +} \ No newline at end of file diff --git a/i18n/oc.json b/i18n/oc.json new file mode 100644 index 0000000..380230a --- /dev/null +++ b/i18n/oc.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Cedric31" + ] + }, + "model-desc": "Modèl d'abstraccion ORM pels programaires de MediaWiki" +} \ No newline at end of file diff --git a/i18n/pt-br.json b/i18n/pt-br.json new file mode 100644 index 0000000..31aa93c --- /dev/null +++ b/i18n/pt-br.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Cainamarques" + ] + }, + "model-desc": "Modelo de abstração ORM para desenvolvedores do MediaWiki" +} \ No newline at end of file diff --git a/i18n/pt.json b/i18n/pt.json new file mode 100644 index 0000000..31aa93c --- /dev/null +++ b/i18n/pt.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Cainamarques" + ] + }, + "model-desc": "Modelo de abstração ORM para desenvolvedores do MediaWiki" +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..1595d89 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Raymond" + ] + }, + "model-desc": "{{desc|name=Model|url=https://www.mediawiki.org/wiki/Extension:Model}}" +} \ No newline at end of file diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..1eb7d5d --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "model-desc": "Modelle de astrazione ORM pe le sviluppature de MediaUicchi" +} \ No newline at end of file diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..36d77bd --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "model-desc": "Модель ORM-абстракции для разработчиков MediaWiki" +} \ No newline at end of file diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..4453ca8 --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Andriykopanytsia" + ] + }, + "model-desc": "ORM модель абстракції для розробників Медіавікі" +} \ No newline at end of file diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..d2aa7e8 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Yfdyh000" + ] + }, + "model-desc": "为MediaWiki开发者的ORM抽象模型" +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122703 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4943fdb26c591e6d3b6a101f43cc0b1f7939def4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Model Gerrit-Branch: master Gerrit-Owner: Siebrand <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
