Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/230759

Change subject: Fix namspace problem
......................................................................

Fix namspace problem

This might fix the namspace problem where you have to use include instead
of using $wgExtensionMessagesFiles to load the file.

Change-Id: Ie562d4c10159f0f55daf5993dc6cafccbef4fde3
---
M ProofreadPage.namespaces.php
M ProofreadPage.php
2 files changed, 50 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/59/230759/1

diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index 703488a..fea8661 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -5,12 +5,12 @@
  * @file
  * @ingroup Extensions
  */
+// @codingStandardsIgnoreFile
 
-global $proofreadPageNamespacesNames; //needed in order to be used inside of 
ProofreadPageInit
-$proofreadPageNamespacesNames = array();
+$namespaceNames = array();
 
 /** English (English) */
-$proofreadPageNamespacesNames['en'] = array(
+$namespaceNames['en'] = array(
        'page' => 'Page',
        'page_talk' => 'Page_talk',
        'index' => 'Index',
@@ -18,7 +18,7 @@
 );
 
 /** Arabic (العربية) */
-$proofreadPageNamespacesNames['ar'] = array(
+$namespaceNames['ar'] = array(
        'page' => 'صفحة',
        'page_talk' => 'نقاش_الصفحة',
        'index' => 'فهرس',
@@ -26,7 +26,7 @@
 );
 
 /** Assamese (অসমীয়া) */
-$proofreadPageNamespacesNames['as'] = array(
+$namespaceNames['as'] = array(
        'page' => 'পৃষ্ঠা',
        'page_talk' => 'পৃষ্ঠা_আলোচনা',
        'index' => 'সূচী',
@@ -34,7 +34,7 @@
 );
 
 /** Belarusian (беларуская) */
-$proofreadPageNamespacesNames['be'] = array(
+$namespaceNames['be'] = array(
        'page' => 'Старонка',
        'page_talk' => 'Размовы_пра_старонку',
        'index' => 'Індэкс',
@@ -42,7 +42,7 @@
 );
 
 /** Bengali (বাংলা) */
-$proofreadPageNamespacesNames['bn'] = array(
+$namespaceNames['bn'] = array(
        'page' => 'পাতা',
        'page_talk' => 'পাতা_আলাপ',
        'index' => 'নির্ঘণ্ট',
@@ -50,7 +50,7 @@
 );
 
 /** Breton (brezhoneg) */
-$proofreadPageNamespacesNames['br'] = array(
+$namespaceNames['br'] = array(
        'page' => 'Pajenn',
        'page_talk' => 'Kaozeadenn_pajenn',
        'index' => 'Meneger',
@@ -58,7 +58,7 @@
 );
 
 /** Catalan (català) */
-$proofreadPageNamespacesNames['ca'] = array(
+$namespaceNames['ca'] = array(
        'page' => 'Pàgina',
        'page_talk' => 'Pàgina_Discussió',
        'index' => 'Llibre',
@@ -66,7 +66,7 @@
 );
 
 /** Czech (česky) */
-$proofreadPageNamespacesNames['cs'] = array(
+$namespaceNames['cs'] = array(
        'page' => 'Stránka',
        'page_talk' => 'Diskuse_ke_stránce',
        'index' => 'Index',
@@ -74,7 +74,7 @@
 );
 
 /** Welsh (Cymraeg) */
-$proofreadPageNamespacesNames['cy'] = array(
+$namespaceNames['cy'] = array(
        'page' => 'Tudalen',
        'page_talk' => 'Sgwrs_Tudalen',
        'index' => 'Indecs',
@@ -82,7 +82,7 @@
 );
 
 /** Danish (dansk) */
-$proofreadPageNamespacesNames['da'] = array(
+$namespaceNames['da'] = array(
        'page' => 'Side',
        'page_talk' => 'Sidediskussion',
        'index' => 'Indeks',
@@ -90,7 +90,7 @@
 );
 
 /** German (Deutsch) */
-$proofreadPageNamespacesNames['de'] = array(
+$namespaceNames['de'] = array(
        'page' => 'Seite',
        'page_talk' => 'Seite_Diskussion',
        'index' => 'Index',
@@ -98,7 +98,7 @@
 );
 
 /** Greek (Ελληνικά) */
-$proofreadPageNamespacesNames['el'] = array(
+$namespaceNames['el'] = array(
        'page' => 'Σελίδα',
        'page_talk' => 'Συζήτηση_σελίδας',
        'index' => 'Βιβλίο',
@@ -106,7 +106,7 @@
 );
 
 /** Esperanto (Esperanto) */
-$proofreadPageNamespacesNames['eo'] = array(
+$namespaceNames['eo'] = array(
        'page' => 'Paĝo',
        'page_talk' => 'Paĝo-Diskuto',
        'index' => 'Indekso',
@@ -114,7 +114,7 @@
 );
 
 /** Spanish (español) */
-$proofreadPageNamespacesNames['es'] = array(
+$namespaceNames['es'] = array(
        'page' => 'Página',
        'page_talk' => 'Página_Discusión',
        'index' => 'Índice',
@@ -122,7 +122,7 @@
 );
 
 /** Estonian (eesti) */
-$proofreadPageNamespacesNames['et'] = array(
+$namespaceNames['et'] = array(
        'page' => 'Lehekülg',
        'page_talk' => 'Lehekülje_arutelu',
        'index' => 'Register',
@@ -130,7 +130,7 @@
 );
 
 /** Persian (فارسی) */
-$proofreadPageNamespacesNames['fa'] = array(
+$namespaceNames['fa'] = array(
        'page' => 'برگه',
        'page_talk' => 'گفتگوی برگه',
        'index' => 'فهرست',
@@ -138,7 +138,7 @@
 );
 
 /** Finnish (suomi) */
-$proofreadPageNamespacesNames['fi'] = array(
+$namespaceNames['fi'] = array(
        'page' => 'Sivu',
        'page_talk' => 'Keskustelu_sivusta',
        'index' => 'Hakemisto',
@@ -146,7 +146,7 @@
 );
 
 /** French (Français) */
-$proofreadPageNamespacesNames['fr'] = array(
+$namespaceNames['fr'] = array(
        'page' => 'Page',
        'page_talk' => 'Discussion_Page',
        'index' => 'Livre',
@@ -154,7 +154,7 @@
 );
 
 /** Northern Frisian (Nordfriisk) */
-$proofreadPageNamespacesNames['frr'] = array(
+$namespaceNames['frr'] = array(
        'page' => 'Seite',
        'page_talk' => 'Seite_Diskussion',
        'index' => 'Index',
@@ -162,7 +162,7 @@
 );
 
 /** Gujarati (ગુજરાતી) */
-$proofreadPageNamespacesNames['gu'] = array(
+$namespaceNames['gu'] = array(
        'page' => 'પૃષ્ઠ',
        'page_talk' => 'પૃષ્ઠ_ચર્ચા',
        'index' => 'સૂચિ',
@@ -170,7 +170,7 @@
 );
 
 /** Hebrew (עברית) */
-$proofreadPageNamespacesNames['he'] = array(
+$namespaceNames['he'] = array(
        'page' => 'עמוד',
        'page_talk' => 'שיחת_עמוד',
        'index' => 'מפתח',
@@ -178,7 +178,7 @@
 );
 
 /** Croatian (hrvatski) */
-$proofreadPageNamespacesNames['hr'] = array(
+$namespaceNames['hr'] = array(
        'page' => 'Stranica',
        'page_talk' => 'Razgovor_o_stranici',
        'index' => 'Sadržaj',
@@ -186,7 +186,7 @@
 );
 
 /** Hungarian (magyar) */
-$proofreadPageNamespacesNames['hu'] = array(
+$namespaceNames['hu'] = array(
        'page' => 'Oldal',
        'page_talk' => 'Oldal_vita',
        'index' => 'Index',
@@ -194,7 +194,7 @@
 );
 
 /** Armenian (Հայերեն) */
-$proofreadPageNamespacesNames['hy'] = array(
+$namespaceNames['hy'] = array(
        'page' => 'Էջ',
        'page_talk' => 'Էջի_քննարկում',
        'index' => 'Ինդեքս',
@@ -202,7 +202,7 @@
 );
 
 /** Indonesian (Bahasa Indonesia) */
-$proofreadPageNamespacesNames['id'] = array(
+$namespaceNames['id'] = array(
        'page' => 'Halaman',
        'page_talk' => 'Pembicaraan_Halaman',
        'index' => 'Indeks',
@@ -210,7 +210,7 @@
 );
 
 /** Icelandic (íslenska) */
-$proofreadPageNamespacesNames['is'] = array(
+$namespaceNames['is'] = array(
        'page' => 'Blaðsíða',
        'page_talk' => 'Blaðsíðuspjall',
        'index' => 'Frumrit',
@@ -218,7 +218,7 @@
 );
 
 /** Italian (italiano) */
-$proofreadPageNamespacesNames['it'] = array(
+$namespaceNames['it'] = array(
        'page' => 'Pagina',
        'page_talk' => 'Discussioni_pagina',
        'index' => 'Indice',
@@ -227,7 +227,7 @@
 
 
 /** Kannada (ಕನ್ನಡ) */
-$proofreadPageNamespacesNames['kn'] = array(
+$namespaceNames['kn'] = array(
        'page' => 'ಪುಟ',
        'page_talk' => 'ಪುಟ_ಚರ್ಚೆ',
        'index' => 'ಪರಿವಿಡಿ',
@@ -235,7 +235,7 @@
 );
 
 /** Korean (한국어) */
-$proofreadPageNamespacesNames['ko'] = array(
+$namespaceNames['ko'] = array(
        'page' => '페이지',
        'page_talk' => '페이지토론',
        'index' => '색인',
@@ -243,7 +243,7 @@
 );
 
 /** Latin (Latina) */
-$proofreadPageNamespacesNames['la'] = array(
+$namespaceNames['la'] = array(
        'page' => 'Pagina',
        'page_talk' => 'Disputatio_Paginae',
        'index' => 'Liber',
@@ -251,7 +251,7 @@
 );
 
 /** Malayalam (മലയാളം) */
-$proofreadPageNamespacesNames['ml'] = array(
+$namespaceNames['ml'] = array(
        'page' => 'താൾ',
        'page_talk' => 'താളിന്റെ_സംവാദം',
        'index' => 'സൂചിക',
@@ -259,7 +259,7 @@
 );
 
 /** Marathi (मराठी) */
-$proofreadPageNamespacesNames['mr'] = array(
+$namespaceNames['mr'] = array(
        'page' => 'पान',
        'page_talk' => 'पान_चर्चा',
        'index' => 'अनुक्रमणिका',
@@ -267,7 +267,7 @@
 );
 
 /** Dutch (Nederlands) */
-$proofreadPageNamespacesNames['nl'] = array(
+$namespaceNames['nl'] = array(
        'page' => 'Pagina',
        'page_talk' => 'Overleg_pagina',
        'index' => 'Index',
@@ -275,7 +275,7 @@
 );
 
 /** Norwegian (bokmål)‬ (‪norsk (bokmål)‬) */
-$proofreadPageNamespacesNames['no'] = array(
+$namespaceNames['no'] = array(
        'page' => 'Side',
        'page_talk' => 'Sidediskusjon',
        'index' => 'Indeks',
@@ -283,7 +283,7 @@
 );
 
 /** Oriya (ଓଡ଼ିଆ) */
-$proofreadPageNamespacesNames['or'] = array(
+$namespaceNames['or'] = array(
        'page' => 'ପୃଷ୍ଠା',
        'page_talk' => 'ପୃଷ୍ଠା_ଆଲୋଚନା',
        'index' => 'ସୂଚୀ',
@@ -291,7 +291,7 @@
 );
 
 /** Polish (polski) */
-$proofreadPageNamespacesNames['pl'] = array(
+$namespaceNames['pl'] = array(
        'page' => 'Strona',
        'page_talk' => 'Dyskusja_strony',
        'index' => 'Indeks',
@@ -299,7 +299,7 @@
 );
 
 /** Portuguese (português) */
-$proofreadPageNamespacesNames['pt'] = array(
+$namespaceNames['pt'] = array(
        'page' => 'Página',
        'page_talk' => 'Página_Discussão',
        'index' => 'Galeria',
@@ -307,7 +307,7 @@
 );
 
 /** Romanian (română) */
-$proofreadPageNamespacesNames['ro'] = array(
+$namespaceNames['ro'] = array(
        'page' => 'Pagină',
        'page_talk' => 'Discuție_Pagină',
        'index' => 'Index',
@@ -315,7 +315,7 @@
 );
 
 /** Russian (русский) */
-$proofreadPageNamespacesNames['ru'] = array(
+$namespaceNames['ru'] = array(
        'page' => 'Страница',
        'page_talk' => 'Обсуждение_страницы',
        'index' => 'Индекс',
@@ -323,7 +323,7 @@
 );
 
 /** Sanskrit (संस्कृतम्) */
-$proofreadPageNamespacesNames['sa'] = array(
+$namespaceNames['sa'] = array(
        'page' => 'पुटम्',
        'page_talk' => 'पुटसंवाद',
        'index' => 'अनुक्रमणिका',
@@ -331,7 +331,7 @@
 );
 
 /** Slovenian (slovenščina) */
-$proofreadPageNamespacesNames['sl'] = array(
+$namespaceNames['sl'] = array(
        'page' => 'Stran',
        'page_talk' => 'Pogovor_o_strani',
        'index' => 'Kazalo',
@@ -339,7 +339,7 @@
 );
 
 /** Swedish (svenska) */
-$proofreadPageNamespacesNames['sv'] = array(
+$namespaceNames['sv'] = array(
        'page' => 'Sida',
        'page_talk' => 'Siddiskussion',
        'index' => 'Index',
@@ -347,7 +347,7 @@
 );
 
 /** Telugu (తెలుగు) */
-$proofreadPageNamespacesNames['te'] = array(
+$namespaceNames['te'] = array(
        'page' => 'పుట',
        'page_talk' => 'పుట_చర్చ',
        'index' => 'సూచిక',
@@ -355,7 +355,7 @@
 );
 
 /** Thai (ไทย) */
-$proofreadPageNamespacesNames['th'] = array(
+$namespaceNames['th'] = array(
        'page' => 'หน้า',
        'page_talk' => 'คุยเรื่องหน้า',
        'index' => 'ดัชนี',
@@ -363,7 +363,7 @@
 );
 
 /** Ukrainian (украї́нська) */
-$proofreadPageNamespacesNames['uk'] = array(
+$namespaceNames['uk'] = array(
        'page' => 'Сторінка',
        'page_talk' => 'Обговорення_сторінки',
        'index' => 'Індекс',
@@ -371,7 +371,7 @@
 );
 
 /** vèneto (vèneto) */
-$proofreadPageNamespacesNames['vec'] = array(
+$namespaceNames['vec'] = array(
        'page' => 'Pagina',
        'page_talk' => 'Discussion_pagina',
        'index' => 'Indice',
@@ -379,7 +379,7 @@
 );
 
 /** Vietnamese (Tiếng Việt) */
-$proofreadPageNamespacesNames['vi'] = array(
+$namespaceNames['vi'] = array(
        'page' => 'Trang',
        'page_talk' => 'Thảo_luận_Trang',
        'index' => 'Mục_lục',
diff --git a/ProofreadPage.php b/ProofreadPage.php
index f6bcb44..9e85f11 100644
--- a/ProofreadPage.php
+++ b/ProofreadPage.php
@@ -42,6 +42,7 @@
 $wgMessagesDirs['ProofreadPage'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['ProofreadPage'] = $dir . 'ProofreadPage.i18n.php';
 $wgExtensionMessagesFiles['ProofreadPageAlias'] = $dir . 
'ProofreadPage.alias.php';
+$wgExtensionMessagesFiles['ProofreadPageNamespaces'] = $dir . 
'ProofreadPage.namespaces.php';
 
 $wgAutoloadClasses['ProofreadPage'] = $dir . 'ProofreadPage.body.php';
 $wgAutoloadClasses['ProofreadPage\Context'] = $dir . 'includes/Context.php';
@@ -270,6 +271,3 @@
 
 //Handlers
 $wgContentHandlers[CONTENT_MODEL_PROOFREAD_PAGE] = 
'\ProofreadPage\Page\PageContentHandler';
-
-//inclusion of i18n file. $wgExtensionMessagesFiles[] doesn't works
-include_once( $dir . 'ProofreadPage.namespaces.php' );

-- 
To view, visit https://gerrit.wikimedia.org/r/230759
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie562d4c10159f0f55daf5993dc6cafccbef4fde3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to