Paladox has uploaded a new change for review.

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

Change subject: Sync extension.json with CodeEditor.php and empty php entry 
point
......................................................................

Sync extension.json with CodeEditor.php and empty php entry point

Change-Id: I4e27986911bc73a1247f9e3f0127797fc560df1c
---
M CodeEditor.php
M extension.json
M i18n/de.json
M i18n/ksh.json
M i18n/mk.json
M i18n/pl.json
M i18n/qqq.json
M i18n/tr.json
M i18n/uk.json
M i18n/zh-hans.json
10 files changed, 71 insertions(+), 124 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor 
refs/changes/43/214043/1

diff --git a/CodeEditor.php b/CodeEditor.php
index d52cfb4..ea9a1f9 100644
--- a/CodeEditor.php
+++ b/CodeEditor.php
@@ -15,114 +15,15 @@
  * See https://www.mediawiki.org/wiki/Manual:Extension_registration for more 
details.
  */
 
-$wgExtensionCredits['other'][] = array(
-       'path' => __FILE__,
-       'name' => 'CodeEditor',
-       'url' => 'https://www.mediawiki.org/wiki/Extension:CodeEditor',
-       'author' => array( 'Brion Vibber', 'Derk-Jan Hartman', 'authors of Ace 
(ajax.org)' ),
-       'descriptionmsg' => 'codeeditor-desc',
-);
-
-$wgAutoloadClasses['CodeEditorHooks'] = __DIR__ . '/CodeEditor.hooks.php';
-$wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['CodeEditor'] = __DIR__ . '/CodeEditor.i18n.php';
-
-$wgHooks['EditPage::showEditForm:initial'][] = 
'CodeEditorHooks::editPageShowEditFormInitial';
-$wgHooks['EditPage::showReadOnlyForm:initial'][] = 
'CodeEditorHooks::editPageShowEditFormInitial';
-$wgHooks['BeforePageDisplay'][] = 'CodeEditorHooks::onBeforePageDisplay';
-$wgHooks['MakeGlobalVariablesScript'][] = 
'CodeEditorHooks::onMakeGlobalVariablesScript';
-$wgHooks['GetPreferences'][] = 'CodeEditorHooks::getPreferences';
-
-$tpl = array(
-       'localBasePath' => __DIR__ . '/modules',
-       'remoteExtPath' => 'CodeEditor/modules',
-       'group' => 'ext.wikiEditor',
-);
-
-$wgResourceModules['ext.codeEditor'] = array(
-       'scripts' => 'ext.codeEditor.js',
-       'dependencies' => array(
-               'ext.wikiEditor.toolbar',
-               'jquery.codeEditor'
-       ),
-) + $tpl;
-
-$wgResourceModules['jquery.codeEditor'] = array(
-       'scripts' => 'jquery.codeEditor.js',
-       'styles' => 'jquery.codeEditor.css',
-       'dependencies' => array(
-               'jquery.wikiEditor',
-               'ext.codeEditor.ace',
-               'jquery.ui.resizable',
-               'mediawiki.api',
-               'user.options',
-               'mediawiki.cookie',
-       ),
-       'messages' => array(
-               'codeeditor-next-annotation',
-               'codeeditor-toolbar-toggle',
-               'codeeditor-save-with-errors',
-               'codeeditor-invisibleChars-toggle',
-               'codeeditor-lineWrapping-toggle',
-               'codeeditor-searchReplace-toggle',
-               'codeeditor-gotoline',
-               'codeeditor-indent',
-               'codeeditor-outdent',
-       )
-) + $tpl;
-
-// Minimal bundling of a couple bits of Ace
-$wgResourceModules['ext.codeEditor.ace'] = array(
-       'group' => 'ext.codeEditor.ace',
-       'scripts' => array(
-               'ace/ace.js',
-               'ace/mode-javascript.js',
-               'ace/mode-json.js',
-               'ace/mode-css.js',
-               'ace/mode-lua.js',
-               'ace/ext-language_tools.js',
-       ),
-) + $tpl;
-
-// Extra highlighting modes to match some available GeSHi highlighting 
languages
-$wgResourceModules['ext.codeEditor.ace.modes'] = array(
-       'group' => 'ext.codeEditor.ace',
-       'scripts' => array(
-               'ace/mode-c_cpp.js',
-               'ace/mode-clojure.js',
-               'ace/mode-csharp.js',
-               'ace/mode-coffee.js',
-               'ace/mode-groovy.js',
-               'ace/mode-html.js',
-               'ace/mode-java.js',
-               'ace/mode-ocaml.js',
-               'ace/mode-perl.js',
-               'ace/mode-php.js',
-               'ace/mode-python.js',
-               'ace/mode-ruby.js',
-               'ace/mode-scala.js',
-       ),
-       'dependencies' => 'ext.codeEditor.ace',
-) + $tpl;
-
-// Helper to add inline [edit] links to <source> sections
-$wgResourceModules['ext.codeEditor.geshi'] = array(
-       'scripts' => array(
-               'ext.codeEditor.geshi.js'
-       ),
-       'styles' => array(
-               'ext.codeEditor.geshi.css'
-       ),
-       'messages' => array(
-               'editsection',
-               'savearticle'
-       ),
-       'dependencies' => 'mediawiki.api.parse',
-) + $tpl;
-
-// Experimental feature; not ready yet.
-$wgCodeEditorGeshiIntegration = false;
-
-// If this is disabled, CodeEditor will only be available for client-side code
-// and extensions, it won't be enabled for standard CSS and JS pages.
-$wgCodeEditorEnableCore = true;
+if ( function_exists( 'wfLoadExtension' ) ) {
+       wfLoadExtension( 'CodeEditor' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
+       /* wfWarn(
+               'Deprecated PHP entry point used for CodeEditor extension. 
Please use wfLoadExtension instead, ' .
+               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+       ); */
+       return;
+} else {
+       die( 'This version of the CodeEditor extension requires MediaWiki 
1.25+' );
+}
diff --git a/extension.json b/extension.json
index 1004594..d80c272 100644
--- a/extension.json
+++ b/extension.json
@@ -51,11 +51,19 @@
                                "ext.codeEditor.ace",
                                "jquery.ui.resizable",
                                "mediawiki.api",
-                               "user.options"
+                               "user.options",
+                               "mediawiki.cookie"
                        ],
                        "messages": [
+                               "codeeditor-next-annotation",
                                "codeeditor-toolbar-toggle",
-                               "codeeditor-save-with-errors"
+                               "codeeditor-save-with-errors",
+                               "codeeditor-invisibleChars-toggle",
+                               "codeeditor-lineWrapping-toggle",
+                               "codeeditor-searchReplace-toggle",
+                               "codeeditor-gotoline",
+                               "codeeditor-indent",
+                               "codeeditor-outdent"
                        ],
                        "group": "ext.wikiEditor"
                },
diff --git a/i18n/de.json b/i18n/de.json
index d80e4e9..ddc909a 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -8,5 +8,11 @@
        "codeeditor-desc": "Ermöglicht das Bearbeiten von JavaScript und CSS 
mit Syntaxhervorhebung mithilfe des [http://ace.ajax.org/ Ace-Editors]",
        "codeeditor-next-annotation": "Zur nächsten Anmerkung gehen",
        "codeeditor-toolbar-toggle": "Codeeditor ein- und ausschalten",
-       "codeeditor-save-with-errors": "Das Dokument enthält Fehler. Möchtest 
du wirklich speichern?"
+       "codeeditor-save-with-errors": "Das Dokument enthält Fehler. Möchtest 
du wirklich speichern?",
+       "codeeditor-invisibleChars-toggle": "Unsichtbare Zeichen umschalten",
+       "codeeditor-lineWrapping-toggle": "Zeilenumbruch umschalten",
+       "codeeditor-searchReplace-toggle": "Suchen-und-Ersetzen-Dialog 
umschalten",
+       "codeeditor-gotoline": "Gehe zu Zeilennummer …",
+       "codeeditor-indent": "Einrücken",
+       "codeeditor-outdent": "Ausrücken"
 }
diff --git a/i18n/ksh.json b/i18n/ksh.json
index d7ccdf7..80c380c 100644
--- a/i18n/ksh.json
+++ b/i18n/ksh.json
@@ -6,5 +6,11 @@
        },
        "codeeditor-desc": "JavaSkrep- un <i lang=\"en\">CSS</i>-Sigge mem <i 
