From 1839d8ecea63ff22e5bd53a5a3648974333be00d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 5 Sep 2014 15:54:14 +0200 Subject: [PATCH] Article: Localize alt text of redirect icon Change-Id: If0632c51d878d4a18a881eb0b58e8c1857f6d020 --- includes/page/Article.php | 4 +++- languages/i18n/en.json | 1 + languages/i18n/qqq.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/page/Article.php b/includes/page/Article.php index dab075e8cc..71350ac783 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1531,9 +1531,11 @@ class Article implements Page { } } + $redirectToText = wfMessage( 'redirectto' )->inLanguage( $lang )->text(); + $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; return '
' . - Html::element( 'img', array( 'src' => $imageUrl, 'alt' => '#REDIRECT' ) ) . + Html::element( 'img', array( 'src' => $imageUrl, 'alt' => $redirectToText ) ) . '' . $link . '
'; } diff --git a/languages/i18n/en.json b/languages/i18n/en.json index db1325c1b0..9392b13a2d 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -208,6 +208,7 @@ "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}}.", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index bef8ee078d..590fee44a4 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -370,6 +370,7 @@ "otherlanguages": "This message is shown under the toolbox. It is used if there are interwiki links added to the page, like [[en:Interwiki article]].\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", -- 2.20.1