Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334764 )

Change subject: Move description to message file
......................................................................

Move description to message file

Added i18n files and banana check

Change-Id: Id5e95700bab8069b53babfcb43b6ff799c7f7b05
---
M .gitignore
A Gruntfile.js
M extension.json
A i18n/en.json
A i18n/qqq.json
A package.json
6 files changed, 48 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RandomImageByCategory 
refs/changes/64/334764/1

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..bc7fca9
--- /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' );
+
+       var conf = grunt.file.readJSON( 'extension.json' );
+       grunt.initConfig( {
+               banana: conf.MessagesDirs,
+               jsonlint: {
+                       all: [
+                               '**/*.json',
+                               '!node_modules/**',
+                               '!vendor/**'
+                       ]
+               }
+       } );
+
+       grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+       grunt.registerTask( 'default', 'test' );
+};
diff --git a/extension.json b/extension.json
index 4a128ce..1d1c96a 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,16 @@
        ],
        "license-name": "GPL-2.0+",
        "url": "https://www.mediawiki.org/wiki/Extension:RandomImageByCategory";,
-       "description": "Displays a random image from a given category",
+       "descriptionmsg": "randomimagebycategory-desc",
        "type": "parserhook",
        "AutoloadClasses": {
                "RandomImageByCategory": "RandomImageByCategory.class.php"
        },
+       "MessagesDirs": {
+               "RandomImageByCategory": [
+                       "i18n"
+               ]
+       },
        "Hooks": {
                "ParserFirstCallInit": [
                        "RandomImageByCategory::registerTag"
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..1e6fe43
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,4 @@
+{
+       "@metadata": {},
+       "randomimagebycategory-desc": "Displays a random image from a given 
category"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..35cb497
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,4 @@
+{
+       "@metadata": {},
+       "randomimagebycategory-desc": 
"{{desc|name=Extension:RandomImageByCategory|url=https://www.mediawiki.org/wiki/Extension:RandomImageByCategory}}";
+}
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/334764
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5e95700bab8069b53babfcb43b6ff799c7f7b05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImageByCategory
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to