lang=\"en\">[http://ace.ajax.org/ Ace Editor]</i> beärbeide, woh de Syntax 
bunnt aanjemohld es.",
        "codeeditor-toolbar-toggle": "Et Kood-Beärbeide ömschallde",
-       "codeeditor-save-with-errors": "Heh sen Fähler dren. Wells De dat 
trozdämm faßjehallde han?"
+       "codeeditor-save-with-errors": "Heh sen Fähler dren. Wells De dat 
trozdämm faßjehallde han?",
+       "codeeditor-invisibleChars-toggle": "donn de jewöhnlesch onseeschbaa 
Zeijsche ömschallde zwesche seeschbaa jemaad un onseeschbaa",
+       "codeeditor-lineWrapping-toggle": "Der Ömbruch noh Reihje ömmschallde 
<!--  
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Codeeditor-lineWrapping-toggle/ksh
 -->",
+       "codeeditor-searchReplace-toggle": "Ömschallde zwesche „Ennföhje“ un 
„Ußtuusche“",
+       "codeeditor-gotoline": "Jangk noh dä reih met dä Nommer …",
+       "codeeditor-indent": "Ennröke",
+       "codeeditor-outdent": "Ußröke"
 }
diff --git a/i18n/mk.json b/i18n/mk.json
index 3773d38..7d96dd9 100644
--- a/i18n/mk.json
+++ b/i18n/mk.json
@@ -5,6 +5,13 @@
                ]
        },
        "codeeditor-desc": "Уредување со истакната синтакса за JavaScript и 
