Index: trunk/extensions/Gadgets/Gadgets.i18n.php |
— | — | @@ -11,19 +11,19 @@ |
12 | 12 | */ |
13 | 13 | |
14 | 14 | #for Special:Preferences |
15 | | -$messages['gadgetprefs']= 'Gadgets'; |
16 | | -$messages['gadgetprefstext']= 'Below is a list of special gadgets you can enable for your account. |
| 15 | +$messages['gadgets-prefs']= 'Gadgets'; |
| 16 | +$messages['gadgets-prefstext']= 'Below is a list of special gadgets you can enable for your account. |
17 | 17 | These gadgets are mostly based on JavaScript, so JavaScript has to be enabled in your browser for them to work. |
18 | 18 | Note that these gadgets will have no effect on this preferences page. |
19 | 19 | |
20 | 20 | Also note that these special gadgets are not part of the MediaWiki software, and are usually developed and maintained |
21 | | -by users on your local wiki. Local administrators can edit available gadgets using [[MediaWiki:Gadgets]] |
| 21 | +by users on your local wiki. Local administrators can edit available gadgets using [[MediaWiki:Gadgets-definition]] |
22 | 22 | and [[Special:Gadgets]].'; |
23 | 23 | |
24 | 24 | #for Special:Gadgets |
25 | 25 | $messages['gadgets'] = 'Gadgets'; |
26 | 26 | $messages['gadgets-title'] = 'Gadgets'; |
27 | | -$messages['gadgets-pagetext'] = 'Below is a list of special gadgets users can enable on their preferences page, as defined by [[MediaWiki:Gadgets]]. |
| 27 | +$messages['gadgets-pagetext'] = 'Below is a list of special gadgets users can enable on their preferences page, as defined by [[MediaWiki:Gadgets-definition]]. |
28 | 28 | This overview provides easy access to the system message pages that define each gadget\'s description and code.'; |
29 | 29 | $messages['gadgets-uses'] = 'Uses'; |
30 | 30 | ?> |
Index: trunk/extensions/Gadgets/Gadgets.php |
— | — | @@ -28,6 +28,7 @@ |
29 | 29 | $wgHooks['RenderPreferencesForm'][] = 'wfGadgetsRenderPreferencesForm'; |
30 | 30 | $wgHooks['ResetPreferences'][] = 'wfGadgetsResetPreferences'; |
31 | 31 | $wgHooks['BeforePageDisplay'][] = 'wfGadgetsBeforePageDisplay'; |
| 32 | +$wgHooks['LoadAllMessages'][] = "loadGadgetsI18n"; |
32 | 33 | |
33 | 34 | $wgAutoloadClasses['SpecialGadgets'] = dirname( __FILE__ ) . '/SpecialGadgets.php'; |
34 | 35 | $wgSpecialPages['Gadgets'] = 'SpecialGadgets'; |
— | — | @@ -56,8 +57,9 @@ |
57 | 58 | |
58 | 59 | if ( $gadgets !== NULL ) return $gadgets; |
59 | 60 | |
60 | | - $g = wfMsgForContentNoTrans( "Gadgets" ); |
61 | | - if ( wfEmptyMsg( "Gadgets", $g ) ) { |
| 61 | + $g = wfMsgForContentNoTrans( "Gadgets-definition" ); |
| 62 | + if ( wfEmptyMsg( "Gadgets-definition", $g ) ) { |
| 63 | + print "((NO GADGETS))"; |
62 | 64 | $gadgets = false; |
63 | 65 | return $gadgets; |
64 | 66 | } |
— | — | @@ -115,10 +117,9 @@ |
116 | 118 | |
117 | 119 | loadGadgetsI18n(); |
118 | 120 | |
119 | | - $out->addHtml( "\n<fieldset>\n<legend>" . wfMsgHtml( 'gadgetprefs' ) . "</legend>\n" ); |
| 121 | + $out->addHtml( "\n<fieldset>\n<legend>" . wfMsgHtml( 'gadgets-prefs' ) . "</legend>\n" ); |
120 | 122 | |
121 | | - $out->addHtml( "<p>" . wfMsgWikiHtml( 'gadgetprefstext' ) . "</p>\n" ); |
122 | | - #$out->addHtml( "<p>" . wfMsgWikiHtml( 'gadgetreloadhint' ) . "</p>\n" ); |
| 123 | + $out->addHtml( "<p>" . wfMsgWikiHtml( 'gadgets-prefstext' ) . "</p>\n" ); |
123 | 124 | |
124 | 125 | $msgOpt = array( 'parseinline', 'parsemag' ); |
125 | 126 | |
— | — | @@ -139,7 +140,6 @@ |
140 | 141 | } |
141 | 142 | } |
142 | 143 | |
143 | | - #$out->addHtml( "<p>" . wfMsgWikiHtml( 'gadgetreloadhint' ) . "</p>\n" ); |
144 | 144 | $out->addHtml( "</fieldset>\n\n" ); |
145 | 145 | |
146 | 146 | return true; |
— | — | @@ -211,6 +211,8 @@ |
212 | 212 | |
213 | 213 | $initialized = true; |
214 | 214 | $wgMessageCache->addMessages( $messages ); |
| 215 | + |
| 216 | + return true; |
215 | 217 | } |
216 | 218 | |
217 | 219 | ?> |
\ No newline at end of file |
Index: trunk/extensions/Gadgets/Gadgets.i18n.de.php |
— | — | @@ -11,19 +11,19 @@ |
12 | 12 | */ |
13 | 13 | |
14 | 14 | #for Special:Preferences |
15 | | -$messages['gadgetprefs']= 'Gadgets'; |
16 | | -$messages['gadgetprefstext']= 'Liste von speziellen Gadgets die für jeden Benutzer aktiviert werden können. |
| 15 | +$messages['gadgets-prefs']= 'Gadgets'; |
| 16 | +$messages['gadgets-prefstext']= 'Liste von speziellen Gadgets die für jeden Benutzer aktiviert werden können. |
17 | 17 | Die Gadgets basieren zumeinst auf JavaScript, daher muss JavaScript im Browser aktiviert sein, damit sie funktionieren. |
18 | 18 | Die Gadgets funktionieren allerdings nicht auf dieser Seite mit persönlichen Einstellungen. |
19 | 19 | |
20 | 20 | Ausserdem ist zu beachten, dass diese Gadgets im Allgemeinen nicht Teil von MediaWiki sind, sondern meist von |
21 | 21 | Benutzern des lokalen Wikis entwickelt und gewartet werden. Lokale Wiki-Administratoren können die Liste von |
22 | | -verfügbaren Gadgets auf der Seite [[MediaWiki:Gadgets]] bearbeiten'; |
| 22 | +verfügbaren Gadgets über die Seiten [[MediaWiki:Gadgets-definition]] und [[Special:Gadgets]] bearbeiten'; |
23 | 23 | |
24 | 24 | #for Special:Gadgets |
25 | 25 | $messages['gadgets'] = 'Gadgets'; |
26 | 26 | $messages['gadgets-title'] = 'Gadgets'; |
27 | | -$messages['gadgets-pagetext'] = 'Liste von speziellen Gadgets, die für jeden Benutzer verfügbar sind, wie in [[MediaWiki:Gadgets]] definiert. |
| 27 | +$messages['gadgets-pagetext'] = 'Liste von speziellen Gadgets, die für jeden Benutzer verfügbar sind, wie in [[MediaWiki:Gadgets-definition]] definiert. |
28 | 28 | Diese Übersicht bietet direkten Zugang zu den Systemnachrichten, die die Beschreibung sowie den Programmcode jedes |
29 | 29 | Gadgets enthalten.'; |
30 | 30 | $messages['gadgets-uses'] = 'Benutzt'; |
Index: trunk/extensions/Gadgets/README |
— | — | @@ -23,14 +23,15 @@ |
24 | 24 | require_once( "$IP/extensions/Gadgets/Gadgets.php" ); |
25 | 25 | |
26 | 26 | == Usage == |
27 | | -The list of available gadgets is defined on MediaWiki:Gadgets. Gadgets |
28 | | -defined there show up in the "Gadgets" section of Special:Preferences, so |
29 | | -users can pick the gadgets they would like to use. An overview of the |
30 | | -gadgets defined by MediaWiki:Gadgets is also shown on Special:Gadgets, |
31 | | -along with links to the respective system messages, for easy editing. |
| 27 | +The list of available gadgets is defined on MediaWiki:Gadgets-definition. |
| 28 | +Gadgets defined there show up in the "Gadgets" section of |
| 29 | +Special:Preferences, so users can pick the gadgets they would like to use. |
| 30 | +An overview of the gadgets defined by MediaWiki:Gadgets-definition is also |
| 31 | +shown on Special:Gadgets, along with links to the respective system |
| 32 | +messages, for easy editing. |
32 | 33 | |
33 | | -Each line in MediaWiki:Gadgets that start with one or more "*" (asterisc) |
34 | | -characters defines a gadget; it must have the following form: |
| 34 | +Each line in MediaWiki:Gadgets-definition that start with one or more "*" |
| 35 | +(asterisc) characters defines a gadget; it must have the following form: |
35 | 36 | |
36 | 37 | * mygadget|mygadget.js|mygadget.css |
37 | 38 | |
— | — | @@ -51,7 +52,7 @@ |
52 | 53 | * frobinator|commonStuff.js|frob.js|frob.css|pretty.css |
53 | 54 | * l33t|commonStuff.js|tools.js|l33t.js |
54 | 55 | |
55 | | -The list of gadgets in MediaWiki:Gadgets can be broken into sections using |
| 56 | +The list of gadgets in MediaWiki:Gadgets-definition can be broken into sections using |
56 | 57 | lines that start and end with two or more "=" (equals) characters, enclosing |
57 | 58 | the name of a system message that defines the section's name - for example: |
58 | 59 | |
— | — | @@ -71,7 +72,7 @@ |
72 | 73 | * Gadget code is included after user code - that means that user JS has no |
73 | 74 | access to things defined in gadgets, and user CSS is overwritten by CSS |
74 | 75 | from gadgets. (pending a better way to insert things into the HTML head) |
75 | | -* MediaWiki:Gadgets is parsed for every page request by a logged in user. |
| 76 | +* MediaWiki:Gadgets-definition is parsed for every page request by a logged in user. |
76 | 77 | It would be nice to make the MessageCache more flexible, so it can store |
77 | | - a parsed version of the MediaWiki:Gadgets. |
| 78 | + a parsed version of the MediaWiki:Gadgets-definition. |
78 | 79 | |