r51056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51055‎ | r51056 | r51057 >
Date:11:37, 27 May 2009
Author:shinjiman
Status:deferred
Tags:
Comment:
follow up r51055, fix up i18n for Call extension
Modified paths:
  • /trunk/extensions/Call/Call.i18n.php (modified) (history)
  • /trunk/extensions/Call/Call_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Call/Call.i18n.php
@@ -11,15 +11,15 @@
1212 'call' => 'Call',
1313 'call-desc' => 'Create a hyperlink to a template (or to a normal wiki page) with parameter passing.
1414 Can be used at the browser’s command line or within wiki text',
15 - 'call-text' => 'The Call extension expects a wiki page and optional parameters for that page as an argument.
 15+ 'call-text' => 'The Call extension expects a wiki page and optional parameters for that page as an argument.<br /><br />
1616
1717 Example 1: &nbsp; <tt>[[Special:Call/My Template,parm1=value1]]</tt><br />
1818 Example 2: &nbsp; <tt>[[Special:Call/Talk:My Discussion,parm1=value1]]</tt><br />
1919 Example 3: &nbsp; <tt>[[Special:Call/:My Page,parm1=value1,parm2=value2]]</tt><br />
20 -Example 4 (Browser URL): &nbsp; <tt>http://mydomain/mywiki/index.php?Special:Call/:My Page,parm1=value1</tt>
 20+Example 4 (Browser URL): &nbsp; <tt>http://mydomain/mywiki/index.php?Special:Call/:My Page,parm1=value1</tt><br /><br />
2121
2222 The <i>Call extension</i> will call the given page and pass the parameters.<br />
23 -You will see the contents of the called page and its title but its \'type\' will be that of a special page, i.e. such a page cannot be edited.<br />The contents you see may vary depending on the value of the parameters you passed.
 23+You will see the contents of the called page and its title but its \'type\' will be that of a special page, i.e. such a page cannot be edited.<br />The contents you see may vary depending on the value of the parameters you passed.<br /><br />
2424
2525 The <i>Call extension</i> is useful to build interactive applications with MediaWiki.<br />
2626 For an example see <a href=\'http://semeb.com/dpldemo/Template:Catlist\'>the DPL GUI</a> ..<br />
Index: trunk/extensions/Call/Call_body.php
@@ -32,7 +32,7 @@
3333 {
3434 function Call() {
3535 SpecialPage::SpecialPage("Call");
36 - self::loadMessages();
 36+ wfLoadExtensionMessages('Call');
3737 }
3838
3939
@@ -138,22 +138,12 @@
139139
140140 if ($wikitext=='' || $wikitext=='Special:Call' ) {
141141 // Called without parameters: dump explanation
142 - $wgOut->addHTML("The Call extension expects a wiki page and optional parameters for that page as an argument.<br>\n<br>\n"
143 - ."Example 1: &nbsp; <tt>[[Special:Call/My Template,parm1=value1]]</tt><br/>\n"
144 - ."Example 2: &nbsp; <tt>[[Special:Call/Talk:My Discussion,parm1=value1]]</tt><br/>\n"
145 - ."Example 3: &nbsp; <tt>[[Special:Call/:My Page,parm1=value1,parm2=value2]]</tt><br/>\n<br/>\n"
146 - ."Example 4 (Browser URL): &nbsp; <tt>http://mydomain/mywiki/index.php?Special:Call/:My Page,parm1=value1</tt><br/>\n<br/>"
147 - ."The <i>Call extension</i> will call the given page and pass the parameters.<br>\n"
148 - ."You will see the contents of the called page and its title but its 'type' will be that of a special page,<br>"
149 - ."i.e. such a page cannot be edited.<br>The contents you see may vary depending on the value of the parameters you passed.<br>\n<br>"
150 - ."The <i>Call extension</i> is useful to build interactive applications with MediaWiki.<br>\n"
151 - ."For an example see <a href='http://semeb.com/dpldemo/Template:Catlist'>the DPL GUI</a> ..<br/>\n"
152 - ."In case of problems you can try <b>Special:Call/DebuG</b>\n");
 142+ $wgOut->addHTML(wfMsg('call-text'));
153143 }
154144 else if ($debug) {
155145 // Called with DebuG target: dump parameter list
156146 $wgOut->addHTML("<pre>\n{{".$wikitext."}}\n</pre>");
157 - if ($saveAsPage!='') $wgOut->addHTML("The output of this call would be saved to a page called ''$saveAsPageLink''.");
 147+ if ($saveAsPage!='') $wgOut->addHTML( wfMsg('call-save',$saveAsPageLink) );
158148 }
159149 else {
160150 $parm=array();
@@ -175,11 +165,10 @@
176166 if (!($saveAsTitle->exists())) {
177167 $article = new Article($saveAsTitle);
178168 $article->doEdit( $rawText, $saveAsPage, EDIT_NEW | EDIT_FORCE_BOT );
179 - $wgOut->addHTML($wgOut->parse("The following text has been saved to page <big>[[$saveAsPageLink]]</big>."));
 169+ $wgOut->addHTML($wgOut->parse(wfMsg('call-save-success' ,$saveAsPageLink) ) );
180170 }
181171 else {
182 - $wgOut->addHTML($wgOut->parse("The following text has NOT been saved to page <big>[[$saveAsPageLink]]</big> ".
183 - "because that page already exists."));
 172+ $wgOut->addHTML($wgOut->parse(wfMsg('call-save-failed',$saveAsPageLink) ) );
184173 }
185174 // output the text we produced as a note to the user
186175 if ($link1!='') $wgOut->addHTML($wgOut->parse("[[Special:Call/$link1|$label1]]"));

Follow-up revisions

RevisionCommit summaryAuthorDate
r51057follow up r51055 and r51056, remove unused function loadMessages().shinjiman11:44, 27 May 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51055Update the Call codebase to 0.7...shinjiman10:51, 27 May 2009

Status & tagging log