Remove needless leading dash on Main Page interlanguage links
authorThis, that and the other <at.light@live.com.au>
Wed, 20 Nov 2013 02:57:56 +0000 (13:57 +1100)
committerThis, that and the other <at.light@live.com.au>
Wed, 20 Nov 2013 02:57:56 +0000 (13:57 +1100)
Adds a message "interlanguage-link-title-langonly" with contents "$1",
to allow customization of the tooltip in all circumstances.

Bug: 55865
Change-Id: Icd348919377bac77e27018a44e981028a263c6e1

includes/SkinTemplate.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 0990584..014d514 100644 (file)
@@ -156,10 +156,17 @@ class SkinTemplate extends Skin {
                                        // otherwise we'll end up with the autonym again.
                                        $ilLangLocalName = Language::fetchLanguageName( $ilInterwikiCode, $userLang->getCode() );
 
+                                       if ( $languageLinkTitle->getText() === '' ) {
+                                               $ilTitle = wfMessage( 'interlanguage-link-title-langonly', $ilLangLocalName )->text();
+                                       } else {
+                                               $ilTitle = wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(),
+                                                       $ilLangLocalName )->text();
+                                       }
+
                                        $language_urls[] = array(
                                                'href' => $languageLinkTitle->getFullURL(),
                                                'text' => $ilLangName,
-                                               'title' => wfMessage( 'interlanguage-link-title', $languageLinkTitle->getText(), $ilLangLocalName )->text(),
+                                               'title' => $ilTitle,
                                                'class' => $class,
                                                'lang' => wfBCP47( $ilInterwikiCode ),
                                                'hreflang' => wfBCP47( $ilInterwikiCode ),
index 0766cd2..221ac8c 100644 (file)
@@ -977,6 +977,7 @@ See [[Special:Version|version page]].',
 'sort-descending'              => 'Sort descending',
 'sort-ascending'               => 'Sort ascending',
 'interlanguage-link-title'     => '$1 – $2', # only translate this message to other languages if you have to change it
+'interlanguage-link-title-langonly' => '$1', # only translate this message to other languages if you have to change it
 
 # Short words for each namespace, by default used in the namespace tab in monobook
 'nstab-main'      => 'Page',
index 3c2fdab..13a5692 100644 (file)
@@ -7849,6 +7849,9 @@ See also:
 Format of a sidebar interwiki link tooltip. Parameters:
 * $1 - page name in the target wiki
 * $2 - target wiki language autonym',
+'interlanguage-link-title-langonly' => '{{Optional}}
+Format of a sidebar interwiki link tooltip where the target page name is not available. Parameters:
+* $1 - target wiki language autonym',
 
 # Stylesheets
 'common.css' => '{{optional}}
index 09bd302..137a1b1 100644 (file)
@@ -2721,6 +2721,7 @@ $wgMessageStructure = array(
                'tooltip-preferences-save',
                'tooltip-summary',
                'interlanguage-link-title',
+               'interlanguage-link-title-langonly',
        ),
        'stylesheets' => array(
                'common.css',