jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334898 )

Change subject: Move description from extension.json to message file
......................................................................


Move description from extension.json to message file

Added i18n files and banana check

Split author list into array

Change-Id: Ib750b899b6b9a5ed2908f5f0102f69ade7f35ed9
---
M .gitignore
A Gruntfile.js
A i18n/en.json
A i18n/qqq.json
M includes/SPM_Initialize.php
A package.json
6 files changed, 48 insertions(+), 3 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index 98b092a..e62fc28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+node_modules/
+vendor/
+
 .svn
 *~
 *.kate-swp
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..a45071e
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,21 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+       grunt.loadNpmTasks( 'grunt-jsonlint' );
+       grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+       grunt.initConfig( {
+               banana: {
+                       all: 'i18n/'
+               },
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..7bf35d5
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,4 @@
+{
+       "@metadata": {},
+       "semanticpagemaker-desc": "Easy wiki page editor for wiki user"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..bad4380
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,4 @@
+{
+       "@metadata": {},
+       "semanticpagemaker-desc": "{{desc|name=SemanticPageMaker}}"
+}
diff --git a/includes/SPM_Initialize.php b/includes/SPM_Initialize.php
index e2846a6..6a91272 100644
--- a/includes/SPM_Initialize.php
+++ b/includes/SPM_Initialize.php
@@ -84,13 +84,15 @@
  */
 function wgSPMSetupExtension() {
        global $wgSPMIP, $wgHooks, $wgExtensionCredits, $wgAvailableRights;
-       global $wgAutoloadClasses, $wgSpecialPages;
+       global $wgAutoloadClasses, $wgSpecialPages, $wgMessagesDirs;
 
        smwfSPMInitMessages();
        if ( !defined( 'WOM_VERSION' ) ) {
                echo wfMessage( 'spm_error_nowom' )->escaped();
                die;
        }
+
+       $wgMessagesDirs['SemanticPageMaker'] = __DIR__ . '/../i18n';
 
        $wgAutoloadClasses['SPMProcessor'] = $wgSPMIP . 
'/includes/SPM_Processor.php';
 
@@ -152,9 +154,9 @@
        // Register Credits
        $wgExtensionCredits['parserhook'][] = array(
        'name' => 'Semantic Page Maker Extension (formerly pulished as 
Wiki Editors Extension)', 'version' => SPM_VERSION,
-                       'author' => "Ning Hu, Justin Zhang, 
[http://smwforum.ontoprise.com/smwforum/index.php/Jesse_Wang Jesse Wang], 
sponsored by [http://projecthalo.com Project Halo], [http://www.vulcan.com 
Vulcan Inc.]",
+                       'author' => array( 'Ning Hu', 'Justin Zhang', 
'[http://smwforum.ontoprise.com/smwforum/index.php/Jesse_Wang Jesse Wang]', 
'sponsored by [http://projecthalo.com Project Halo]', '[http://www.vulcan.com 
Vulcan Inc.]' ),
                        'url' => 'http://wiking.vulcan.com/dev',
-                       'description' => 'Easy Wiki page editor for wiki user.' 
);
+                       'descriptionmsg' => 'semanticpagemaker-desc' );
 
        return true;
 }
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..bcf5b13
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+       "private": true,
+       "scripts": {
+               "test": "grunt test"
+       },
+       "devDependencies": {
+               "grunt": "1.0.1",
+               "grunt-banana-checker": "0.5.0",
+               "grunt-jsonlint": "1.1.0"
+       }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib750b899b6b9a5ed2908f5f0102f69ade7f35ed9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/SemanticPageMaker
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to