Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/122319
Change subject: Migrate to JSON i18n ...................................................................... Migrate to JSON i18n Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php with shim. Change-Id: If04e51b977be30ad51e9e76683d48919d31f9d1b --- M DisqusTag.i18n.php M DisqusTag.php A i18n/ast.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/ia.json A i18n/it.json A i18n/ja.json A i18n/ko.json A i18n/lv.json A i18n/mk.json A i18n/nl.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/sco.json A i18n/sl.json A i18n/sv.json A i18n/uk.json A i18n/zh-hans.json 28 files changed, 237 insertions(+), 188 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DisqusTag refs/changes/19/122319/1 diff --git a/DisqusTag.i18n.php b/DisqusTag.i18n.php index aa1f117..eeb2776 100644 --- a/DisqusTag.i18n.php +++ b/DisqusTag.i18n.php @@ -1,192 +1,31 @@ <?php /** - * Internationalisation for DisqusTag extension + * This is a backwards-compatibility shim, generated by: + * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php * - * @file - * @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 Luis Felipe Schenone - */ -$messages['en'] = array( - 'disqustag-desc' => 'Adds <code><disqus></code> tag to insert an inline link that pop up [http://disqus.com Disqus] discussions', -); - -/** Message documentation (Message documentation) - * @author Luis Felipe Schenone - */ -$messages['qqq'] = array( - 'disqustag-desc' => '{{desc|name=DisqusTag|url=https://www.mediawiki.org/wiki/Extension:DisqusTag}}', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'disqustag-desc' => "Amiesta la etiqueta <code><disqus></code> pa inxertar un enllaz en llinia qu'abre una ventana con alderiques de [http://disqus.com Disqus]", -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'disqustag-desc' => 'Ergänzt das <code><disqus></code>-Tag zum Einfügen eines Links in Zeilen, das [http://disqus.com Disqus]-Diskussionen erscheinen lässt', -); - -/** Spanish (español) - * @author Fitoschido - * @author Luis Felipe Schenone - */ -$messages['es'] = array( - 'disqustag-desc' => 'Añade la etiqueta <code><disqus></code> que permite insertar enlaces que abren secciones de comentarios de [http://disqus.com Disqus]', -); - -/** Persian (فارسی) - * @author Dalba - */ -$messages['fa'] = array( - 'disqustag-desc' => 'تگ <code><disqus></code> را برای درج پیوند درونیای که یک گفتگوی [http://disqus.com دیسکاس] را بالا میپرانند میافزاید.', -); - -/** French (français) - * @author Gomoko - */ -$messages['fr'] = array( - 'disqustag-desc' => 'Ajoute la balise <code><disqus></code> pour insérer un lien en ligne qui fait surgir les discussions [http://disqus.com Disqus]', -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'disqustag-desc' => 'Engade a etiqueta <code><disqus></code> para inserir unha ligazón en liña que abre ventás emerxentes con conversas de [http://disqus.com Disqus]', -); - -/** Hebrew (עברית) - * @author Yona b - */ -$messages['he'] = array( - 'disqustag-desc' => 'מוסיף תג <code><disqus></code> כדי להוסיף קישור לחלון קופץ לשיחות [http://disqus.com Disqus]', -); - -/** Upper Sorbian (hornjoserbsce) - * @author Michawiki - */ -$messages['hsb'] = array( - 'disqustag-desc' => 'Přidawa element <code><disqus></code> za zasadźenje wotkaza do linkow, kotryž [http://disqus.com Disqus]-diskusije zwobraznja', -); - -/** Interlingua (interlingua) - * @author McDutchie - */ -$messages['ia'] = array( - 'disqustag-desc' => 'Adde un etiquetta <code><disqus></code> pro incorporar un ligamine que face surger le discussiones de [http://disqus.com Disqus]', -); - -/** Italian (italiano) - * @author Beta16 - */ -$messages['it'] = array( - 'disqustag-desc' => 'Aggiunge il tag <code><disqus></code> per inserire un collegamento in linea che apre la discussione [http://disqus.com Disqus]', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'disqustag-desc' => '[http://disqus.com Disqus] の議論がポップアップするインライン リンクを挿入する <code><disqus></code> タグを追加する', -); - -/** Korean (한국어) - * @author Priviet - */ -$messages['ko'] = array( - 'disqustag-desc' => '<code><disqus></code> 태그를 추가하여 [http://disqus.com Disqus] 토론 팝업을 띄우는 인라인 링크 삽입', -); - -/** Latvian (latviešu) - * @author Papuass - */ -$messages['lv'] = array( - 'disqustag-desc' => 'Pievieno <code><disqus></code> iezīmi, lai ievietotu teksta saiti, ar kuru var atvērt [http://disqus.com Disqus] diskusijas', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'disqustag-desc' => 'Дава ознака <code><disqus></code> што се става во врска во самиот текст и дава скокачко прозорче за дискусии со [http://disqus.com Disqus]', -); - -/** Dutch (Nederlands) - * @author Siebrand - */ -$messages['nl'] = array( - 'disqustag-desc' => 'Voegt het label <code><disqus></code> toe om een koppeling toe te voegen voor een popup naar discussies in [http://disqus.com Disqus]', -); - -/** Portuguese (português) - * @author Hamilton Abreu - */ -$messages['pt'] = array( - 'disqustag-desc' => 'Acrescenta o elemento <code><disqus></code> que apresenta na linha um <i>link</i> que causa o surgimento de janelas flutuantes com discussões [http://disqus.com Disqus]', -); - -/** Brazilian Portuguese (português do Brasil) - * @author Cainamarques - */ -$messages['pt-br'] = array( - 'disqustag-desc' => 'Adiciona a etiqueta <code><disqus></code> para inserir um ligação em linha que abre janelas [http://disqus.com Disqus] de discussão.', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'disqustag-desc' => "Aggiunge 'u tag <code><disqus></code> pe sckaffà 'nu collegamende in linèe ca iapre 'na finestre de 'ngazzamende de [http://disqus.com Disqus]", -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'disqustag-desc' => 'Добавляет тег <code><disqus></code> для вставки встроенные ссылки, которые выводят обсуждения [http://disqus.com Disqus]', -); - -/** Scots (Scots) - * @author John Reid - */ -$messages['sco'] = array( - 'disqustag-desc' => 'Eiks <code><disqus></code> tag tae insert aen inline airtin that pop up [http://disqus.com Disqus] tauks', -); - -/** Slovenian (slovenščina) - * @author Eleassar - */ -$messages['sl'] = array( - 'disqustag-desc' => 'Doda oznako <code><disqus></code>, ki vstavi znotrajvrstično povezavo za izskok pogovorov na spletišču [http://disqus.com Disqus]', -); - -/** Swedish (svenska) - * @author Ainali - */ -$messages['sv'] = array( - 'disqustag-desc' => 'Lägger till <code><disqus></code>-taggen för att infoga en länk som öppnar upp [http://disqus.com Disqus]-diskussioner', -); - -/** Ukrainian (українська) - * @author Andriykopanytsia - */ -$messages['uk'] = array( - 'disqustag-desc' => 'Додає теґ <code><disqus></code>, щоб вставити вбудоване посилання на спливні обговорення [http://disqus.com Disqus]', -); - -/** Simplified Chinese (中文(简体)) - * @author Yfdyh000 - */ -$messages['zh-hans'] = array( - 'disqustag-desc' => '添加<code><disqus></code>标签,用以增加一个弹出[http://disqus.com Disqus]讨论的内文链接', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/DisqusTag.php b/DisqusTag.php index 3a9ee1d..67ee108 100644 --- a/DisqusTag.php +++ b/DisqusTag.php @@ -4,7 +4,7 @@ 'path' => __FILE__, 'name' => 'DisqusTag', 'descriptionmsg' => 'disqustag-desc', - 'version' => 0.2, + 'version' => '0.3.0', 'author' => 'Luis Felipe Schenone', 'url' => 'https://www.mediawiki.org/wiki/Extension:DisqusTag', ); @@ -18,9 +18,10 @@ 'remoteExtPath' => 'DisqusTag', ); +$wgMessagesDirs['DisqusTag'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['DisqusTag'] = __DIR__ . '/DisqusTag.i18n.php'; $wgAutoloadClasses['DisqusTag'] = __DIR__ . '/DisqusTag.body.php'; $wgHooks['BeforePageDisplay'][] = 'DisqusTag::addModule'; $wgHooks['ParserFirstCallInit'][] = 'DisqusTag::setParserHook'; -$wgHooks['SkinAfterContent'][] = 'DisqusTag::addDisqusElements'; \ No newline at end of file +$wgHooks['SkinAfterContent'][] = 'DisqusTag::addDisqusElements'; diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..4cb6ddc --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "disqustag-desc": "Amiesta la etiqueta <code><disqus></code> pa inxertar un enllaz en llinia qu'abre una ventana con alderiques de [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..050b4c1 --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Metalhead64" + ] + }, + "disqustag-desc": "Ergänzt das <code><disqus></code>-Tag zum Einfügen eines Links in Zeilen, das [http://disqus.com Disqus]-Diskussionen erscheinen lässt" +} \ No newline at end of file diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..9fa0453 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Luis Felipe Schenone" + ] + }, + "disqustag-desc": "Adds <code><disqus></code> tag to insert an inline link that pop up [http://disqus.com Disqus] discussions" +} \ No newline at end of file diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..9e56f51 --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Fitoschido", + "Luis Felipe Schenone" + ] + }, + "disqustag-desc": "Añade la etiqueta <code><disqus></code> que permite insertar enlaces que abren secciones de comentarios de [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..e63b451 --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Dalba" + ] + }, + "disqustag-desc": "تگ <code><disqus></code> را برای درج پیوند درونیای که یک گفتگوی [http://disqus.com دیسکاس] را بالا میپرانند میافزاید." +} \ No newline at end of file diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..b552e48 --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gomoko" + ] + }, + "disqustag-desc": "Ajoute la balise <code><disqus></code> pour insérer un lien en ligne qui fait surgir les discussions [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..883ba40 --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "disqustag-desc": "Engade a etiqueta <code><disqus></code> para inserir unha ligazón en liña que abre ventás emerxentes con conversas de [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/he.json b/i18n/he.json new file mode 100644 index 0000000..b72921b --- /dev/null +++ b/i18n/he.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Yona b" + ] + }, + "disqustag-desc": "מוסיף תג <code><disqus></code> כדי להוסיף קישור לחלון קופץ לשיחות [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/hsb.json b/i18n/hsb.json new file mode 100644 index 0000000..10e3337 --- /dev/null +++ b/i18n/hsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "disqustag-desc": "Přidawa element <code><disqus></code> za zasadźenje wotkaza do linkow, kotryž [http://disqus.com Disqus]-diskusije zwobraznja" +} \ No newline at end of file diff --git a/i18n/ia.json b/i18n/ia.json new file mode 100644 index 0000000..5c7babb --- /dev/null +++ b/i18n/ia.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "McDutchie" + ] + }, + "disqustag-desc": "Adde un etiquetta <code><disqus></code> pro incorporar un ligamine que face surger le discussiones de [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/it.json b/i18n/it.json new file mode 100644 index 0000000..c609d3f --- /dev/null +++ b/i18n/it.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Beta16" + ] + }, + "disqustag-desc": "Aggiunge il tag <code><disqus></code> per inserire un collegamento in linea che apre la discussione [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..594faef --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "disqustag-desc": "[http://disqus.com Disqus] の議論がポップアップするインライン リンクを挿入する <code><disqus></code> タグを追加する" +} \ No newline at end of file diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..640e57a --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Priviet" + ] + }, + "disqustag-desc": "<code><disqus></code> 태그를 추가하여 [http://disqus.com Disqus] 토론 팝업을 띄우는 인라인 링크 삽입" +} \ No newline at end of file diff --git a/i18n/lv.json b/i18n/lv.json new file mode 100644 index 0000000..d0589c5 --- /dev/null +++ b/i18n/lv.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Papuass" + ] + }, + "disqustag-desc": "Pievieno <code><disqus></code> iezīmi, lai ievietotu teksta saiti, ar kuru var atvērt [http://disqus.com Disqus] diskusijas" +} \ No newline at end of file diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..8dbbd7d --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "disqustag-desc": "Дава ознака <code><disqus></code> што се става во врска во самиот текст и дава скокачко прозорче за дискусии со [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..6f68d0d --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Siebrand" + ] + }, + "disqustag-desc": "Voegt het label <code><disqus></code> toe om een koppeling toe te voegen voor een popup naar discussies in [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/pt-br.json b/i18n/pt-br.json new file mode 100644 index 0000000..bc7f440 --- /dev/null +++ b/i18n/pt-br.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Cainamarques" + ] + }, + "disqustag-desc": "Adiciona a etiqueta <code><disqus></code> para inserir um ligação em linha que abre janelas [http://disqus.com Disqus] de discussão." +} \ No newline at end of file diff --git a/i18n/pt.json b/i18n/pt.json new file mode 100644 index 0000000..debef62 --- /dev/null +++ b/i18n/pt.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Hamilton Abreu" + ] + }, + "disqustag-desc": "Acrescenta o elemento <code><disqus></code> que apresenta na linha um <i>link</i> que causa o surgimento de janelas flutuantes com discussões [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..e728379 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Luis Felipe Schenone" + ] + }, + "disqustag-desc": "{{desc|name=DisqusTag|url=https://www.mediawiki.org/wiki/Extension:DisqusTag}}" +} \ No newline at end of file diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..d2e8273 --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "disqustag-desc": "Aggiunge 'u tag <code><disqus></code> pe sckaffà 'nu collegamende in linèe ca iapre 'na finestre de 'ngazzamende de [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..0ce73c1 --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "disqustag-desc": "Добавляет тег <code><disqus></code> для вставки встроенные ссылки, которые выводят обсуждения [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/sco.json b/i18n/sco.json new file mode 100644 index 0000000..1a6f2f9 --- /dev/null +++ b/i18n/sco.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "John Reid" + ] + }, + "disqustag-desc": "Eiks <code><disqus></code> tag tae insert aen inline airtin that pop up [http://disqus.com Disqus] tauks" +} \ No newline at end of file diff --git a/i18n/sl.json b/i18n/sl.json new file mode 100644 index 0000000..359e485 --- /dev/null +++ b/i18n/sl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Eleassar" + ] + }, + "disqustag-desc": "Doda oznako <code><disqus></code>, ki vstavi znotrajvrstično povezavo za izskok pogovorov na spletišču [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/sv.json b/i18n/sv.json new file mode 100644 index 0000000..fc9d3f1 --- /dev/null +++ b/i18n/sv.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Ainali" + ] + }, + "disqustag-desc": "Lägger till <code><disqus></code>-taggen för att infoga en länk som öppnar upp [http://disqus.com Disqus]-diskussioner" +} \ No newline at end of file diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..f326329 --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Andriykopanytsia" + ] + }, + "disqustag-desc": "Додає теґ <code><disqus></code>, щоб вставити вбудоване посилання на спливні обговорення [http://disqus.com Disqus]" +} \ No newline at end of file diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..a888f38 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Yfdyh000" + ] + }, + "disqustag-desc": "添加<code><disqus></code>标签,用以增加一个弹出[http://disqus.com Disqus]讨论的内文链接" +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122319 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If04e51b977be30ad51e9e76683d48919d31f9d1b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DisqusTag 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