http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95865
Revision: 95865
Author: nikerabbit
Date: 2011-08-31 13:48:03 +0000 (Wed, 31 Aug 2011)
Log Message:
-----------
Protocal relative url fixes to Translate extension
Modified Paths:
--------------
trunk/extensions/Translate/ffs/Gettext.php
Modified: trunk/extensions/Translate/ffs/Gettext.php
===================================================================
--- trunk/extensions/Translate/ffs/Gettext.php 2011-08-31 13:45:06 UTC (rev
95864)
+++ trunk/extensions/Translate/ffs/Gettext.php 2011-08-31 13:48:03 UTC (rev
95865)
@@ -313,6 +313,8 @@
protected function doGettextHeader( MessageCollection $collection,
$template, &$pluralCount ) {
global $wgSitename, $wgServer;
+
+ $server = wfExpandUrl( $wgServer, PROTO_CANONICAL );
$code = $collection->code;
$name = TranslateUtils::getLanguageName( $code );
$native = TranslateUtils::getLanguageName( $code, true );
@@ -334,7 +336,7 @@
$output = trim( $output ) . "\n";
// @todo twn specific
- $portal = Title::makeTitle( NS_PORTAL, $code )->getFullUrl();
+ $portal = Title::makeTitle( NS_PORTAL, $code
)->getCanonicalUrl();
$specs = isset( $template['HEADERS'] ) ? $template['HEADERS'] :
array();
@@ -351,7 +353,7 @@
$specs['Content-Type'] = 'text/plain; charset=UTF-8';
$specs['Content-Transfer-Encoding'] = '8bit';
$specs['X-Generator'] = $this->getGenerator();
- $specs['X-Translation-Project'] = "$wgSitename at $wgServer";
+ $specs['X-Translation-Project'] = "$wgSitename at $server";
$specs['X-Language-Code'] = $code;
if ( $this->offlineMode ) {
$specs['X-Message-Group'] = $this->group->getId();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs