Raimond Spekking has uploaded a new change for review.

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


Change subject: Add i18n files
......................................................................

Add i18n files

Consistency tweaks
* Kill trailing spaces
* Kill ?>

Change-Id: Ibab64c8073b74bb3f998f567451b2dd96cb90399
---
A Sarcasm.i18n.php
M sarcasm.php
2 files changed, 33 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Sarcasm 
refs/changes/63/67963/1

diff --git a/Sarcasm.i18n.php b/Sarcasm.i18n.php
new file mode 100644
index 0000000..68f3546
--- /dev/null
+++ b/Sarcasm.i18n.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Internationalisation file for extension Sarcasm.
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ * @author Inquisitor Ehrenstein
+ */
+$messages['en'] = array(
+       'sarcasm-desc' => 'Adds <code>&lt;sarcasm></code> tag in order to more 
clearly show sarcasm in text',
+);
+
+/** Message documentation (Message documentation)
+ * @author Raimond Spekking
+ */
+$messages['qqq'] = array(
+       'sarcasm-desc' => 
'{{desc|name=Sarcasm|url=https://www.mediawiki.org/wiki/Extension:Sarcasm}}',
+);
diff --git a/sarcasm.php b/sarcasm.php
index b554bfb..56521b1 100644
--- a/sarcasm.php
+++ b/sarcasm.php
@@ -20,21 +20,24 @@
         echo( "This is an extension to the MediaWiki package and cannot be run 
standalone.\n" );
         die( -1 );
 }
- 
-// Extension credits that will show up on Special:Version    
+
+// Extension credits that will show up on Special:Version
 $wgExtensionCredits['other'][] = array(
         'path'           => __FILE__,
         'name'           => 'Sarcasm',
         'version'        => '1.0',
-        'author'         => '[http://sturmkrieg.de/User:Inquisitor_Ehrenstein 
Inquisitor Ehrenstein]', 
+        'author'         => '[http://sturmkrieg.de/User:Inquisitor_Ehrenstein 
Inquisitor Ehrenstein]',
         'url'            => 'https://www.mediawiki.org/wiki/Extension:Sarcasm',
-        'descriptionmsg' => 'This extension adds sarcasm tags to the wiki in 
order to more clearly show sarcasm in text.',
-        'description'    => 'This extension adds sarcasm tags to the wiki.'
+        'descriptionmsg' => 'sarcasm-desc',
 );
 
+$dir = __DIR__;
+
+// Register files
+$wgExtensionMessagesFiles['Sarcasm'] = $dir . '/Sarcasm.i18n.php';
 
 $wgHooks['ParserFirstCallInit'][] = 'wfSarcasmParserInit';
- 
+
 // Hook our callback function into the parser
 function wfSarcasmParserInit( Parser $parser ) {
         // When the parser sees the <sample> tag, it executes 
@@ -50,6 +53,4 @@
 function wfSarcasmRender( $text, array $args, Parser $parser, PPFrame $frame ) 
{
         $output = $parser->recursiveTagParse( $text, $frame );
         return '<span class="sarcasm">' . $output . '</span>';
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibab64c8073b74bb3f998f567451b2dd96cb90399
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sarcasm
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking <raimond.spekk...@gmail.com>

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

Reply via email to