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: I5bff02c3abbec04ee1bf2b1748037016a10b9da8 --- M SectionDisqus.i18n.php M SectionDisqus.php A i18n/ar.json 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/qqq.json A i18n/roa-tara.json A i18n/ru.json A i18n/uk.json A i18n/zh-hans.json 24 files changed, 207 insertions(+), 163 deletions(-) Approvals: Nikerabbit: Verified; Looks good to me, approved diff --git a/SectionDisqus.i18n.php b/SectionDisqus.i18n.php index 5171008..eeb2776 100644 --- a/SectionDisqus.i18n.php +++ b/SectionDisqus.i18n.php @@ -1,166 +1,31 @@ <?php /** - * Internationalisation for SectionDisqus 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( - 'sectiondisqus-desc' => 'Adds a "Discuss" button next to the "Edit" button of every section, that when clicked, opens a Disqus Lightbox for that section', -); - -/** Message documentation (Message documentation) - * @author Luis Felipe Schenone - * @author Raimond Spekking - */ -$messages['qqq'] = array( - 'sectiondisqus-desc' => '{{desc|name=SectionDisqus|url=https://www.mediawiki.org/wiki/Extension:SectionDisqus}}', -); - -/** Arabic (العربية) - * @author Claw eg - */ -$messages['ar'] = array( - 'sectiondisqus-desc' => 'إضافة زر "بحث" بجوار زر "تحرير" لكل قسم، فعند النقر، يفتح صندوق بحث لهذا المقطع', -); - -/** Asturian (asturianu) - * @author Xuacu - */ -$messages['ast'] = array( - 'sectiondisqus-desc' => 'Amiesta un botón "Discutir" xunto al botón "Editar" de cada seición que, al facer click, abre un ventanu de Disqus pa esa seición', -); - -/** German (Deutsch) - * @author Metalhead64 - */ -$messages['de'] = array( - 'sectiondisqus-desc' => 'Ergänzt einen Button „Diskutieren“ neben dem „Bearbeiten“-Link bei jedem Abschnitt. Beim Anklicken öffnet sich ein Disqus-Leuchtkasten für diesen Abschnitt.', -); - -/** Lower Sorbian (dolnoserbski) - * @author Michawiki - */ -$messages['dsb'] = array( - 'sectiondisqus-desc' => 'Pśidawa tłocašk "Diskutěrowaś" pódła tłocaška "Wobźěłaś" kuždego wótrězka, kótaryž, jolic kliknješ na njen, wócynja swěśaty kašćik Disqus.', -); - -/** Spanish (español) - * @author Fitoschido - * @author Luis Felipe Schenone - */ -$messages['es'] = array( - 'sectiondisqus-desc' => 'Añade el botón «Discutir» junto al de «Editar» en cada sección, que al pulsarlo abre un recuadro de comentarios de Disqus', -); - -/** Persian (فارسی) - * @author Armin1392 - */ -$messages['fa'] = array( - 'sectiondisqus-desc' => 'افزودن یک دکمه "بحث" کنار دکمه "ویرایش" هر بخش، که هنگامی که کلیک شود، یک لایتباکس دیسکاس برای آن بخش باز میکند.', -); - -/** French (français) - * @author Sherbrooke - */ -$messages['fr'] = array( - 'sectiondisqus-desc' => "Ajouter un bouton « Discussion » à côté du bouton « Modifier » de toutes les sections, ce qui permet d'ouvrir une boîte de discussion Disqus pour cette section", -); - -/** Galician (galego) - * @author Toliño - */ -$messages['gl'] = array( - 'sectiondisqus-desc' => 'Engade un botón "Conversa" ao carón do botón "Editar" de cada sección que, ao premer nel, abre unha ventá de conversa para esa sección', -); - -/** Upper Sorbian (hornjoserbsce) - * @author Michawiki - */ -$messages['hsb'] = array( - 'sectiondisqus-desc' => 'Přidawa tłóčatko "Diskutować" pódła tłóčatka "Wobdźěłać" kóždeho wotrězka, kotrež, jeli na njo kliknješ, swěćaty kašćik Disqus wočinja.', -); - -/** Italian (italiano) - * @author Gianfranco - */ -$messages['it'] = array( - 'sectiondisqus-desc' => 'Aggiunge un pulsante "Discuti" accanto al pulsante "Modifica" di ogni sezione, che una volta cliccato, apre una finestrella Disqus per quella sezione', -); - -/** Japanese (日本語) - * @author Shirayuki - */ -$messages['ja'] = array( - 'sectiondisqus-desc' => '「議論」ボタンをそれぞれの節の「編集」ボタンの隣に追加する (クリックするとその節の Disqus Lightbox が表示される)', -); - -/** Korean (한국어) - * @author Priviet - */ -$messages['ko'] = array( - 'sectiondisqus-desc' => '모든 문단마다 "편집" 버튼 옆에 클릭하면 그 문단의 Disqus Lightbox를 여는 "토론" 버튼 추가', -); - -/** Luxembourgish (Lëtzebuergesch) - * @author Robby - * @author Soued031 - */ -$messages['lb'] = array( - 'sectiondisqus-desc' => 'Setzt e Knäppchen "Diskutéieren" nieftt de Knäppchen "Änneren" vun all Abschnitt, dee beim dropklicken eng \'Disqus-Lightbox\' fir dësen Abschnitt opmécht.', -); - -/** Macedonian (македонски) - * @author Bjankuloski06 - */ -$messages['mk'] = array( - 'sectiondisqus-desc' => 'Става копче „Разговор“ до копчето „Уреди“ во секој дел (поднаслов). Кога ќе стиснете на него, отвора прозорче „Disqus“ за тој дел', -); - -/** Dutch (Nederlands) - * @author Siebrand - */ -$messages['nl'] = array( - 'sectiondisqus-desc' => 'Voegt een knop "Overleggen" toe naast de knop "Bewerken" voor iedere paragraaf, die als er op wordt geklikt een Disqus Lightbox opent voor die paragraaf', -); - -/** Occitan (occitan) - * @author Cedric31 - */ -$messages['oc'] = array( - 'sectiondisqus-desc' => 'Apondre un boton « Discussion » al costat del boton « Modificar » de totas las seccions, aquò permet de dobrir una bóstia de discussion Disqus per aquesta seccion', -); - -/** tarandíne (tarandíne) - * @author Joetaras - */ -$messages['roa-tara'] = array( - 'sectiondisqus-desc' => 'Aggiunge \'nu buttone "\'Ngazzate" vecine a \'u buttone "Cange" de ogne sezione, ca quanne avène cvazzate, iapre \'na buatte de Disqus pe quedda sezione.', -); - -/** Russian (русский) - * @author Okras - */ -$messages['ru'] = array( - 'sectiondisqus-desc' => 'Добавляет в каждом разделе рядом со ссылкой «Править» ссылку «Обсудить» по нажатию на которую открывает окно с Disqus для этого раздела', -); - -/** Ukrainian (українська) - * @author Andriykopanytsia - */ -$messages['uk'] = array( - 'sectiondisqus-desc' => 'Додає кнопку "Обговорити" біля кнопки "Редагувати" кожного розділу, щоб при натисканні відкривалося спливне вікно Disqus для цього розділу', -); - -/** Simplified Chinese (中文(简体)) - * @author Yfdyh000 - */ -$messages['zh-hans'] = array( - 'sectiondisqus-desc' => '在每个“编辑”按钮旁添加一个“讨论”按钮,点击则对该章节打开一个Disqus Lightbox', -); + $cachedData['deps'][] = new FileDependency( $fileName ); + } + return true; +}; diff --git a/SectionDisqus.php b/SectionDisqus.php index a1261ce..3253b7c 100644 --- a/SectionDisqus.php +++ b/SectionDisqus.php @@ -7,14 +7,13 @@ * * @author Luis Felipe Schenone <scheno...@gmail.com> * @license GPL v2 or later - * @version 0.1 */ $wgExtensionCredits['other'][] = array( 'path' => __FILE__, 'name' => 'SectionDisqus', 'descriptionmsg' => 'sectiondisqus-desc', - 'version' => '0.1', + 'version' => '0.2.0', 'author' => 'Luis Felipe Schenone', 'url' => 'https://www.mediawiki.org/wiki/Extension:SectionDisqus' ); @@ -28,9 +27,10 @@ 'remoteExtPath' => 'SectionDisqus', ); +$wgMessagesDirs['SectionDisqus'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['SectionDisqus'] = __DIR__ . '/SectionDisqus.i18n.php'; $wgAutoloadClasses['SectionDisqus'] = __DIR__ . '/SectionDisqus.body.php'; $wgHooks['BeforePageDisplay'][] = 'SectionDisqus::addResources'; $wgHooks['DoEditSectionLink'][] = 'SectionDisqus::addDisqusButton'; -$wgHooks['SkinAfterContent'][] = 'SectionDisqus::addDisqusDialog'; \ No newline at end of file +$wgHooks['SkinAfterContent'][] = 'SectionDisqus::addDisqusDialog'; diff --git a/i18n/ar.json b/i18n/ar.json new file mode 100644 index 0000000..cc5d7bc --- /dev/null +++ b/i18n/ar.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Claw eg" + ] + }, + "sectiondisqus-desc": "إضافة زر \"بحث\" بجوار زر \"تحرير\" لكل قسم، فعند النقر، يفتح صندوق بحث لهذا المقطع" +} diff --git a/i18n/ast.json b/i18n/ast.json new file mode 100644 index 0000000..be92207 --- /dev/null +++ b/i18n/ast.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Xuacu" + ] + }, + "sectiondisqus-desc": "Amiesta un botón \"Discutir\" xunto al botón \"Editar\" de cada seición que, al facer click, abre un ventanu de Disqus pa esa seición" +} diff --git a/i18n/de.json b/i18n/de.json new file mode 100644 index 0000000..e2a433b --- /dev/null +++ b/i18n/de.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Metalhead64" + ] + }, + "sectiondisqus-desc": "Ergänzt einen Button „Diskutieren“ neben dem „Bearbeiten“-Link bei jedem Abschnitt. Beim Anklicken öffnet sich ein Disqus-Leuchtkasten für diesen Abschnitt." +} diff --git a/i18n/dsb.json b/i18n/dsb.json new file mode 100644 index 0000000..78a1ad0 --- /dev/null +++ b/i18n/dsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "sectiondisqus-desc": "Pśidawa tłocašk \"Diskutěrowaś\" pódła tłocaška \"Wobźěłaś\" kuždego wótrězka, kótaryž, jolic kliknješ na njen, wócynja swěśaty kašćik Disqus." +} diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 0000000..667e8bc --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Luis Felipe Schenone" + ] + }, + "sectiondisqus-desc": "Adds a \"Discuss\" button next to the \"Edit\" button of every section, that when clicked, opens a Disqus Lightbox for that section" +} diff --git a/i18n/es.json b/i18n/es.json new file mode 100644 index 0000000..6c02c0a --- /dev/null +++ b/i18n/es.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Fitoschido", + "Luis Felipe Schenone" + ] + }, + "sectiondisqus-desc": "Añade el botón «Discutir» junto al de «Editar» en cada sección, que al pulsarlo abre un recuadro de comentarios de Disqus" +} diff --git a/i18n/fa.json b/i18n/fa.json new file mode 100644 index 0000000..7c8ab89 --- /dev/null +++ b/i18n/fa.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Armin1392" + ] + }, + "sectiondisqus-desc": "افزودن یک دکمه \"بحث\" کنار دکمه \"ویرایش\" هر بخش، که هنگامی که کلیک شود، یک لایتباکس دیسکاس برای آن بخش باز میکند." +} diff --git a/i18n/fr.json b/i18n/fr.json new file mode 100644 index 0000000..f71d580 --- /dev/null +++ b/i18n/fr.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Sherbrooke" + ] + }, + "sectiondisqus-desc": "Ajouter un bouton « Discussion » à côté du bouton « Modifier » de toutes les sections, ce qui permet d'ouvrir une boîte de discussion Disqus pour cette section" +} diff --git a/i18n/gl.json b/i18n/gl.json new file mode 100644 index 0000000..446e0ad --- /dev/null +++ b/i18n/gl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Toliño" + ] + }, + "sectiondisqus-desc": "Engade un botón \"Conversa\" ao carón do botón \"Editar\" de cada sección que, ao premer nel, abre unha ventá de conversa para esa sección" +} diff --git a/i18n/hsb.json b/i18n/hsb.json new file mode 100644 index 0000000..3fe18ad --- /dev/null +++ b/i18n/hsb.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Michawiki" + ] + }, + "sectiondisqus-desc": "Přidawa tłóčatko \"Diskutować\" pódła tłóčatka \"Wobdźěłać\" kóždeho wotrězka, kotrež, jeli na njo kliknješ, swěćaty kašćik Disqus wočinja." +} diff --git a/i18n/it.json b/i18n/it.json new file mode 100644 index 0000000..71b09fc --- /dev/null +++ b/i18n/it.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Gianfranco" + ] + }, + "sectiondisqus-desc": "Aggiunge un pulsante \"Discuti\" accanto al pulsante \"Modifica\" di ogni sezione, che una volta cliccato, apre una finestrella Disqus per quella sezione" +} diff --git a/i18n/ja.json b/i18n/ja.json new file mode 100644 index 0000000..23f9775 --- /dev/null +++ b/i18n/ja.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Shirayuki" + ] + }, + "sectiondisqus-desc": "「議論」ボタンをそれぞれの節の「編集」ボタンの隣に追加する (クリックするとその節の Disqus Lightbox が表示される)" +} diff --git a/i18n/ko.json b/i18n/ko.json new file mode 100644 index 0000000..fe23f5e --- /dev/null +++ b/i18n/ko.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Priviet" + ] + }, + "sectiondisqus-desc": "모든 문단마다 \"편집\" 버튼 옆에 클릭하면 그 문단의 Disqus Lightbox를 여는 \"토론\" 버튼 추가" +} diff --git a/i18n/lb.json b/i18n/lb.json new file mode 100644 index 0000000..ed2a9ef --- /dev/null +++ b/i18n/lb.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Robby", + "Soued031" + ] + }, + "sectiondisqus-desc": "Setzt e Knäppchen \"Diskutéieren\" nieftt de Knäppchen \"Änneren\" vun all Abschnitt, dee beim dropklicken eng 'Disqus-Lightbox' fir dësen Abschnitt opmécht." +} diff --git a/i18n/mk.json b/i18n/mk.json new file mode 100644 index 0000000..da24e39 --- /dev/null +++ b/i18n/mk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Bjankuloski06" + ] + }, + "sectiondisqus-desc": "Става копче „Разговор“ до копчето „Уреди“ во секој дел (поднаслов). Кога ќе стиснете на него, отвора прозорче „Disqus“ за тој дел" +} diff --git a/i18n/nl.json b/i18n/nl.json new file mode 100644 index 0000000..58c06b4 --- /dev/null +++ b/i18n/nl.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Siebrand" + ] + }, + "sectiondisqus-desc": "Voegt een knop \"Overleggen\" toe naast de knop \"Bewerken\" voor iedere paragraaf, die als er op wordt geklikt een Disqus Lightbox opent voor die paragraaf" +} diff --git a/i18n/oc.json b/i18n/oc.json new file mode 100644 index 0000000..967b272 --- /dev/null +++ b/i18n/oc.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Cedric31" + ] + }, + "sectiondisqus-desc": "Apondre un boton « Discussion » al costat del boton « Modificar » de totas las seccions, aquò permet de dobrir una bóstia de discussion Disqus per aquesta seccion" +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 0000000..aaa8469 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,9 @@ +{ + "@metadata": { + "authors": [ + "Luis Felipe Schenone", + "Raimond Spekking" + ] + }, + "sectiondisqus-desc": "{{desc|name=SectionDisqus|url=https://www.mediawiki.org/wiki/Extension:SectionDisqus}}" +} diff --git a/i18n/roa-tara.json b/i18n/roa-tara.json new file mode 100644 index 0000000..6ee8f33 --- /dev/null +++ b/i18n/roa-tara.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Joetaras" + ] + }, + "sectiondisqus-desc": "Aggiunge 'nu buttone \"'Ngazzate\" vecine a 'u buttone \"Cange\" de ogne sezione, ca quanne avène cvazzate, iapre 'na buatte de Disqus pe quedda sezione." +} diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..13b6d6f --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Okras" + ] + }, + "sectiondisqus-desc": "Добавляет в каждом разделе рядом со ссылкой «Править» ссылку «Обсудить» по нажатию на которую открывает окно с Disqus для этого раздела" +} diff --git a/i18n/uk.json b/i18n/uk.json new file mode 100644 index 0000000..40aca78 --- /dev/null +++ b/i18n/uk.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Andriykopanytsia" + ] + }, + "sectiondisqus-desc": "Додає кнопку \"Обговорити\" біля кнопки \"Редагувати\" кожного розділу, щоб при натисканні відкривалося спливне вікно Disqus для цього розділу" +} diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json new file mode 100644 index 0000000..61e3519 --- /dev/null +++ b/i18n/zh-hans.json @@ -0,0 +1,8 @@ +{ + "@metadata": { + "authors": [ + "Yfdyh000" + ] + }, + "sectiondisqus-desc": "在每个“编辑”按钮旁添加一个“讨论”按钮,点击则对该章节打开一个Disqus Lightbox" +} -- To view, visit https://gerrit.wikimedia.org/r/123049 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bff02c3abbec04ee1bf2b1748037016a10b9da8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SectionDisqus 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