каскадни стилски страници (CSS) користејќи го уредникот [http://ace.ajax.org/ 
Ace]",
+       "codeeditor-next-annotation": "Оди на следната прибелешка",
        "codeeditor-toolbar-toggle": "Префрли на уредникот на кодот",
-       "codeeditor-save-with-errors": "Документот содржи грешки. Сигурно 
сакате да го зачувате?"
+       "codeeditor-save-with-errors": "Документот содржи грешки. Сигурно 
сакате да го зачувате?",
+       "codeeditor-invisibleChars-toggle": "Вкл/искл. невидливи знаци",
+       "codeeditor-lineWrapping-toggle": "Вкл/искл. прелом",
+       "codeeditor-searchReplace-toggle": "Вкл./искл. дијалог за пребарување и 
замена",
+       "codeeditor-gotoline": "Оди на ред број...",
+       "codeeditor-indent": "Вовлекување",
+       "codeeditor-outdent": "Отстап"
 }
diff --git a/i18n/pl.json b/i18n/pl.json
index 9021b9f..c627f8a 100644
--- a/i18n/pl.json
+++ b/i18n/pl.json
@@ -9,5 +9,6 @@
        },
        "codeeditor-desc": "Edytowanie stron z kolorowaniem składni JavaScript 
oraz CSS z użyciem [http://ace.ajax.org/ edytora Ace]",
        "codeeditor-toolbar-toggle": "Przełącz edytor kodu",
-       "codeeditor-save-with-errors": "Dokument zawiera błędy. Czy na pewno 
chcesz zapisać?"
+       "codeeditor-save-with-errors": "Dokument zawiera błędy. Czy na pewno 
chcesz zapisać?",
+       "codeeditor-gotoline": "Przejdź do linii numer..."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 567542e..9334f10 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -13,7 +13,7 @@
        "codeeditor-save-with-errors": "Used as message in a dialog before 
saving a document with errors.",
        "codeeditor-invisibleChars-toggle": "Used as label for toolbar button 
to show/hide non visible characters",
        "codeeditor-lineWrapping-toggle": "Used as label for toolbar button to 
enable/disable line wrapping",
-       "codeeditor-searchReplace-toggle" : "Used as label for toolbar button 
to show/hide the search and replace dialog",
+       "codeeditor-searchReplace-toggle": "Used as label for toolbar button to 
show/hide the search and replace dialog",
        "codeeditor-gotoline": "Used as a label for toolbar button to navigate 
to a line number in the editor",
        "codeeditor-indent": "Used as a label for toolbar button to indent text 
in the editor",
        "codeeditor-outdent": "Used as a label for toolbar button to outdent 
text in the editor"
diff --git a/i18n/tr.json b/i18n/tr.json
index 68b6933..01ac38d 100644
--- a/i18n/tr.json
+++ b/i18n/tr.json
@@ -2,10 +2,12 @@
        "@metadata": {
                "authors": [
                        "Joseph",
-                       "Ömer Berkay"
+                       "Ömer Berkay",
+                       "Demircimehmed"
                ]
        },
        "codeeditor-desc": "JavaScript ve CSS sayfaları için 
[http://ace.ajax.org/ Ace editör] kullanarak sözdizimi-vurgulu düzenleme",
        "codeeditor-toolbar-toggle": "Kod editörünü değiştir",
-       "codeeditor-save-with-errors": "Belge hata içermekte. Kaydetmek 
istediğinizden emin misiniz?"
+       "codeeditor-save-with-errors": "Belge hata içermekte. Kaydetmek 
istediğinizden emin misiniz?",
+       "codeeditor-lineWrapping-toggle": "Satır kaydırmasına geçiş."
 }
diff --git a/i18n/uk.json b/i18n/uk.json
index 7959242..a038074 100644
--- a/i18n/uk.json
+++ b/i18n/uk.json
@@ -3,10 +3,18 @@
                "authors": [
                        "Base",
                        "Sodmy",
-                       "Andriykopanytsia"
+                       "Andriykopanytsia",
+                       "Ата"
                ]
        },
        "codeeditor-desc": "Редагування із підсвіткою синтаксиса для JavaScript 
