Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8424
bug32483-iwlangattr.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:59 PM
2014-11-21 23:59:38 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bug32483-iwlangattr.patch
View Options
Index: SkinTemplate.php
===================================================================
--- SkinTemplate.php (revision 104876)
+++ SkinTemplate.php (working copy)
@@ -430,20 +430,25 @@
$language_urls = array();
if ( !$wgHideInterlanguageLinks ) {
+ global $wgDummyLanguageCodes;
foreach( $out->getLanguageLinks() as $l ) {
$tmp = explode( ':', $l, 2 );
$class = 'interwiki-' . $tmp[0];
unset( $tmp );
$nt = Title::newFromText( $l );
if ( $nt ) {
+ $iwLangAttr = $nt->getInterwiki();
+ if( isset( $wgDummyLanguageCodes[$iwLangAttr] ) ) {
+ $iwLangAttr = $wgDummyLanguageCodes[$iwLangAttr];
+ }
$language_urls[] = array(
'href' => $nt->getFullURL(),
'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' ?
$wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ),
'title' => $nt->getText(),
'class' => $class,
- 'lang' => $nt->getInterwiki(),
- 'hreflang' => $nt->getInterwiki(),
+ 'lang' => $iwLangAttr,
+ 'hreflang' => $iwLangAttr,
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7945
Default Alt Text
bug32483-iwlangattr.patch (1 KB)
Attached To
Mode
T34483: Output valid language codes in interwikis HTML rather than lang="simple"
Attached
Detach File
Event Timeline
Log In to Comment