r62360 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62359‎ | r62360 | r62361 >
Date:12:08, 12 February 2010
Author:raymond
Status:ok
Tags:
Comment:
Some tweaks for integration into translatwiki:
* Update extension credits per our convention
* Add linebreaks in i18n file
* Do not hardcode colons. Move them into the messages (some languages use other characters as colon and/or a space before)
* Add $wgSpecialPageGroups
* Remove useless ?>
Modified paths:
  • /trunk/extensions/RefHelper/RefHelper.alias.php (modified) (history)
  • /trunk/extensions/RefHelper/RefHelper.create.php (modified) (history)
  • /trunk/extensions/RefHelper/RefHelper.i18n.php (modified) (history)
  • /trunk/extensions/RefHelper/RefHelper.php (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/RefHelper/RefHelper.i18n.php
@@ -1,33 +1,42 @@
22 <?php
 3+/**
 4+ * Internationalisation file for extension RefHelper.
 5+ *
 6+ * @addtogroup Extensions
 7+*/
 8+
39 $messages = array();
410
511 $messages['en'] = array(
612 'refhelper' => 'Reference helper',
713 'refsearch' => 'Reference search', /* not sure how to use the below */
 14+ 'refhelper-desc' => 'Helps to create pages for references',
815 'refhelper-refsearch' => 'Reference search',
916 'refhelper-refcreate_legend' => 'Create new reference',
10 - 'refhelper-refsearch_legend' => 'Search Pubmed for references',
 17+ 'refhelper-refsearch_legend' => 'Search PubMed for references',
1118 'refhelper-refcreate_another' => 'Create another reference',
1219 'refhelper-refcreate_autocomment' => 'Automated page creation.',
13 - 'refhelper-refcreate_success' => 'The page [[$1]] didn\'t exist and has been created.',
 20+ 'refhelper-refcreate_success' => "The page [[$1]] didn't exist and has been created.",
1421 'refhelper-refcreate_failure' => 'The page [[$1]] already exists!',
15 - 'refhelper-label_workspace' => 'Workspace (copy and paste area)',
16 - 'refhelper-label_authorforename' => 'Author $1\'s first name',
17 - 'refhelper-label_authorsurname' => 'Surname',
18 - 'refhelper-title' => 'Title',
19 - 'refhelper-journal' => 'Journal',
20 - 'refhelper-volume' => 'Volume',
21 - 'refhelper-pages' => 'Pages',
22 - 'refhelper-year' => 'Year',
23 - 'refhelper-refname' => 'Ref Name',
24 - 'refhelper-category' => 'Category $1',
 22+ 'refhelper-label_workspace' => 'Workspace (copy and paste area):',
 23+ 'refhelper-label_authorforename' => "Author $1's first name:",
 24+ 'refhelper-label_authorsurname' => 'Surname:',
 25+ 'refhelper-title' => 'Title:',
 26+ 'refhelper-journal' => 'Journal:',
 27+ 'refhelper-volume' => 'Volume:',
 28+ 'refhelper-pages' => 'Pages:',
 29+ 'refhelper-year' => 'Year:',
 30+ 'refhelper-refname' => 'Ref name:',
 31+ 'refhelper-category' => 'Category $1:',
2532 'refhelper-create' => 'Create',
2633 'refhelper-search' => 'Search',
2734 'refhelper-toolbox_link_create' => 'Create reference',
2835 'refhelper-toolbox_link_search' => 'Create reference from search',
29 - 'refhelper-newarticle_nocitation' => 'There is currently no citation with this name. ',
30 - 'refhelper-newarticle_suggestions' => "If there is a matching citation from below, you can create this page by clicking on the corresponding \"Create\" button.\n<h2>Suggestions</h2>\n",
31 - 'refhelper-newarticle_nosuggestions' => "Unfortunately, I was unable to suggest any references. You can [[Special:RefHelper|add the reference manually]] or [[Special:RefSearch|search for the citation to add]].\n",
 36+ 'refhelper-newarticle_nocitation' => 'There is currently no citation with this name.',
 37+ 'refhelper-newarticle_suggestions' => 'If there is a matching citation from below, you can create this page by clicking on the corresponding "Create" button.
 38+
 39+<h2>Suggestions</h2>',
 40+ 'refhelper-newarticle_nosuggestions' => 'Unfortunately, I was unable to suggest any references.
 41+You can [[Special:RefHelper|add the reference manually]] or [[Special:RefSearch|search for the citation to add]].',
 42+);
3243
33 -);
34 -?>
Index: trunk/extensions/RefHelper/RefHelper.php
@@ -18,11 +18,12 @@
1919 }
2020
2121 $wgExtensionCredits['specialpage'][] = array(
 22+ 'path' => __FILE__,
2223 'name' => 'RefHelper',
2324 'author' => 'Jonathan Williford',
24 - 'url' => 'http://neurov.is/on',
 25+ 'url' => 'http://www.mediawiki.org/wiki/Extension:RefHelper',
2526 'description' => 'This extension helps create pages for references.',
26 - 'descriptionmsg' => 'This extension helps create pages for references.',
 27+ 'descriptionmsg' => 'refhelper-desc',
2728 'version' => '0.0.2',
2829 );
2930
@@ -56,3 +57,6 @@
5758 $wgExtensionAliasesFiles['RefHelper'] = $dir . 'RefHelper.alias.php';
5859 $wgSpecialPages['RefHelper'] = 'RefHelper';
5960 $wgSpecialPages['RefSearch'] = 'RefSearch';
 61+$wgSpecialPageGroups['RefHelper'] = 'other';
 62+$wgSpecialPageGroups['RefSearch'] = 'other';
 63+
