Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/122682
Change subject: Migrate to JSON i18n ...................................................................... Migrate to JSON i18n Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: I6e85b96c2ac4566ebbd31d4f6247c76831a9238c --- M LifeWeb.i18n.php M LifeWeb.php A i18n/ast.json A i18n/br.json A i18n/de.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/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/pl.json A i18n/pt-br.json A i18n/pt.json A i18n/qqq.json A i18n/ro.json A i18n/roa-tara.json A i18n/ru.json A i18n/sv.json A i18n/uk.json A i18n/zh-hans.json 29 files changed, 270 insertions(+), 222 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LifeWeb refs/changes/82/122682/1 diff --git a/LifeWeb.i18n.php b/LifeWeb.i18n.php index 7747367..eeb2776 100644 --- a/LifeWeb.i18n.php +++ b/LifeWeb.i18n.php @@ -1,225 +1,31 @@ <?php /** - * Internationalisation for LifeWeb + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php * - * @file - * @licence GNU GPL v2+ - * @author Simon A. Eugster <simon...@gmail.com> - * @ingroup Extensions + * 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 = 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 Simon A. Eugster - */ -$messages['en'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Identification key generator and editor', -); - -/** Message documentation (Message documentation) - * @author Shirayuki - */ -$messages['qqq'] = array( - 'lifeweb' => '{{doc-special|LifeWeb}}', - 'lifeweb-desc' => '{{desc|name=Life Web|url=http://www.mediawiki.org/wiki/Extension:LifeWeb}}', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => "Xenerador y editor de claves d'identificación", -); - -/** Breton (brezhoneg) - * @author Fohanno - */ -$messages['br'] = array( - 'lifeweb' => 'LifeWeb', -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Identifizierungsschlüsselgenerator und Editor', -); - -/** Spanish (español) - * @author Fitoschido - */ -$messages['es'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generador y editor de claves de identificación', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'lifeweb' => 'شبکهٔ زندگی', - 'lifeweb-desc' => 'شناسایی ژنراتور کلید و برنامهٔ ویرایشگر', -); - -/** French (français) - * @author Gomoko - * @author Jean-Frédéric - */ -$messages['fr'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Générateur et éditeur de clé d’identifiant', -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Xerador e editor de claves de identificación', -); - -/** Hebrew (עברית) - * @author Yona b - */ -$messages['he'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'מחולל ועורך מפתח זיהוי', -); - -/** Upper Sorbian (hornjoserbsce) - * @author Michawiki - */ -$messages['hsb'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generator identifikaciskeho kluča a editor', -); - -/** Italian (italiano) - * @author Beta16 - */ -$messages['it'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Editor e generatore di chiavi di identificazione', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => '識別キーのジェネレーター/エディター', -); - -/** Korean (한국어) - * @author Priviet - */ -$messages['ko'] = array( - 'lifeweb' => '라이프웹', - 'lifeweb-desc' => '식별 키 생성기 및 편집기', -); - -/** Luxembourgish (Lëtzebuergesch) - * @author Robby - */ -$messages['lb'] = array( - 'lifeweb' => 'LifeWeb', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Создавач и уредник на назнаки', -); - -/** Dutch (Nederlands) - * @author Siebrand - */ -$messages['nl'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generator en bewerker voor identificatiesleutel', -); - -/** Occitan (occitan) - * @author Cedric31 - */ -$messages['oc'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generador e editor de clau d’identificant', -); - -/** Polish (polski) - * @author Chrumps - */ -$messages['pl'] = array( - 'lifeweb' => 'LifeWeb', -); - -/** Portuguese (português) - * @author Cainamarques - */ -$messages['pt'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Gerador e editor de chave de identificação', -); - -/** Brazilian Portuguese (português do Brasil) - * @author Fúlvio - */ -$messages['pt-br'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Gerador e editor de chave de identificação', -); - -/** Romanian (română) - * @author Minisarm - */ -$messages['ro'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generator de chei de identificare și editor', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => "Generatore de chiave pe l'idendificazione e cangiatore", -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Генератор и редактор идентификационных ключей', -); - -/** Swedish (svenska) - * @author WikiPhoenix - */ -$messages['sv'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => 'Generator och redigerare för identifieringsnycklar', -); - -/** Ukrainian (українська) - * @author Andriykopanytsia - */ -$messages['uk'] = array( - 'lifeweb' => 'Мережа життя', - 'lifeweb-desc' => 'Генератор і редактор ідентифікаційного ключа', -); - -/** Simplified Chinese (中文(简体)) - * @author Qiyue2001 - */ -$messages['zh-hans'] = array( - 'lifeweb' => 'LifeWeb', - 'lifeweb-desc' => '识别密钥生成器和编辑器', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/LifeWeb.php b/LifeWeb.php index ce86ccf..37e2f39 100644 --- a/LifeWeb.php +++ b/LifeWeb.php @@ -20,11 +20,12 @@ 'author' => 'Simon A. Eugster', 'url' => 'https://www.mediawiki.org/wiki/Extension:LifeWeb', 'descriptionmsg' => 'lifeweb-desc', - 'version' => '0.0.1', + 'version' => '0.1.0', ); $wgAutoloadClasses[ 'SpecialLifeWeb' ] = __DIR__ . '/SpecialLifeWeb.php'; # Location of the SpecialMyExtension class (Tell MediaWiki to load this file) -$wgExtensionMessagesFiles[ 'LifeWeb' ] = __DIR__ . '/LifeWeb.i18n.php'; # Location of a messages file (Tell MediaWiki to load this file) +$wgMessagesDirs['LifeWeb'] = __DIR__ . '/i18n'; +$wgExtensionMessagesFiles[ 'LifeWeb' ] = __DIR__ . '/LifeWeb.i18n.php'; $wgSpecialPages[ 'LifeWeb' ] = 'SpecialLifeWeb'; # Tell MediaWiki about the new special page and its class name $wgSpecialPageGroups[ 'LifeWeb' ] = 'other'; $wgAPIListModules[ 'LifeWeb' ] = 'ApiLifeWeb'; @@ -125,4 +126,4 @@ } ); -require_once 'ApiLifeWeb.php'; \ No newline at end of file +require_once 'ApiLifeWeb.php'; diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..81b07fe --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Xenerador y editor de claves d'identificación" +} \ No newline at end of file diff --git a/i18n/br.json b/i18n/br.json new file mode 100644 index 0000000..09c43d0 --- /dev/null +++ b/i18n/br.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Fohanno" + ] + }, + "lifeweb": "LifeWeb" +} \ No newline at end of file diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..1315847 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Metalhead64" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Identifizierungsschlüsselgenerator und Editor" +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..5eb8e52 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Simon A. Eugster" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Identification key generator and editor" +} \ No newline at end of file diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..9603949 --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Fitoschido" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generador y editor de claves de identificación" +} \ No newline at end of file diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..76c9d8c --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Armin1392" + ] + }, + "lifeweb": "شبکهٔ زندگی", + "lifeweb-desc": "شناسایی ژنراتور کلید و برنامهٔ ویرایشگر" +} \ No newline at end of file diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..9e4826b --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,10 @@ +{ + "@metadata": { + "authors": [ + "Gomoko", + "Jean-Frédéric" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Générateur et éditeur de clé d’identifiant" +} \ No newline at end of file diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..970837e --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Xerador e editor de claves de identificación" +} \ No newline at end of file diff --git a/i18n/he.json b/i18n/he.json new file mode 100644 index 0000000..8e5331b --- /dev/null +++ b/i18n/he.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Yona b" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "מחולל ועורך מפתח זיהוי" +} \ No newline at end of file diff --git a/i18n/hsb.json b/i18n/hsb.json new file mode 100644 index 0000000..e3432df --- /dev/null +++ b/i18n/hsb.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generator identifikaciskeho kluča a editor" +} \ No newline at end of file diff --git a/i18n/it.json b/i18n/it.json new file mode 100644 index 0000000..753803b --- /dev/null +++ b/i18n/it.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Beta16" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Editor e generatore di chiavi di identificazione" +} \ No newline at end of file diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..d4f1c1d --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "識別キーのジェネレーター/エディター" +} \ No newline at end of file diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..7699af9 --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Priviet" + ] + }, + "lifeweb": "라이프웹", + "lifeweb-desc": "식별 키 생성기 및 편집기" +} \ No newline at end of file diff --git a/i18n/lb.json b/i18n/lb.json new file mode 100644 index 0000000..5efff28 --- /dev/null +++ b/i18n/lb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Robby" + ] + }, + "lifeweb": "LifeWeb" +} \ No newline at end of file diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..a71b10d --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Создавач и уредник на назнаки" +} \ No newline at end of file diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..fe226b8 --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Siebrand" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generator en bewerker voor identificatiesleutel" +} \ No newline at end of file diff --git a/i18n/oc.json b/i18n/oc.json new file mode 100644 index 0000000..9beb321 --- /dev/null +++ b/i18n/oc.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Cedric31" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generador e editor de clau d’identificant" +} \ No newline at end of file diff --git a/i18n/pl.json b/i18n/pl.json new file mode 100644 index 0000000..84f2c2d --- /dev/null +++ b/i18n/pl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Chrumps" + ] + }, + "lifeweb": "LifeWeb" +} \ No newline at end of file diff --git a/i18n/pt-br.json b/i18n/pt-br.json new file mode 100644 index 0000000..30612a7 --- /dev/null +++ b/i18n/pt-br.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Fúlvio" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Gerador e editor de chave de identificação" +} \ No newline at end of file diff --git a/i18n/pt.json b/i18n/pt.json new file mode 100644 index 0000000..f9a03a5 --- /dev/null +++ b/i18n/pt.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Cainamarques" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Gerador e editor de chave de identificação" +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..9808c10 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "lifeweb": "{{doc-special|LifeWeb}}", + "lifeweb-desc": "{{desc|name=Life Web|url=http://www.mediawiki.org/wiki/Extension:LifeWeb}}" +} \ No newline at end of file diff --git a/i18n/ro.json b/i18n/ro.json new file mode 100644 index 0000000..8e83738 --- /dev/null +++ b/i18n/ro.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Minisarm" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generator de chei de identificare și editor" +} \ No newline at end of file diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..a7ffc02 --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generatore de chiave pe l'idendificazione e cangiatore" +} \ No newline at end of file diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..c85e12e --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Генератор и редактор идентификационных ключей" +} \ No newline at end of file diff --git a/i18n/sv.json b/i18n/sv.json new file mode 100644 index 0000000..15aebaf --- /dev/null +++ b/i18n/sv.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "WikiPhoenix" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "Generator och redigerare för identifieringsnycklar" +} \ No newline at end of file diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..3b93b05 --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Andriykopanytsia" + ] + }, + "lifeweb": "Мережа життя", + "lifeweb-desc": "Генератор і редактор ідентифікаційного ключа" +} \ No newline at end of file diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..4cda934 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Qiyue2001" + ] + }, + "lifeweb": "LifeWeb", + "lifeweb-desc": "识别密钥生成器和编辑器" +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e85b96c2ac4566ebbd31d4f6247c76831a9238c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LifeWeb Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@kitano.nl> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits