r24501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24500‎ | r24501 | r24502 >
Date:22:28, 31 July 2007
Author:daniel
Status:old
Tags:
Comment:
fixed i18n issues
Modified paths:
  • /trunk/extensions/Gadgets/Gadgets.i18n.de.php (modified) (history)
  • /trunk/extensions/Gadgets/Gadgets.i18n.php (modified) (history)
  • /trunk/extensions/Gadgets/Gadgets.php (modified) (history)
  • /trunk/extensions/Gadgets/README (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/Gadgets.i18n.php
@@ -11,19 +11,19 @@
1212 */
1313
1414 #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.
1717 These gadgets are mostly based on JavaScript, so JavaScript has to be enabled in your browser for them to work.
1818 Note that these gadgets will have no effect on this preferences page.
1919
2020 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]]
2222 and [[Special:Gadgets]].';
2323
2424 #for Special:Gadgets
2525 $messages['gadgets'] = 'Gadgets';
2626 $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]].
2828 This overview provides easy access to the system message pages that define each gadget\'s description and code.';
2929 $messages['gadgets-uses'] = 'Uses';
3030 ?>
Index: trunk/extensions/Gadgets/Gadgets.php
@@ -28,6 +28,7 @@
2929 $wgHooks['RenderPreferencesForm'][] = 'wfGadgetsRenderPreferencesForm';
3030 $wgHooks['ResetPreferences'][] = 'wfGadgetsResetPreferences';
3131 $wgHooks['BeforePageDisplay'][] = 'wfGadgetsBeforePageDisplay';
 32+$wgHooks['LoadAllMessages'][] = "loadGadgetsI18n";
3233
3334 $wgAutoloadClasses['SpecialGadgets'] = dirname( __FILE__ ) . '/SpecialGadgets.php';
3435 $wgSpecialPages['Gadgets'] = 'SpecialGadgets';
@@ -56,8 +57,9 @@
5758
5859 if ( $gadgets !== NULL ) return $gadgets;
5960
60 - $g = wfMsgForContentNoTrans( "Gadgets" );
61 - if ( wfEmptyMsg( "Gadgets", $g ) ) {
 61+ $g = wfMsgForContentNoTrans( "Gadgets-definition" );
 62+ if ( wfEmptyMsg( "Gadgets-definition", $g ) ) {
 63+ print "((NO GADGETS))";
6264 $gadgets = false;
6365 return $gadgets;
6466 }
@@ -115,10 +117,9 @@
116118
117119 loadGadgetsI18n();
118120
119 - $out->addHtml( "\n<fieldset>\n<legend>" . wfMsgHtml( 'gadgetprefs' ) . "</legend>\n" );
 121+ $out->addHtml( "\n<fieldset>\n<legend>" . wfMsgHtml( 'gadgets-prefs' ) . "</legend>\n" );
120122
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" );
123124
124125 $msgOpt = array( 'parseinline', 'parsemag' );
125126
@@ -139,7 +140,6 @@
140141 }
141142 }
142143
143 - #$out->addHtml( "<p>" . wfMsgWikiHtml( 'gadgetreloadhint' ) . "</p>\n" );
144144 $out->addHtml( "</fieldset>\n\n" );
145145
146146 return true;
@@ -211,6 +211,8 @@
212212
213213 $initialized = true;
214214 $wgMessageCache->addMessages( $messages );
 215+
 216+ return true;
215217 }
216218
217219 ?>
\ No newline at end of file
Index: trunk/extensions/Gadgets/Gadgets.i18n.de.php
@@ -11,19 +11,19 @@
1212 */
1313
1414 #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.
1717 Die Gadgets basieren zumeinst auf JavaScript, daher muss JavaScript im Browser aktiviert sein, damit sie funktionieren.
1818 Die Gadgets funktionieren allerdings nicht auf dieser Seite mit persönlichen Einstellungen.
1919
2020 Ausserdem ist zu beachten, dass diese Gadgets im Allgemeinen nicht Teil von MediaWiki sind, sondern meist von
2121 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';
2323
2424 #for Special:Gadgets
2525 $messages['gadgets'] = 'Gadgets';
2626 $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.
2828 Diese Übersicht bietet direkten Zugang zu den Systemnachrichten, die die Beschreibung sowie den Programmcode jedes
2929 Gadgets enthalten.';
3030 $messages['gadgets-uses'] = 'Benutzt';
Index: trunk/extensions/Gadgets/README
@@ -23,14 +23,15 @@
2424 require_once( "$IP/extensions/Gadgets/Gadgets.php" );
2525
2626 == 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.
3233
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:
3536
3637 * mygadget|mygadget.js|mygadget.css
3738
@@ -51,7 +52,7 @@
5253 * frobinator|commonStuff.js|frob.js|frob.css|pretty.css
5354 * l33t|commonStuff.js|tools.js|l33t.js
5455
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
5657 lines that start and end with two or more "=" (equals) characters, enclosing
5758 the name of a system message that defines the section's name - for example:
5859
@@ -71,7 +72,7 @@
7273 * Gadget code is included after user code - that means that user JS has no
7374 access to things defined in gadgets, and user CSS is overwritten by CSS
7475 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.
7677 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.
7879

Status & tagging log