r50970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50969‎ | r50970 | r50971 >
Date:23:50, 24 May 2009
Author:nad
Status:deferred (Comments)
Tags:
Comment:
Add type to record edit title
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin.i18n.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -165,7 +165,7 @@
166166 $rtitle = Title::newFromText( $record );
167167 $article = new Article( $rtitle );
168168 $text = $article->fetchContent();
169 - $wgOut->addWikiText( "== " . wfMsg( 'recordadmin-edit', $rtitle->getPrefixedText() ) . " ==\n" );
 169+ $wgOut->addWikiText( "== " . wfMsg( 'recordadmin-edit', $rtitle->getPrefixedText(), $type ) . " ==\n" );
170170
171171 # Update article if form posted
172172 if ( count( $posted ) && $rtitle->userCan( 'edit', false ) ) {
Index: trunk/extensions/RecordAdmin/RecordAdmin.i18n.php
@@ -35,7 +35,7 @@
3636 'recordadmin-buttonreset' => 'Reset',
3737 'recordadmin-searchresult' => 'Search results',
3838 'recordadmin-nomatch' => 'No matching records found!',
39 - 'recordadmin-edit' => 'Editing "$1"',
 39+ 'recordadmin-edit' => 'Editing $2 record "$1"',
4040 'recordadmin-typeupdated' => '$1 properties updated',
4141 'recordadmin-updatesuccess' => '$1 updated',
4242 'recordadmin-updateerror' => 'An error occurred during update',

Comments

#Comment by Siebrand (talk | contribs)   05:40, 25 May 2009

What values (type of record I understand from the summary) can $2 have? Need this documented for the translators.

#Comment by Nad (talk | contribs)   21:52, 27 May 2009

$1 is the name of the record and $2 is its type, what actual values they can have depends on the types of records the users have created in their wiki, but is usually things like "Issue", "Activity", "Invoice", "Person" etc

Status & tagging log