та CSS сторінок за допомогою [http://ace.ajax.org/ редактора Ace]",
+       "codeeditor-next-annotation": "Перейти до наступної анотації",
        "codeeditor-toolbar-toggle": "Перемкнути редактор коду",
-       "codeeditor-save-with-errors": "Документ містить помилки. Ви впевнені, 
що ви хочете зберегти?"
+       "codeeditor-save-with-errors": "Документ містить помилки. Ви впевнені, 
що ви хочете зберегти?",
+       "codeeditor-invisibleChars-toggle": "Перемкнути невидимі символи",
+       "codeeditor-lineWrapping-toggle": "Перемкнути перенесення рядка",
+       "codeeditor-searchReplace-toggle": "Перемкнути діалог пошуку і заміни",
+       "codeeditor-gotoline": "Перейти до рядка номер…",
+       "codeeditor-indent": "Відступ",
+       "codeeditor-outdent": "Зменшити відступ"
 }
diff --git a/i18n/zh-hans.json b/i18n/zh-hans.json
index a211688..efc5606 100644
--- a/i18n/zh-hans.json
+++ b/i18n/zh-hans.json
@@ -3,10 +3,18 @@
                "authors": [
                        "Liangent",
                        "PhiLiP",
-                       "Liuxinyu970226"
+                       "Liuxinyu970226",
+                       "Northteam"
                ]
        },
        "codeeditor-desc": "使用[http://ace.ajax.org/ 
Ace编辑器]实现编辑JavaScript和CSS页面时的语法高亮功能",
+       "codeeditor-next-annotation": "前往下一注释",
        "codeeditor-toolbar-toggle": "切换代码编辑器",
-       "codeeditor-save-with-errors": "文档包含错误。您确定要保存吗?"
+       "codeeditor-save-with-errors": "文档包含错误。您确定要保存吗?",
+       "codeeditor-invisibleChars-toggle": "显示或隐藏不可见字符",
+       "codeeditor-lineWrapping-toggle": "显示或隐藏断行符",
+       "codeeditor-searchReplace-toggle": "显示或隐藏搜索并替换的对话框",
+       "codeeditor-gotoline": "跳转到指定行...",
+       "codeeditor-indent": "缩进",
+       "codeeditor-outdent": "减少缩进"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e27986911bc73a1247f9e3f0127797fc560df1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to