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

Change subject: Convert i18n to json format, add npm entry point
......................................................................


Convert i18n to json format, add npm entry point

Change-Id: Ibb74e9166c7cc44636c0f2cea5915943658810cf
---
D CentralLogging.i18n.php
M CentralLogging.php
A Gruntfile.js
A i18n/en.json
A i18n/qqq.json
A package.json
6 files changed, 50 insertions(+), 24 deletions(-)

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



diff --git a/CentralLogging.i18n.php b/CentralLogging.i18n.php
deleted file mode 100644
index 21105f3..0000000
--- a/CentralLogging.i18n.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/**
- * Translations and stuff.
- */
-
-$messages = array();
-
-/** English
- * @author Kunal Mehta
- */
-$messages['en'] = array(
-       'centrallogging-desc' => 'Allows extensions to create log entries on a 
central wiki',
-       'centrallogging-queued-count' => 'Queued log entries',
-);
-
-/** Message documentation (Message documentation)
- * @author Kunal Mehta
- */
-$messages['qqq'] = array(
-       'centrallogging-desc' => 
'{{desc|name=CentralLogging|url=https://www.mediawiki.org/wiki/Extension:CentralLogging}}',
-       'centrallogging-queued-count' => 'Text for row on 
[[Special:Statistics]]',
-);
diff --git a/CentralLogging.php b/CentralLogging.php
index 8fc574b..6201bb4 100644
--- a/CentralLogging.php
+++ b/CentralLogging.php
@@ -30,4 +30,4 @@
 $wgAutoloadClasses['CentralLogFormatter'] = __DIR__ . 
'/CentralLogFormatter.php';
 $wgAutoloadClasses['CentralLogJob'] = __DIR__ . '/CentralLogJob.php';
 $wgJobClasses['centrallogJob'] = 'CentralLogJob';
-$wgExtensionMessagesFiles['CentralLogging'] = __DIR__ . 
'/CentralLogging.i18n.php';
+$wgMessagesDirs['CentralLogging'] = __DIR__ . '/i18n';
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/i18n/en.json b/i18n/en.json
new file mode 100644
index 0000000..3879260
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Kunal Mehta"
+               ]
+       },
+       "centrallogging-desc": "Allows extensions to create log entries on a 
central wiki",
+       "centrallogging-queued-count": "Queued log entries"
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 0000000..2fce97a
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,9 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Kunal Mehta"
+               ]
+       },
+       "centrallogging-desc": 
"{{desc|name=CentralLogging|url=https://www.mediawiki.org/wiki/Extension:CentralLogging}}";,
+       "centrallogging-queued-count": "Text for row on [[Special:Statistics]]"
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..41cecca
--- /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.4.0",
+    "grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb74e9166c7cc44636c0f2cea5915943658810cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralLogging
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