http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70998

Revision: 70998
Author:   siebrand
Date:     2010-08-12 22:40:53 +0000 (Thu, 12 Aug 2010)

Log Message:
-----------
* Update ShapadoJsFFS::header()
* Remove part of JavaScriptFFS::authorsList() that does not belong there

Modified Paths:
--------------
    trunk/extensions/Translate/FFS.php

Modified: trunk/extensions/Translate/FFS.php
===================================================================
--- trunk/extensions/Translate/FFS.php  2010-08-12 22:22:52 UTC (rev 70997)
+++ trunk/extensions/Translate/FFS.php  2010-08-12 22:40:53 UTC (rev 70998)
@@ -481,7 +481,7 @@
                foreach ( $authors as $author ) {
                        $authorsList .= " *  - $author\n";
                }
-               return "/* Translators:\n$authorsList */\n\n";
+               return " * Translators:\n$authorsList\n";
        }
 
        protected static function unescapeJsString( $string ) {
@@ -555,8 +555,21 @@
        }
 
        protected function header( $code, $authors ) {
+               global $wgSitename;
+
+               $code = $collection->code;
+               $name = TranslateUtils::getLanguageName( $code );
+               $native = TranslateUtils::getLanguageName( $code, true );
                $authorsList = $this->authorsList( $authors );
-               return "{$authorsList}var I18n = {\n\n";
+
+               return <<<EOT
+/** Messages for $name ($native)
+ *  Exported from $wgSitename
+ *
+{$authorsList}
+ */
+var I18n = {
+EOT;
        }
 
        protected function footer() {



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

Reply via email to