jenkins-bot has submitted this change and it was merged.

Change subject: Add npm entry point
......................................................................


Add npm entry point

Change-Id: Ia30ed26cc8195b7761af0391d78b518f776ce3f9
---
A Gruntfile.js
D LoopFunctions.i18n.php
M LoopFunctions.php
A i18n/cs.json
A i18n/en.json
A i18n/fr.json
A i18n/qqq.json
A package.json
8 files changed, 61 insertions(+), 24 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*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/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/LoopFunctions.i18n.php b/LoopFunctions.i18n.php
deleted file mode 100644
index 076c3bd..0000000
--- a/LoopFunctions.i18n.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
-}
-
-$messages = array();
-
-$messages['cs'] = array(
-       'loopfunc_max_loops' => "Byl přesažen maximální povolený počet smyček",
-);
-
-$messages['en'] = array(
-       'loopfunc_description' => 'Provides limited looping functionallity in 
the wikitext',
-       'loopfunc_max_loops' => "Maximum number of allowed loops reached",
-);
-
-$messages['fr'] = array(
-       'loopfunc_description' => 'Fournit quelques fonctionalités de boucles',
-       'loopfunc_max_loops' => "Nombre maximal de boucles atteint",
-);
diff --git a/LoopFunctions.php b/LoopFunctions.php
index e658ab3..1ca6346 100644
--- a/LoopFunctions.php
+++ b/LoopFunctions.php
@@ -22,12 +22,12 @@
        'version' => '1.0.6',
        'descriptionmsg' => 'loopfunc_description',
        'name' => 'LoopFunctions',
-       'url' => 'http://www.mediawiki.org/wiki/Extension:LoopFunctions',
+       'url' => 'https://www.mediawiki.org/wiki/Extension:LoopFunctions',
        'author' => array('Carl Fürstenberg (AzaToth)', 'Matteo Cypriani 
(Xiloynaha)'),
 );
 
-$wgExtensionMessagesFiles['LoopFunctions'] = dirname( __FILE__ ) . 
'/LoopFunctions.i18n.php';
-$wgExtensionMessagesFiles['LoopFunctionsMagic'] = dirname( __FILE__ ) . 
'/LoopFunctions.i18n.magic.php';
+$wgMessagesDirs['LoopFunctions'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['LoopFunctionsMagic'] = __DIR__ . 
'/LoopFunctions.i18n.magic.php';
 
 $wgHooks['ParserFirstCallInit'][] = "ExtLoopFunctions::setup";
 
diff --git a/i18n/cs.json b/i18n/cs.json
new file mode 100644
index 0000000..55f7efa
--- /dev/null
+++ b/i18n/cs.json
@@ -0,0 +1,6 @@
+{
+       "@metadata": {
+               "authors": []
+       },
+       "loopfunc_max_loops": "Byl přesažen maximální povolený počet smyček"
+}
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..c08888e
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,7 @@
+{
+       "@metadata": {
+               "authors": []
+       },
+       "loopfunc_description": "Provides limited looping functionallity in the 
wikitext",
+       "loopfunc_max_loops": "Maximum number of allowed loops reached"
+}
diff --git a/i18n/fr.json b/i18n/fr.json
new file mode 100644
index 0000000..1c63ff7
--- /dev/null
+++ b/i18n/fr.json
@@ -0,0 +1,7 @@
+{
+       "@metadata": {
+               "authors": []
+       },
+       "loopfunc_description": "Fournit quelques fonctionalités de boucles",
+       "loopfunc_max_loops": "Nombre maximal de boucles atteint"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..bb08619
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,7 @@
+{
+       "@metadata": {
+               "authors": []
+       },
+       "loopfunc_description": 
"{{desc|what=extension|name=LoopFunctions|url=https://www.mediawiki.org/wiki/Extension:LoopFunctions}}";,
+       "loopfunc_max_loops": ""
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..5bf4795
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+    "test": "grunt test"
+  },
+  "devDependencies": {
+    "grunt": "0.4.5",
+    "grunt-cli": "0.1.13",
+    "grunt-banana-checker": "0.5.0",
+    "grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia30ed26cc8195b7761af0391d78b518f776ce3f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LoopFunctions
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to