Index: trunk/phase3/includes/Title.php |
— | — | @@ -85,6 +85,9 @@ |
86 | 86 | $t->mDefaultNamespace = $defaultNamespace; |
87 | 87 | |
88 | 88 | wfProfileOut( $fname ); |
| 89 | + if ( !is_object( $t ) ) { |
| 90 | + var_dump( debug_backtrace() ); |
| 91 | + } |
89 | 92 | if( $t->secureAndSplit() ) { |
90 | 93 | return $t; |
91 | 94 | } else { |
— | — | @@ -628,7 +631,12 @@ |
629 | 632 | if ( preg_match( "/^((?:i|x|[a-z]{2,3})(?:-[a-z0-9]+)?|[A-Za-z0-9_\\x80-\\xff]+?)_*:_*(.*)$/", $t, $m ) ) { |
630 | 633 | #$p = strtolower( $m[1] ); |
631 | 634 | $p = $m[1]; |
632 | | - if ( $ns = $wgLang->getNsIndex( strtolower( $p ) )) { |
| 635 | + $lowerNs = strtolower( $p ); |
| 636 | + if ( $ns = Namespace::getCanonicalIndex( $lowerNs ) ) { |
| 637 | + # Canonical namespace |
| 638 | + $t = $m[2]; |
| 639 | + $this->mNamespace = $ns; |
| 640 | + } elseif ( $ns = $wgLang->getNsIndex( $lowerNs )) { |
633 | 641 | # Ordinary namespace |
634 | 642 | $t = $m[2]; |
635 | 643 | $this->mNamespace = $ns; |
Index: trunk/phase3/includes/Namespace.php |
— | — | @@ -26,6 +26,26 @@ |
27 | 27 | define("NS_HELP", 12); |
28 | 28 | define("NS_HELP_TALK", 13); |
29 | 29 | |
| 30 | +# These are synonyms for the names given in the language file |
| 31 | +# Users and translators should not change them |
| 32 | +/* private */ $wgCanonicalNamespaceNames = array( |
| 33 | + NS_MEDIA => "Media", |
| 34 | + NS_SPECIAL => "Special", |
| 35 | + NS_TALK => "Talk", |
| 36 | + NS_USER => "User", |
| 37 | + NS_USER_TALK => "User_talk", |
| 38 | + NS_WIKIPEDIA => "Wikipedia", |
| 39 | + NS_WIKIPEDIA_TALK => "Wikipedia_talk", |
| 40 | + NS_IMAGE => "Image", |
| 41 | + NS_IMAGE_TALK => "Image_talk", |
| 42 | + NS_MEDIAWIKI => "MediaWiki", |
| 43 | + NS_MEDIAWIKI_TALK => "MediaWiki_talk", |
| 44 | + NS_TEMPLATE => "Template", |
| 45 | + NS_TEMPLATE_TALK => "Template_talk", |
| 46 | + NS_HELP => "Help", |
| 47 | + NS_HELP_TALK => "Help_talk" |
| 48 | +); |
| 49 | + |
30 | 50 | class Namespace { |
31 | 51 | |
32 | 52 | /* These functions are deprecated */ |
— | — | @@ -71,6 +91,32 @@ |
72 | 92 | return $index; |
73 | 93 | } |
74 | 94 | } |
| 95 | + |
| 96 | + # Returns the canonical (English Wikipedia) name for a given index |
| 97 | + function &getCanonicalName( $index ) |
| 98 | + { |
| 99 | + global $wgCanonicalNamespaceNames; |
| 100 | + return $wgCanonicalNamespaceNames[$index]; |
| 101 | + } |
| 102 | + |
| 103 | + # Returns the index for a given canonical name, or NULL |
| 104 | + # The input *must* be converted to lower case first |
| 105 | + function &getCanonicalIndex( $name ) |
| 106 | + { |
| 107 | + global $wgCanonicalNamespaceNames; |
| 108 | + static $xNamespaces = false; |
| 109 | + if ( $xNamespaces === false ) { |
| 110 | + $xNamespaces = array(); |
| 111 | + foreach ( $wgCanonicalNamespaceNames as $i => $text ) { |
| 112 | + $xNamespaces[strtolower($text)] = $i; |
| 113 | + } |
| 114 | + } |
| 115 | + if ( array_key_exists( $name, $xNamespaces ) ) { |
| 116 | + return $xNamespaces[$name]; |
| 117 | + } else { |
| 118 | + return NULL; |
| 119 | + } |
| 120 | + } |
75 | 121 | } |
76 | 122 | |
77 | 123 | ?> |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | class MessageCache |
12 | 12 | { |
13 | 13 | var $mCache, $mUseCache, $mDisable, $mExpiry; |
14 | | - var $mMemcKey, $mKeys; |
| 14 | + var $mMemcKey, $mKeys, $mParserOptions, $mParser; |
15 | 15 | |
16 | 16 | var $mInitialised = false; |
17 | 17 | |
— | — | @@ -21,7 +21,9 @@ |
22 | 22 | $this->mMemcKey = "$memcPrefix:messages"; |
23 | 23 | $this->mKeys = false; # initialised on demand |
24 | 24 | $this->mInitialised = true; |
25 | | - |
| 25 | + $this->mParserOptions = ParserOptions::newFromUser( $u=NULL ); |
| 26 | + $this->mParser = new Parser; |
| 27 | + |
26 | 28 | $this->load(); |
27 | 29 | } |
28 | 30 | |
— | — | @@ -157,7 +159,7 @@ |
158 | 160 | } |
159 | 161 | |
160 | 162 | if ( $this->mDisable ) { |
161 | | - return $wgLang->getMessage( $key ); |
| 163 | + return $this->transform( $wgLang->getMessage( $key ) ); |
162 | 164 | } |
163 | 165 | $title = $wgLang->ucfirst( $key ); |
164 | 166 | |
— | — | @@ -192,9 +194,20 @@ |
193 | 195 | if ( !$message ) { |
194 | 196 | $message = "<$key>"; |
195 | 197 | } |
| 198 | + |
| 199 | + # Replace brace tags |
| 200 | + $message = $this->transform( $message ); |
| 201 | + |
196 | 202 | return $message; |
197 | 203 | } |
198 | 204 | |
| 205 | + function transform( $message ) { |
| 206 | + if ( strstr( $message, "{{" ) !== false ) { |
| 207 | + $message = $this->mParser->transformMsg( $message, $this->mParserOptions ); |
| 208 | + } |
| 209 | + return $message; |
| 210 | + } |
| 211 | + |
199 | 212 | function disable() { $this->mDisable = true; } |
200 | 213 | function enable() { $this->mDisable = false; } |
201 | 214 | |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | # Allowed values for $mOutputType |
43 | 43 | define( "OT_HTML", 1 ); |
44 | 44 | define( "OT_WIKI", 2 ); |
| 45 | +define( "OT_MSG", 3 ); |
45 | 46 | |
46 | 47 | class Parser |
47 | 48 | { |
— | — | @@ -1077,7 +1078,7 @@ |
1078 | 1079 | } |
1079 | 1080 | |
1080 | 1081 | function getVariableValue( $index ) { |
1081 | | - global $wgLang; |
| 1082 | + global $wgLang, $wgSitename, $wgServer; |
1082 | 1083 | |
1083 | 1084 | switch ( $index ) { |
1084 | 1085 | case MAG_CURRENTMONTH: |
— | — | @@ -1096,6 +1097,10 @@ |
1097 | 1098 | return $wgLang->time( wfTimestampNow(), false ); |
1098 | 1099 | case MAG_NUMBEROFARTICLES: |
1099 | 1100 | return wfNumberOfArticles(); |
| 1101 | + case MAG_SITENAME: |
| 1102 | + return $wgSitename; |
| 1103 | + case MAG_SERVER: |
| 1104 | + return $wgServer; |
1100 | 1105 | default: |
1101 | 1106 | return NULL; |
1102 | 1107 | } |
— | — | @@ -1124,7 +1129,7 @@ |
1125 | 1130 | $this->initialiseVariables(); |
1126 | 1131 | } |
1127 | 1132 | $titleChars = Title::legalChars(); |
1128 | | - $regex = "/{{([$titleChars]*?)}}/s"; |
| 1133 | + $regex = "/{{([$titleChars\\|]*?)}}/s"; |
1129 | 1134 | |
1130 | 1135 | # "Recursive" variable expansion: run it through a couple of passes |
1131 | 1136 | for ( $i=0; $i<MAX_INCLUDE_REPEAT && !$bail; $i++ ) { |
— | — | @@ -1170,7 +1175,7 @@ |
1171 | 1176 | |
1172 | 1177 | function braceSubstitution( $matches ) |
1173 | 1178 | { |
1174 | | - global $wgLinkCache; |
| 1179 | + global $wgLinkCache, $wgLang; |
1175 | 1180 | $fname = "Parser::braceSubstitution"; |
1176 | 1181 | $found = false; |
1177 | 1182 | $nowiki = false; |
— | — | @@ -1180,7 +1185,7 @@ |
1181 | 1186 | # SUBST |
1182 | 1187 | $mwSubst =& MagicWord::get( MAG_SUBST ); |
1183 | 1188 | if ( $mwSubst->matchStartAndRemove( $text ) ) { |
1184 | | - if ( $this->mOutputType == OT_HTML ) { |
| 1189 | + if ( $this->mOutputType != OT_WIKI ) { |
1185 | 1190 | # Invalid SUBST not replaced at PST time |
1186 | 1191 | # Return without further processing |
1187 | 1192 | $text = $matches[0]; |
— | — | @@ -1192,7 +1197,7 @@ |
1193 | 1198 | $found = true; |
1194 | 1199 | } |
1195 | 1200 | |
1196 | | - # Various prefixes |
| 1201 | + # MSG, MSGNW and INT |
1197 | 1202 | if ( !$found ) { |
1198 | 1203 | # Check for MSGNW: |
1199 | 1204 | $mwMsgnw =& MagicWord::get( MAG_MSGNW ); |
— | — | @@ -1211,7 +1216,55 @@ |
1212 | 1217 | $found = true; |
1213 | 1218 | } |
1214 | 1219 | } |
| 1220 | + |
| 1221 | + # NS |
| 1222 | + if ( !$found ) { |
| 1223 | + # Check for NS: (namespace expansion) |
| 1224 | + $mwNs = MagicWord::get( MAG_NS ); |
| 1225 | + if ( $mwNs->matchStartAndRemove( $text ) ) { |
| 1226 | + if ( intval( $text ) ) { |
| 1227 | + $text = $wgLang->getNsText( intval( $text ) ); |
| 1228 | + $found = true; |
| 1229 | + } else { |
| 1230 | + $index = Namespace::getCanonicalIndex( strtolower( $text ) ); |
| 1231 | + if ( !is_null( $index ) ) { |
| 1232 | + $text = $wgLang->getNsText( $index ); |
| 1233 | + $found = true; |
| 1234 | + } |
| 1235 | + } |
| 1236 | + } |
| 1237 | + } |
1215 | 1238 | |
| 1239 | + # LOCALURL and LOCALURLE |
| 1240 | + if ( !$found ) { |
| 1241 | + $mwLocal = MagicWord::get( MAG_LOCALURL ); |
| 1242 | + $mwLocalE = MagicWord::get( MAG_LOCALURLE ); |
| 1243 | + |
| 1244 | + if ( $mwLocal->matchStartAndRemove( $text ) ) { |
| 1245 | + $func = 'getLocalURL'; |
| 1246 | + } elseif ( $mwLocalE->matchStartAndRemove( $text ) ) { |
| 1247 | + $func = 'escapeLocalURL'; |
| 1248 | + } else { |
| 1249 | + $func = ''; |
| 1250 | + } |
| 1251 | + |
| 1252 | + if ( $func !== '' ) { |
| 1253 | + $args = explode( "|", $text ); |
| 1254 | + $n = count( $args ); |
| 1255 | + if ( $n > 0 ) { |
| 1256 | + $title = Title::newFromText( $args[0] ); |
| 1257 | + if ( !is_null( $title ) ) { |
| 1258 | + if ( $n > 1 ) { |
| 1259 | + $text = $title->$func( $args[1] ); |
| 1260 | + } else { |
| 1261 | + $text = $title->$func(); |
| 1262 | + } |
| 1263 | + $found = true; |
| 1264 | + } |
| 1265 | + } |
| 1266 | + } |
| 1267 | + } |
| 1268 | + |
1216 | 1269 | # Check for a match against internal variables |
1217 | 1270 | if ( !$found && array_key_exists( $text, $this->mVariables ) ) { |
1218 | 1271 | $text = $this->mVariables[$text]; |
— | — | @@ -1741,6 +1794,26 @@ |
1742 | 1795 | $this->clearState(); |
1743 | 1796 | } |
1744 | 1797 | } |
| 1798 | + |
| 1799 | + function transformMsg( $text, $options ) { |
| 1800 | + global $wgTitle; |
| 1801 | + static $executing = false; |
| 1802 | + |
| 1803 | + # Guard against infinite recursion |
| 1804 | + if ( $executing ) { |
| 1805 | + return $text; |
| 1806 | + } |
| 1807 | + $executing = true; |
| 1808 | + |
| 1809 | + $this->mTitle = $wgTitle; |
| 1810 | + $this->mOptions = $options; |
| 1811 | + $this->mOutputType = OT_MSG; |
| 1812 | + $this->clearState(); |
| 1813 | + $text = $this->replaceVariables( $text ); |
| 1814 | + |
| 1815 | + $executing = false; |
| 1816 | + return $text; |
| 1817 | + } |
1745 | 1818 | } |
1746 | 1819 | |
1747 | 1820 | class ParserOutput |
— | — | @@ -1825,6 +1898,7 @@ |
1826 | 1899 | |
1827 | 1900 | if ( !$userInput ) { |
1828 | 1901 | $user = new User; |
| 1902 | + $user->setLoaded( true ); |
1829 | 1903 | } else { |
1830 | 1904 | $user =& $userInput; |
1831 | 1905 | } |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -40,6 +40,11 @@ |
41 | 41 | define("MAG_IMG_CENTER", 21); |
42 | 42 | define("MAG_INT", 22); |
43 | 43 | define("MAG_FORCETOC", 23); |
| 44 | +define("MAG_SITENAME", 24); |
| 45 | +define("MAG_NS", 25); |
| 46 | +define("MAG_LOCALURL", 26); |
| 47 | +define("MAG_LOCALURLE", 27); |
| 48 | +define("MAG_SERVER", 28); |
44 | 49 | |
45 | 50 | $wgVariableIDs = array( |
46 | 51 | MAG_CURRENTMONTH, |
— | — | @@ -49,7 +54,9 @@ |
50 | 55 | MAG_CURRENTYEAR, |
51 | 56 | MAG_CURRENTTIME, |
52 | 57 | MAG_NUMBEROFARTICLES, |
53 | | - MAG_CURRENTMONTHNAMEGEN |
| 58 | + MAG_CURRENTMONTHNAMEGEN, |
| 59 | + MAG_SITENAME, |
| 60 | + MAG_SERVER |
54 | 61 | ); |
55 | 62 | |
56 | 63 | |
— | — | @@ -410,8 +417,12 @@ |
411 | 418 | MAG_IMG_NONE => array( 1, "none" ), |
412 | 419 | MAG_IMG_WIDTH => array( 1, "$1px" ), |
413 | 420 | MAG_IMG_CENTER => array( 1, "center", "centre" ), |
414 | | - MAG_INT => array( 0, "INT:" ) |
415 | | - |
| 421 | + MAG_INT => array( 0, "INT:" ), |
| 422 | + MAG_SITENAME => array( 1, "SITENAME" ), |
| 423 | + MAG_NS => array( 0, "NS:" ), |
| 424 | + MAG_LOCALURL => array( 0, "LOCALURL:" ), |
| 425 | + MAG_LOCALURLE => array( 0, "LOCALURLE:" ), |
| 426 | + MAG_SERVER => array( 0, "SERVER" ) |
416 | 427 | ); |
417 | 428 | |
418 | 429 | # All special pages have to be listed here: a description of "" |
— | — | @@ -438,7 +449,7 @@ |
439 | 450 | "Longpages" => "Long articles", |
440 | 451 | "Newpages" => "Newly created articles", |
441 | 452 | "Ancientpages" => "Oldest articles", |
442 | | - "Deadendpages" => "Dead-end pages", |
| 453 | + "Deadendpages" => "Dead-end pages", |
443 | 454 | # "Intl" => "Interlanguage Links", |
444 | 455 | "Allpages" => "All pages by title", |
445 | 456 | |
— | — | @@ -492,19 +503,19 @@ |
493 | 504 | "mainpage" => "Main Page", |
494 | 505 | "mainpagetext" => "Wiki software successfully installed.", |
495 | 506 | "about" => "About", |
496 | | -"aboutwikipedia" => "About $wgSitename", |
497 | | -"aboutpage" => "$wgMetaNamespace:About", |
| 507 | +"aboutwikipedia" => "About {{SITENAME}}", |
| 508 | +"aboutpage" => "{{ns:4}}:About", |
498 | 509 | 'article' => 'Article', |
499 | 510 | "help" => "Help", |
500 | | -"helppage" => $wgNamespaceNamesEn[NS_HELP].":Contents", |
501 | | -"wikititlesuffix" => "$wgSitename", |
| 511 | +"helppage" => "{{ns:12}}:Contents", |
| 512 | +"wikititlesuffix" => "{{SITENAME}}", |
502 | 513 | "bugreports" => "Bug reports", |
503 | | -"bugreportspage" => "$wgMetaNamespace:Bug_reports", |
| 514 | +"bugreportspage" => "{{ns:4}}:Bug_reports", |
504 | 515 | "sitesupport" => "Donations", # Set a URL in $wgSiteSupportPage in LocalSettings.php |
505 | 516 | "faq" => "FAQ", |
506 | | -"faqpage" => "$wgMetaNamespace:FAQ", |
| 517 | +"faqpage" => "{{ns:4}}:FAQ", |
507 | 518 | "edithelp" => "Editing help", |
508 | | -"edithelppage" => $wgNamespaceNamesEn[NS_HELP].":Editing", |
| 519 | +"edithelppage" => "{{ns:12}}:Editing", |
509 | 520 | "cancel" => "Cancel", |
510 | 521 | "qbfind" => "Find", |
511 | 522 | "qbbrowse" => "Browse", |
— | — | @@ -519,10 +530,10 @@ |
520 | 531 | 'navigation' => 'Navigation', |
521 | 532 | "currentevents" => "Current events", |
522 | 533 | "disclaimers" => "Disclaimers", |
523 | | -"disclaimerpage" => "$wgMetaNamespace:General_disclaimer", |
| 534 | +"disclaimerpage" => "{{ns:4}}:General_disclaimer", |
524 | 535 | "errorpagetitle" => "Error", |
525 | 536 | "returnto" => "Return to $1.", |
526 | | -"fromwikipedia" => "From $wgSitename, the free encyclopedia.", |
| 537 | +"fromwikipedia" => "From {{SITENAME}}, the free encyclopedia.", |
527 | 538 | "whatlinkshere" => "Pages that link here", |
528 | 539 | "help" => "Help", |
529 | 540 | "search" => "Search", |
— | — | @@ -555,10 +566,10 @@ |
556 | 567 | "redirectedfrom" => "(Redirected from $1)", |
557 | 568 | "lastmodified" => "This page was last modified $1.", |
558 | 569 | "viewcount" => "This page has been accessed $1 times.", |
559 | | -"gnunote" => "All text is available under the terms of the <a class='internal' href='$wgScriptPath/index.php/GNU_Free_Documentation_License'>GNU Free Documentation License</a>. $wgSitename is powered by <a href='http://www.mediawiki.org/' class='external'>MediaWiki</a>, an open source wiki engine.", |
560 | | -"printsubtitle" => "(From $wgServer)", |
| 570 | +"gnunote" => "All text is available under the terms of the <a class='internal' href='{{localurl:GNU_Free_Documentation_License}}'>GNU Free Documentation License</a>. $wgSitename is powered by <a href='http://www.mediawiki.org/' class='external'>MediaWiki</a>, an open source wiki engine.", |
| 571 | +"printsubtitle" => "(From {{SERVER}})", |
561 | 572 | "protectedpage" => "Protected page", |
562 | | -"administrators" => "$wgMetaNamespace:Administrators", |
| 573 | +"administrators" => "{{ns:4}}:Administrators", |
563 | 574 | "sysoptitle" => "Sysop access required", |
564 | 575 | "sysoptext" => "The action you have requested can only be |
565 | 576 | performed by users with \"sysop\" status. |
— | — | @@ -573,7 +584,7 @@ |
574 | 585 | "nbytes" => "$1 bytes", |
575 | 586 | "go" => "Go", |
576 | 587 | "ok" => "OK", |
577 | | -"sitetitle" => "$wgSitename", |
| 588 | +"sitetitle" => "{{SITENAME}}", |
578 | 589 | "sitesubtitle" => "The Free Encyclopedia", |
579 | 590 | "retrievedfrom" => "Retrieved from \"$1\"", |
580 | 591 | "newmessages" => "You have $1.", |
— | — | @@ -652,7 +663,7 @@ |
653 | 664 | "viewsource" => "View source", |
654 | 665 | "protectedtext" => "This page has been locked to prevent editing; there are |
655 | 666 | a number of reasons why this may be so, please see |
656 | | -[[$wgMetaNamespace:Protected page]]. |
| 667 | +[[{{ns:4}}:Protected page]]. |
657 | 668 | |
658 | 669 | You can view and copy the source of this page:", |
659 | 670 | |
— | — | @@ -660,13 +671,13 @@ |
661 | 672 | # |
662 | 673 | "logouttitle" => "User logout", |
663 | 674 | "logouttext" => "You are now logged out. |
664 | | -You can continue to use $wgSitename anonymously, or you can log in |
| 675 | +You can continue to use {{SITENAME}} anonymously, or you can log in |
665 | 676 | again as the same or as a different user. Note that some pages may |
666 | 677 | continue to be displayed as if you were still logged in, until you clear |
667 | 678 | your browser cache\n", |
668 | 679 | |
669 | 680 | "welcomecreation" => "<h2>Welcome, $1!</h2><p>Your account has been created. |
670 | | -Don't forget to change your $wgSitename preferences.", |
| 681 | +Don't forget to change your {{SITENAME}} preferences.", |
671 | 682 | |
672 | 683 | "loginpagetitle" => "User login", |
673 | 684 | "yourname" => "Your user name", |
— | — | @@ -678,7 +689,7 @@ |
679 | 690 | "alreadyloggedin" => "<font color=red><b>User $1, you are already logged in!</b></font><br />\n", |
680 | 691 | |
681 | 692 | "login" => "Log in", |
682 | | -"loginprompt" => "You must have cookies enabled to log in to $wgSitename.", |
| 693 | +"loginprompt" => "You must have cookies enabled to log in to {{SITENAME}}.", |
683 | 694 | "userlogin" => "Log in", |
684 | 695 | "logout" => "Log out", |
685 | 696 | "userlogout" => "Log out", |
— | — | @@ -694,18 +705,18 @@ |
695 | 706 | email address to them, and it also helps you if you forget your |
696 | 707 | password.", |
697 | 708 | "loginerror" => "Login error", |
698 | | -"nocookiesnew" => "The user account was created, but you are not logged in. $wgSitename uses cookies to log in users. You have cookies disabled. Please enable them, then log in with your new username and password.", |
699 | | -"nocookieslogin" => "$wgSitename uses cookies to log in users. You have cookies disabled. Please enable them and try again.", |
| 709 | +"nocookiesnew" => "The user account was created, but you are not logged in. {{SITENAME}} uses cookies to log in users. You have cookies disabled. Please enable them, then log in with your new username and password.", |
| 710 | +"nocookieslogin" => "{{SITENAME}} uses cookies to log in users. You have cookies disabled. Please enable them and try again.", |
700 | 711 | "noname" => "You have not specified a valid user name.", |
701 | 712 | "loginsuccesstitle" => "Login successful", |
702 | | -"loginsuccess" => "You are now logged in to $wgSitename as \"$1\".", |
| 713 | +"loginsuccess" => "You are now logged in to {{SITENAME}} as \"$1\".", |
703 | 714 | "nosuchuser" => "There is no user by the name \"$1\". |
704 | 715 | Check your spelling, or use the form below to create a new user account.", |
705 | 716 | "wrongpassword" => "The password you entered is incorrect. Please try again.", |
706 | 717 | "mailmypassword" => "Mail me a new password", |
707 | | -"passwordremindertitle" => "Password reminder from $wgSitename", |
| 718 | +"passwordremindertitle" => "Password reminder from {{SITENAME}}", |
708 | 719 | "passwordremindertext" => "Someone (probably you, from IP address $1) |
709 | | -requested that we send you a new $wgSitename login password. |
| 720 | +requested that we send you a new {{SITENAME}} login password. |
710 | 721 | The password for user \"$2\" is now \"$3\". |
711 | 722 | You should log in and change your password now.", |
712 | 723 | "noemail" => "There is no e-mail address recorded for user \"$1\".", |
— | — | @@ -752,7 +763,7 @@ |
753 | 764 | "blockedtitle" => "User is blocked", |
754 | 765 | "blockedtext" => "Your user name or IP address has been blocked by $1. |
755 | 766 | The reason given is this:<br />''$2''<p>You may contact $1 or one of the other |
756 | | -[[$wgMetaNamespace:Administrators|administrators]] to discuss the block. |
| 767 | +[[{{ns4}}:Administrators|administrators]] to discuss the block. |
757 | 768 | |
758 | 769 | Note that you may not use the \"email this user\" feature unless you have a valid email address registered in your [[Special:Preferences|user preferences]]. |
759 | 770 | |
— | — | @@ -772,7 +783,7 @@ |
773 | 784 | "newarticletext" => |
774 | 785 | "You've followed a link to a page that doesn't exist yet. |
775 | 786 | To create the page, start typing in the box below |
776 | | -(see the [[$wgMetaNamespace:Help|help page]] for more info). |
| 787 | +(see the [[{{ns:4}}:Help|help page]] for more info). |
777 | 788 | If you are here by mistake, just click your browser's '''back''' button.", |
778 | 789 | "talkpagetext" => "<!-- MediaWiki:talkpagetext -->", |
779 | 790 | "anontalkpagetext" => "---- ''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical [[IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.'' ", |
— | — | @@ -800,7 +811,7 @@ |
801 | 812 | If you save it, any changes made since this revision will be lost.</strong>\n", |
802 | 813 | "yourdiff" => "Differences", |
803 | 814 | # FIXME: This is inappropriate for third-party use! |
804 | | -"copyrightwarning" => "Please note that all contributions to $wgSitename are |
| 815 | +"copyrightwarning" => "Please note that all contributions to {{SITENAME}} are |
805 | 816 | considered to be released under the GNU Free Documentation License |
806 | 817 | (see $1 for details). |
807 | 818 | If you don't want your writing to be edited mercilessly and redistributed |
— | — | @@ -816,7 +827,7 @@ |
817 | 828 | the text into a text file and save it for later.", |
818 | 829 | "protectedpagewarning" => "WARNING: This page has been locked so that only |
819 | 830 | users with sysop privileges can edit it. Be sure you are following the |
820 | | -<a href='$wgScriptPath/$wgMetaNamespace:Protected_page_guidelines'>protected page |
| 831 | +<a href='$wgScriptPath/{{ns:4}}:Protected_page_guidelines'>protected page |
821 | 832 | guidelines</a>.", |
822 | 833 | |
823 | 834 | # History pages |
— | — | @@ -846,9 +857,9 @@ |
847 | 858 | # Search results |
848 | 859 | # |
849 | 860 | "searchresults" => "Search results", |
850 | | -"searchhelppage" => "$wgMetaNamespace:Searching", |
851 | | -"searchingwikipedia" => "Searching $wgSitename", |
852 | | -"searchresulttext" => "For more information about searching $wgSitename, see $1.", |
| 861 | +"searchhelppage" => "{{ns:4}}:Searching", |
| 862 | +"searchingwikipedia" => "Searching {{SITENAME}}", |
| 863 | +"searchresulttext" => "For more information about searching {{SITENAME}}, see $1.", |
853 | 864 | "searchquery" => "For query \"$1\"", |
854 | 865 | "badquery" => "Badly formed search query", |
855 | 866 | "badquerytext" => "We could not process your query. |
— | — | @@ -891,7 +902,7 @@ |
892 | 903 | <INPUT TYPE=text name=q size=31 maxlength=255 value=\"$1\"> |
893 | 904 | <INPUT type=submit name=btnG VALUE=\"Google Search\"> |
894 | 905 | <font size=-1> |
895 | | -<input type=hidden name=domains value=\"{$wgServer}\"><br /><input type=radio name=sitesearch value=\"\"> WWW <input type=radio name=sitesearch value=\"{$wgServer}\" checked> {$wgServer} <br /> |
| 906 | +<input type=hidden name=domains value=\"{{SERVER}}\"><br /><input type=radio name=sitesearch value=\"\"> WWW <input type=radio name=sitesearch value=\"{{SERVER}}\" checked> {{SERVER}} <br /> |
896 | 907 | <input type='hidden' name='ie' value='$2'> |
897 | 908 | <input type='hidden' name='oe' value='$2'> |
898 | 909 | </font> |
— | — | @@ -904,13 +915,12 @@ |
905 | 916 | # |
906 | 917 | "preferences" => "Preferences", |
907 | 918 | "prefsnologin" => "Not logged in", |
908 | | -"prefsnologintext" => "You must be <a href=\"" . |
909 | | - wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a> |
| 919 | +"prefsnologintext" => "You must be <a href=\"{{localurl:Special:Userlogin}}\">logged in</a> |
910 | 920 | to set user preferences.", |
911 | 921 | "prefslogintext" => "You are logged in as \"$1\". |
912 | 922 | Your internal ID number is $2. |
913 | 923 | |
914 | | -See [[$wgMetaNamespace:User preferences help]] for help deciphering the options.", |
| 924 | +See [[{{ns:4}}:User preferences help]] for help deciphering the options.", |
915 | 925 | "prefsreset" => "Preferences have been reset from storage.", |
916 | 926 | "qbsettings" => "Quickbar settings", |
917 | 927 | "changepassword" => "Change password", |
— | — | @@ -983,23 +993,20 @@ |
984 | 994 | "reupload" => "Re-upload", |
985 | 995 | "reuploaddesc" => "Return to the upload form.", |
986 | 996 | "uploadnologin" => "Not logged in", |
987 | | -"uploadnologintext" => "You must be <a href=\"" . |
988 | | - wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a> |
| 997 | +"uploadnologintext" => "You must be <a href=\"{{localurl:Special:Userlogin}}\">logged in</a> |
989 | 998 | to upload files.", |
990 | 999 | "uploadfile" => "Upload images, sounds, documents etc.", |
991 | 1000 | "uploaderror" => "Upload error", |
992 | 1001 | "uploadtext" => "<strong>STOP!</strong> Before you upload here, |
993 | | -make sure to read and follow the <a href=\"" . |
994 | | -wfLocalUrlE( "$wgMetaNamespace:Image_use_policy" ) . "\">image use policy</a>. |
| 1002 | +make sure to read and follow the <a href=\"{{localurle:Special:Image_use_policy}}\">image use policy</a>. |
995 | 1003 | <p>If a file with the name you are specifying already |
996 | 1004 | exists on the wiki, it'll be replaced without warning. |
997 | 1005 | So unless you mean to update a file, it's a good idea |
998 | 1006 | to first check if such a file exists. |
999 | 1007 | <p>To view or search previously uploaded images, |
1000 | | -go to the <a href=\"" . wfLocalUrlE( "Special:Imagelist" ) . |
1001 | | -"\">list of uploaded images</a>. |
1002 | | -Uploads and deletions are logged on the <a href=\"" . |
1003 | | -wfLocalUrlE( "$wgMetaNamespace:Upload_log" ) . "\">upload log</a>. |
| 1008 | +go to the <a href=\"{{localurle:Special:Imagelist}}\">list of uploaded images</a>. |
| 1009 | +Uploads and deletions are logged on the " . |
| 1010 | +"<a href=\"{{localurle:Wikipedia:Upload_log}}\">upload log</a>. |
1004 | 1011 | <p>Use the form below to upload new image files for use in |
1005 | 1012 | illustrating your articles. |
1006 | 1013 | On most browsers, you will see a \"Browse...\" button, which will |
— | — | @@ -1033,8 +1040,8 @@ |
1034 | 1041 | "filesource" => "Source", |
1035 | 1042 | "affirmation" => "I affirm that the copyright holder of this file |
1036 | 1043 | agrees to license it under the terms of the $1.", |
1037 | | -"copyrightpage" => "$wgMetaNamespace:Copyrights", |
1038 | | -"copyrightpagename" => "$wgSitename copyright", |
| 1044 | +"copyrightpage" => "{{ns:4}}:Copyrights", |
| 1045 | +"copyrightpagename" => "{{SITENAME}} copyright", |
1039 | 1046 | "uploadedfiles" => "Uploaded files", |
1040 | 1047 | "noaffirmation" => "You must affirm that your upload does not violate |
1041 | 1048 | any copyrights.", |
— | — | @@ -1084,7 +1091,7 @@ |
1085 | 1092 | "sitestats" => "Site statistics", |
1086 | 1093 | "userstats" => "User statistics", |
1087 | 1094 | "sitestatstext" => "There are <b>$1</b> total pages in the database. |
1088 | | -This includes \"talk\" pages, pages about $wgSitename, minimal \"stub\" |
| 1095 | +This includes \"talk\" pages, pages about {{SITENAME}}, minimal \"stub\" |
1089 | 1096 | pages, redirects, and others that probably don't qualify as articles. |
1090 | 1097 | Excluding those, there are <b>$2</b> pages that are probably legitimate |
1091 | 1098 | articles.<p> |
— | — | @@ -1100,7 +1107,7 @@ |
1101 | 1108 | "maintnancepagetext" => "This page includes several handy tools for everyday maintenance. Some of these functions tend to stress the database, so please do not hit reload after every item you fixed ;-)", |
1102 | 1109 | "maintenancebacklink" => "Back to Maintenance Page", |
1103 | 1110 | "disambiguations" => "Disambiguation pages", |
1104 | | -"disambiguationspage" => "$wgMetaNamespace:Links_to_disambiguating_pages", |
| 1111 | +"disambiguationspage" => "{{ns:4}}:Links_to_disambiguating_pages", |
1105 | 1112 | "disambiguationstext" => "The following articles link to a <i>disambiguation page</i>. They should link to the appropriate topic instead.<br />A page is treated as dismbiguation if it is linked from $1.<br />Links from other namespaces are <i>not</i> listed here.", |
1106 | 1113 | "doubleredirects" => "Double Redirects", |
1107 | 1114 | "doubleredirectstext" => "<b>Attention:</b> This list may contain false positives. That usually means there is additional text with links below the first #REDIRECT.<br />\nEach row contains links to the first and second redirect, as well as the first line of the second redirect text, usually giving the \"real\" taget article, which the first redirect should point to.", |
— | — | @@ -1152,7 +1159,7 @@ |
1153 | 1160 | "booksourcetext" => "Below is a list of links to other sites that |
1154 | 1161 | sell new and used books, and may also have further information |
1155 | 1162 | about books you are looking for. |
1156 | | -$wgSitename is not affiliated with any of these businesses, and |
| 1163 | +{{SITENAME}} is not affiliated with any of these businesses, and |
1157 | 1164 | this list should not be construed as an endorsement.", |
1158 | 1165 | "rfcurl" => "http://www.faqs.org/rfcs/rfc$1.html", |
1159 | 1166 | "alphaindexline" => "$1 to $2", |
— | — | @@ -1161,10 +1168,8 @@ |
1162 | 1169 | # Email this user |
1163 | 1170 | # |
1164 | 1171 | "mailnologin" => "No send address", |
1165 | | -"mailnologintext" => "You must be <a href=\"" . |
1166 | | - wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a> |
1167 | | -and have a valid e-mail address in your <a href=\"" . |
1168 | | - wfLocalUrl( "Special:Preferences" ) . "\">preferences</a> |
| 1172 | +"mailnologintext" => "You must be <a href=\"{{localurl:Special:Userlogin\">logged in</a> |
| 1173 | +and have a valid e-mail address in your <a href=\"{{localurl:Special:Preferences}}\">preferences</a> |
1169 | 1174 | to send e-mail to other users.", |
1170 | 1175 | "emailuser" => "E-mail this user", |
1171 | 1176 | "emailpage" => "E-mail user", |
— | — | @@ -1174,7 +1179,7 @@ |
1175 | 1180 | as the \"From\" address of the mail, so the recipient will be able |
1176 | 1181 | to reply.", |
1177 | 1182 | "usermailererror" => "Mail object returned error: ", |
1178 | | -"defemailsubject" => "$wgSitename e-mail", |
| 1183 | +"defemailsubject" => "{{SITENAME}} e-mail", |
1179 | 1184 | "noemailtitle" => "No e-mail address", |
1180 | 1185 | "noemailtext" => "This user has not specified a valid e-mail address, |
1181 | 1186 | or has chosen not to receive e-mail from other users.", |
— | — | @@ -1192,15 +1197,12 @@ |
1193 | 1198 | "watchlistsub" => "(for user \"$1\")", |
1194 | 1199 | "nowatchlist" => "You have no items on your watchlist.", |
1195 | 1200 | "watchnologin" => "Not logged in", |
1196 | | -"watchnologintext" => "You must be <a href=\"" . |
1197 | | - wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a> |
| 1201 | +"watchnologintext" => "You must be <a href=\"{{localurl:Special:Userlogin}}\">logged in</a> |
1198 | 1202 | to modify your watchlist.", |
1199 | 1203 | "addedwatch" => "Added to watchlist", |
1200 | | -"addedwatchtext" => "The page \"$1\" has been added to your <a href=\"" . |
1201 | | - wfLocalUrl( "Special:Watchlist" ) . "\">watchlist</a>. |
| 1204 | +"addedwatchtext" => "The page \"$1\" has been added to your <a href=\"{{localurl:Special:Watchlist}}\">watchlist</a>. |
1202 | 1205 | Future changes to this page and its associated Talk page will be listed there, |
1203 | | -and the page will appear <b>bolded</b> in the <a href=\"" . |
1204 | | - wfLocalUrl( "Special:Recentchanges" ) . "\">list of recent changes</a> to |
| 1206 | +and the page will appear <b>bolded</b> in the <a href=\"{{localurl:Special:Recentchanges}}\">list of recent changes</a> to |
1205 | 1207 | make it easier to pick out.</p> |
1206 | 1208 | |
1207 | 1209 | <p>If you want to remove the page from your watchlist later, click \"Stop watching\" in the sidebar.", |
— | — | @@ -1246,7 +1248,7 @@ |
1247 | 1249 | or image along with all of its history from the database. |
1248 | 1250 | Please confirm that you intend to do this, that you understand the |
1249 | 1251 | consequences, and that you are doing this in accordance with |
1250 | | -[[$wgMetaNamespace:Policy]].", |
| 1252 | +[[{{ns:4}}:Policy]].", |
1251 | 1253 | "confirmcheck" => "Yes, I really want to delete this.", |
1252 | 1254 | "actioncomplete" => "Action complete", |
1253 | 1255 | "deletedtext" => "\"$1\" has been deleted. |
— | — | @@ -1276,7 +1278,7 @@ |
1277 | 1279 | "revertpage" => "Reverted edit of $2, changed back to last version by $1", |
1278 | 1280 | "protectlogpage" => "Protection_log", |
1279 | 1281 | "protectlogtext" => "Below is a list of page locks/unlocks. |
1280 | | -See [[$wgMetaNamespace:Protected page]] for more information.", |
| 1282 | +See [[{{ns:4}}:Protected page]] for more information.", |
1281 | 1283 | "protectedarticle" => "protected [[$1]]", |
1282 | 1284 | "unprotectedarticle" => "unprotected [[$1]]", |
1283 | 1285 | |
— | — | @@ -1295,7 +1297,7 @@ |
1296 | 1298 | "undeletebtn" => "Restore!", |
1297 | 1299 | "undeletedarticle" => "restored \"$1\"", |
1298 | 1300 | "undeletedtext" => "The article [[$1]] has been successfully restored. |
1299 | | -See [[$wgMetaNamespace:Deletion_log]] for a record of recent deletions and restorations.", |
| 1301 | +See [[{{ns:4}}:Deletion_log]] for a record of recent deletions and restorations.", |
1300 | 1302 | |
1301 | 1303 | # Contributions |
1302 | 1304 | # |
— | — | @@ -1324,7 +1326,7 @@ |
1325 | 1327 | "blockiptext" => "Use the form below to block write access |
1326 | 1328 | from a specific IP address or username. |
1327 | 1329 | This should be done only only to prevent vandalism, and in |
1328 | | -accordance with [[$wgMetaNamespace:Policy|policy]]. |
| 1330 | +accordance with [[{{ns:4}}:Policy|policy]]. |
1329 | 1331 | Fill in a specific reason below (for example, citing particular |
1330 | 1332 | pages that were vandalized).", |
1331 | 1333 | "ipaddress" => "IP Address/username", |
— | — | @@ -1444,8 +1446,7 @@ |
1445 | 1447 | In those cases, you will have to move or merge the page manually if desired.", |
1446 | 1448 | "movearticle" => "Move page", |
1447 | 1449 | "movenologin" => "Not logged in", |
1448 | | -"movenologintext" => "You must be a registered user and <a href=\"" . |
1449 | | - wfLocalUrl( "Special:Userlogin" ) . "\">logged in</a> |
| 1450 | +"movenologintext" => "You must be a registered user and <a href=\"{{localurl:Special:Userlogin}}\">logged in</a> |
1450 | 1451 | to move a page.", |
1451 | 1452 | "newtitle" => "To new title", |
1452 | 1453 | "movepagebtn" => "Move page", |
— | — | @@ -1540,7 +1541,7 @@ |
1541 | 1542 | 'tooltip-mainpage' => 'Visit the Main Page', |
1542 | 1543 | 'tooltip-randompage' => 'Load a random page [alt-x]', |
1543 | 1544 | 'tooltip-currentevents' => 'Find background information on current events', |
1544 | | -'tooltip-sitesupport' => 'Support '.$wgSitename, |
| 1545 | +'tooltip-sitesupport' => 'Support {{SITENAME}}', |
1545 | 1546 | 'tooltip-help' => 'The place to find out.', |
1546 | 1547 | 'tooltip-recentchanges' => 'The list of recent changes in the wiki. [alt-r]', |
1547 | 1548 | 'tooltip-recentchangeslinked' => 'Recent changes in pages linking to this page [alt-c]', |