Index: trunk/extensions/RefHelper/RefHelper.create.php
@@ -14,7 +14,7 @@
1515 private function addTableRow( &$out, $varname, $varval, $label, $size = 50 ) {
1616 $out->addHTML( Xml::openElement('tr'));
1717 $out->addHTML( Xml::openElement('td',array('class'=>'mw-label')));
18 - $out->addHTML( Xml::element('label',array('for'=>$varname),"$label:"));
 18+ $out->addHTML( Xml::element('label',array('for'=>$varname),"$label"));
1919 $out->addHTML( Xml::closeElement('td'));
2020 $out->addHTML( Xml::openElement('td'));
2121 $out->addHTML( Xml::input($varname,$size,$varval,array('id'=>"inp_$varname")));
@@ -27,7 +27,7 @@
2828 private function add2ColTableRow( &$out, $varname1, $varname2, $varval1, $varval2, $label1, $label2 ) {
2929 $out->addHTML( Xml::openElement('tr'));
3030 $out->addHTML( Xml::openElement('td',array('class'=>'mw-label')));
31 - $out->addHTML( Xml::element('label', array('for'=>$varname1),"$label1:"));
 31+ $out->addHTML( Xml::element('label', array('for'=>$varname1),"$label1"));
3232 $out->addHTML( Xml::closeElement('td'));
3333 $out->addHTML( Xml::openElement('td'));
3434 $out->addHTML( Xml::input($varname1,15,$varval1,array('id'=>"inp_$varname1",'oninput'=>'updateFirstName(event)')));
Index: trunk/extensions/RefHelper/RefHelper.alias.php
@@ -5,4 +5,4 @@
66 $aliases['en'] = array(
77 'RefHelper' => array( 'RefHelper' ),
88 );
9 -?>
 9+
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -870,6 +870,9 @@
871871 Redirect
872872 ignored = redirect-addnewaccount, redirect-userlogincomplete, redirect-userlogoutcomplete
873873
 874+Ref Helper
 875+aliasfile = RefHelper/RefHelper.alias.php
 876+
874877 Refresh Special
875878 aliasfile = RefreshSpecial/RefreshSpecial.alias.php
876879

Status & tagging log