jenkins-bot has submitted this change and it was merged.
Change subject: Mouseover explanations for interlanguage links in native
language
......................................................................
Mouseover explanations for interlanguage links in native language
Adds a language name in User's language from CLDR
to an interwiki 'title' attribute. Believed to be
RTL-compilant.
New message added: tooltip-iwiki, added to $preloadedMessages
Bug: 5231
Change-Id: I3dcb00cdc28a10711b6703fa509b8b8d06e325a2
---
M includes/SkinTemplate.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
4 files changed, 12 insertions(+), 1 deletion(-)
Approvals:
Brion VIBBER: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index ccfb3db..d968d79 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -131,6 +131,7 @@
public function getLanguages() {
global $wgHideInterlanguageLinks;
$out = $this->getOutput();
+ $userLang = $this->getLanguage();
# Language links
$language_urls = array();
@@ -151,10 +152,14 @@
$ilLangName =
$this->formatLanguageName( $ilLangName );
}
+ // CLDR extension or similar is
required to localize the language name;
+ // otherwise we'll end up with the
autonym again.
+ $ilLangLocalName =
Language::fetchLanguageName( $ilInterwikiCode, $userLang->getCode() );
+
$language_urls[] = array(
'href' =>
$languageLinkTitle->getFullURL(),
'text' => $ilLangName,
- 'title' =>
$languageLinkTitle->getText(),
+ 'title' => wfMessage(
'tooltip-iwiki', $languageLinkTitle->getText(), $ilLangLocalName )->escaped(),
'class' => $class,
'lang' => wfBCP47(
$ilInterwikiCode ),
'hreflang' => wfBCP47(
$ilInterwikiCode ),
diff --git a/languages/messages/MessagesEn.php
b/languages/messages/MessagesEn.php
index 225a6b2..e4d0651 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -551,6 +551,7 @@
'editsectionhint',
'help',
'helppage',
+ 'tooltip-iwiki',
'jumpto',
'jumptonavigation',
'jumptosearch',
@@ -972,6 +973,7 @@
'red-link-title' => '$1 (page does not exist)',
'sort-descending' => 'Sort descending',
'sort-ascending' => 'Sort ascending',
+'tooltip-iwiki' => '$1 – $2', # 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',
diff --git a/languages/messages/MessagesQqq.php
b/languages/messages/MessagesQqq.php
index da14d70..304d9d3 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -962,6 +962,9 @@
* $1 - page title',
'sort-descending' => 'JavaScript message. Used by sortable table script.',
'sort-ascending' => 'JavaScript message. Used by sortable table script.',
+'tooltip-iwiki' => 'Format of a sidebar interwiki link tooltip. Parameters:
+* $1 - Page name in the target wiki
+* $2 - Target wiki language autonym',
# Short words for each namespace, by default used in the namespace tab in
monobook
'nstab-main' => 'The name for the tab of the main namespace. Example:
[[Example]]
diff --git a/maintenance/language/messages.inc
b/maintenance/language/messages.inc
index 43be195..0e9cfef 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2726,6 +2726,7 @@
'tooltip-undo',
'tooltip-preferences-save',
'tooltip-summary',
+ 'tooltip-iwiki',
),
'stylesheets' => array(
'common.css',
--
To view, visit https://gerrit.wikimedia.org/r/35871
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3dcb00cdc28a10711b6703fa509b8b8d06e325a2
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Wizardist <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Waldir <[email protected]>
Gerrit-Reviewer: Wizardist <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits