Article: Localize alt text of redirect icon
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Sep 2014 13:54:14 +0000 (15:54 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Sep 2014 14:14:17 +0000 (16:14 +0200)
Change-Id: If0632c51d878d4a18a881eb0b58e8c1857f6d020

includes/page/Article.php
languages/i18n/en.json
languages/i18n/qqq.json

index dab075e..71350ac 100644 (file)
@@ -1531,9 +1531,11 @@ class Article implements Page {
                        }
                }
 
+               $redirectToText = wfMessage( 'redirectto' )->inLanguage( $lang )->text();
+
                $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png';
                return '<div class="redirectMsg">' .
-                       Html::element( 'img', array( 'src' => $imageUrl, 'alt' => '#REDIRECT' ) ) .
+                       Html::element( 'img', array( 'src' => $imageUrl, 'alt' => $redirectToText ) ) .
                        '<span class="redirectText">' . $link . '</span></div>';
        }
 
index db1325c..9392b13 100644 (file)
        "otherlanguages": "In other languages",
        "redirectedfrom": "(Redirected from $1)",
        "redirectpagesub": "Redirect page",
+       "redirectto": "Redirect to:",
        "talkpageheader": "-",
        "lastmodifiedat": "This page was last modified on $1, at $2.",
        "viewcount": "This page has been accessed {{PLURAL:$1|once|$1 times}}.",
index bef8ee0..590fee4 100644 (file)
        "otherlanguages": "This message is shown under the toolbox. It is used if there are interwiki links added to the page, like <code><nowiki>[[</nowiki>en:Interwiki article]]</code>.\n{{Identical|Otherlanguages}}",
        "redirectedfrom": "The text displayed when a certain page is redirected to another page. Parameters:\n* $1 - the name of the page user came from",
        "redirectpagesub": "Displayed under the page title of a page which is a redirect to another page, see [{{fullurl:Project:Translators|redirect=no}} Project:Translators] for example.\n\n{{Identical|Redirect page}}",
+       "redirectto": "Alt text of the arrow icon shown on redirect pages ([[commons:File:Sample redirect page.jpg]]).\n\n{{Identical|Redirect page}}",
        "talkpageheader": "{{notranslate}}",
        "lastmodifiedat": "This message is shown below each page, in the footer with the logos and links.\n\nParameters:\n* $1 - date\n* $2 - time\nSee also:\n* {{msg-mw|Lastmodifiedatby}}",
        "viewcount": "Used as page-view counter. Parameters:\n* $1 - number of pageviews",