r104906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104905‎ | r104906 | r104907 >
Date:22:36, 1 December 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
Titles per project, so the project names can be localized as well. Also use protocol-relative URLs to multilingual projects, and to the extension page.
Modified paths:
  • /trunk/extensions/WikimediaIncubator/InfoPage.i18n.php (modified) (history)
  • /trunk/extensions/WikimediaIncubator/InfoPage.php (modified) (history)
  • /trunk/extensions/WikimediaIncubator/WikimediaIncubator.php (modified) (history)
  • /trunk/translatewiki/MediaWiki/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/translatewiki/MediaWiki/mediawiki-defines.txt
@@ -1810,7 +1810,6 @@
18111811 Wikimedia Incubator Info Page
18121812 descmsg = wminc-desc
18131813 file = WikimediaIncubator/InfoPage.i18n.php
1814 -optional = wminc-infopage-title
18151814 ignored = wminc-logo-wikipedia, wminc-logo-wiktionary, wminc-logo-wikibooks, wminc-logo-wikinews
18161815 ignored = wminc-logo-wikiquote, wminc-logo-wikisource, wminc-logo-wikiversity, wminc-logo-meta-wiki
18171816 ignored = wminc-logo-wikimedia-commons, wminc-logo-wikispecies, wminc-logo-mediawiki
Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php
@@ -17,7 +17,7 @@
1818 'name' => 'Wikimedia Incubator',
1919 'author' => 'SPQRobin',
2020 'version' => '4.5',
21 - 'url' => 'http://www.mediawiki.org/wiki/Extension:WikimediaIncubator',
 21+ 'url' => '//www.mediawiki.org/wiki/Extension:WikimediaIncubator',
2222 'descriptionmsg' => 'wminc-desc',
2323 );
2424
Index: trunk/extensions/WikimediaIncubator/InfoPage.i18n.php
@@ -25,7 +25,13 @@
2626 'wminc-logo-wikispecies' => 'WikiSpecies.svg', # only translate if necessary
2727 'wminc-logo-mediawiki' => 'MediaWiki.svg', # only translate if necessary
2828 'wminc-manual-url' => 'Help:Manual', # only translate if necessary
29 - 'wminc-infopage-title' => '$1 $2', # only translate if necessary
 29+ 'wminc-infopage-title-p' => 'Wikipedia $1',
 30+ 'wminc-infopage-title-b' => 'Wikibooks $1',
 31+ 'wminc-infopage-title-t' => 'Wiktionary $1',
 32+ 'wminc-infopage-title-q' => 'Wikiquote $1',
 33+ 'wminc-infopage-title-n' => 'Wikinews $1',
 34+ 'wminc-infopage-title-s' => 'Wikisource $1',
 35+ 'wminc-infopage-title-v' => 'Wikiversity $1',
3036 'wminc-infopage-welcome' => 'Welcome to the Wikimedia Incubator, a project of the Wikimedia Foundation ([[{{MediaWiki:Aboutpage}}|About]])',
3137
3238 'wminc-infopage-missingwiki-text' => 'A $1 in this language does not yet exist.',
@@ -55,10 +61,13 @@
5662 */
5763 $messages['qqq'] = array(
5864 'wminc-infopage-enter' => 'Text of a link to the Main Page of a test wiki at Incubator.',
59 - 'wminc-infopage-title' => '{{optional}}
60 -* $1 is the project, e.g. "Wikipedia" or "Wiktionary"
61 -* $2 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.
62 -Here you can change the title as it appears on e.g. http://incubator.wikimedia.org/wiki/Wn/en. You can change it to e.g. "$1 in $2".',
 65+ 'wminc-infopage-title-p' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 66+ 'wminc-infopage-title-b' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 67+ 'wminc-infopage-title-t' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 68+ 'wminc-infopage-title-q' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 69+ 'wminc-infopage-title-n' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 70+ 'wminc-infopage-title-s' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
 71+ 'wminc-infopage-title-v' => 'This is the main title of the info page. $1 is the language name from CLDR, i.e. it takes the name in your language if available. Otherwise, it\'s in English.',
6372 'wminc-infopage-welcome' => 'Do not change <tt><nowiki>{{MediaWiki:Aboutpage}}</nowiki></tt>.',
6473 'wminc-infopage-missingwiki-text' => "'''$1''' is a project: Wikipedia/Wiktionary/...",
6574 'wminc-infopage-option-startwiki' => 'Do not change <code><nowiki>{{fullurl:{{FULLPAGENAME}}|action=edit}}</nowiki></code> or <code><nowiki>{{MediaWiki:Wminc-manual-url}}</nowiki></code>',
Index: trunk/extensions/WikimediaIncubator/InfoPage.php
@@ -39,7 +39,7 @@
4040 $this->mLangNames = IncubatorTest::getLanguageNames();
4141 $this->mLangName = ( isset( $this->mLangNames[$this->mLangCode] ) ?
4242 $this->mLangNames[$this->mLangCode] : wfMsg( 'wminc-unknownlang', $this->mLangCode ) );
43 - $this->mFormatTitle = wfMsgHtml( 'wminc-infopage-title', $this->mProjectName, $this->mLangName );
 43+ $this->mFormatTitle = wfMsgHtml( 'wminc-infopage-title-' . $this->mProjectCode, $this->mLangName );
4444 return;
4545 }
4646
@@ -97,7 +97,7 @@
9898 if( !is_array( $wmincMultilingualProjects ) ) { return; }
9999 foreach( $wmincMultilingualProjects as $url => $name ) {
100100 $list[$url] = '<li>' . $this->makeLogo( $name, true,
101 - 75, null, 'http://'.$url.'/') . '</li>';
 101+ 75, null, '//'.$url.'/') . '</li>';
102102 }
103103 return '<ul class="wminc-infopage-multilingualprojects">' .
104104 implode( '', $list ) . '</ul>';

Follow-up revisions

RevisionCommit summaryAuthorDate
r105776MFT for WikimediaIncubator: r95582, r96122, r96138, r96141, r97175, r98670, r...siebrand00:32, 11 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:51, 2 December 2011

Translation nightmare :(

#Comment by SPQRobin (talk | contribs)   12:48, 2 December 2011

It's better than hardcoding it as parameter $1. I don't see any better solution anyway.

Status & tagging log