r81848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81847‎ | r81848 | r81849 >
Date:21:17, 9 February 2011
Author:laner
Status:deferred
Tags:
Comment:
Fixing localization message output.
Modified paths:
  • /trunk/extensions/OpenStackManager/special/SpecialNova.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaKey.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaProject.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaRole.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNova.php
@@ -10,7 +10,7 @@
1111
1212 $this->setHeaders();
1313 $wgOut->setPagetitle( wfMsg( 'openstackmanager-notloggedin' ) );
14 - $wgOut->addHTML( wfMsg( 'openstackmanager-mustbeloggedin' ) );
 14+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-mustbeloggedin' ) );
1515 }
1616
1717 /**
@@ -21,7 +21,7 @@
2222
2323 $this->setHeaders();
2424 $wgOut->setPagetitle( wfMsg( 'openstackmanager-nonovacred' ) );
25 - $wgOut->addHTML( wfMsg( 'openstackmanager-nonovacred-admincreate' ) );
 25+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonovacred-admincreate' ) );
2626 }
2727
2828 /**
@@ -32,7 +32,7 @@
3333
3434 $this->setHeaders();
3535 $wgOut->setPagetitle( wfMsg( 'openstackmanager-noaccount' ) );
36 - $wgOut->addHTML( wfMsg( 'openstackmanager-noaccount2' ) );
 36+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-noaccount2' ) );
3737 }
3838
3939 /**
@@ -45,13 +45,13 @@
4646 $this->setHeaders();
4747 if ( $role == 'sysadmin' ) {
4848 $wgOut->setPagetitle( wfMsg( 'openstackmanager-needsysadminrole' ) );
49 - $wgOut->addHTML( wfMsg( 'openstackmanager-needsysadminrole2' ) );
 49+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needsysadminrole2' ) );
5050 } else if ( $role == 'netadmin' ) {
5151 $wgOut->setPagetitle( wfMsg( 'openstackmanager-neednetadminrole' ) );
52 - $wgOut->addHTML( wfMsg( 'openstackmanager-neednetadminrole2' ) );
 52+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-neednetadminrole2' ) );
5353 } else if ( $role == 'cloudadmin' ) {
5454 $wgOut->setPagetitle( wfMsg( 'openstackmanager-needcloudadminrole' ) );
55 - $wgOut->addHTML( wfMsg( 'openstackmanager-needcloudadminrole2' ) );
 55+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-needcloudadminrole2' ) );
5656 }
5757 }
5858 }
Index: trunk/extensions/OpenStackManager/special/SpecialNovaRole.php
@@ -61,8 +61,7 @@
6262 }
6363 }
6464 if ( ! $member_keys ) {
65 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nomemberstoadd' ) );
66 - $wgOut->addHTML( $out );
 65+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoadd' ) );
6766 return true;
6867 }
6968 $roleInfo['members'] = array(
@@ -149,8 +148,7 @@
150149 }
151150 }
152151 if ( ! $member_keys ) {
153 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nomemberstoremove' ) );
154 - $wgOut->addHTML( $out );
 152+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nomemberstoremove' ) );
155153 return true;
156154 }
157155 $roleInfo = array();
@@ -243,8 +241,7 @@
244242 if ( $projectname ) {
245243 $project = OpenStackNovaProject::getProjectByName( $projectname );
246244 if ( ! $project ) {
247 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistentproject' ) );
248 - $wgOut->addHTML( $out );
 245+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
249246 return true;
250247 }
251248 $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project );
@@ -254,21 +251,19 @@
255252 $members = array( $formData['members'] );
256253 }
257254 if ( ! $role ) {
258 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistentrole' ) );
259 - $wgOut->addHTML( $out );
 255+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) );
260256 return true;
261257 }
262 - $out = '';
263258 foreach ( $members as $member ) {
264259 $success = $role->addMember( $member );
265260 if ( $success ) {
266 - $out .= Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addedto', array(), $member, $formData['rolename'] ) );
 261+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $member, $formData['rolename'] ) );
267262 } else {
268 - $out .= Html::element( 'p', array(), wfMsgExt( 'openstackmanager-failedtoadd', array(), $member, $formData['rolename'] ) );
 263+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $member, $formData['rolename'] ) );
269264 }
270265 }
271 - $out .= '<br />';
272266 $sk = $wgUser->getSkin();
 267+ $out = '<br />';
273268 $returnto = Title::newFromText( $formData['returnto'] );
274269 $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
275270 $wgOut->addHTML( $out );
@@ -288,8 +283,7 @@
289284 if ( $projectname ) {
290285 $project = OpenStackNovaProject::getProjectByName( $projectname );
291286 if ( ! $project ) {
292 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistentproject' ) );
293 - $wgOut->addHTML( $out );
 287+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
294288 return true;
295289 }
296290 $role = OpenStackNovaRole::getProjectRoleByName( $formData['rolename'], $project );
@@ -297,21 +291,19 @@
298292 $role = OpenStackNovaRole::getGlobalRoleByName( $formData['rolename'] );
299293 }
300294 if ( ! $role ) {
301 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistentrole' ) );
302 - $wgOut->addHTML( $out );
 295+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentrole' ) );
303296 return true;
304297 }
305 - $out = '';
306298 foreach ( $formData['members'] as $member ) {
307299 $success = $role->deleteMember( $member );
308300 if ( $success ) {
309 - $out .= Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removedfrom', array(), $member, $formData['rolename'] ) );
 301+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['rolename'] ) );
310302 } else {
311 - $out .= Html::element( 'p', array(), wfMsgExt( 'openstackmanager-failedtoremove', array(), $member, $formData['rolename'] ) );
 303+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['rolename'] ) );
312304 }
313305 }
314 - $out .= '<br />';
315306 $sk = $wgUser->getSkin();
 307+ $out = '<br />';
316308 $returnto = Title::newFromText( $formData['returnto'] );
317309 $out .= $sk->link( $returnto, wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
318310 $wgOut->addHTML( $out );
Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php
@@ -262,7 +262,7 @@
263263 if ( $wgOpenStackManagerPuppetOptions['enabled'] ) {
264264 $host = OpenStackNovaHost::getHostByInstanceId( $instanceid );
265265 if ( ! $host ) {
266 - $wgOut->addHTML( Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistanthost' ) ) );
 266+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) );
267267 return false;
268268 }
269269 $puppetinfo = $host->getPuppetConfiguration();
@@ -331,8 +331,7 @@
332332 }
333333 $instanceid = $wgRequest->getText( 'instanceid' );
334334 if ( ! $wgRequest->wasPosted() ) {
335 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-deleteinstancequestion', array(), $instanceid ) );
336 - $wgOut->addHTML( $out );
 335+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancequestion', $instanceid ) );
337336 }
338337 $instanceInfo = array();
339338 $instanceInfo['instanceid'] = array(
@@ -351,7 +350,6 @@
352351 $instanceForm->setTitle( SpecialPage::getTitleFor( 'NovaInstance' ) );
353352 $instanceForm->setSubmitID( 'novainstance-form-deleteinstancesubmit' );
354353 $instanceForm->setSubmitCallback( array( $this, 'tryDeleteSubmit' ) );
355 - $instanceForm->setSubmitText( 'confirm' );
356354 $instanceForm->show();
357355
358356 return true;
@@ -494,11 +492,9 @@
495493 global $wgOut, $wgUser;
496494 global $wgOpenStackManagerPuppetOptions;
497495
498 - $sk = $wgUser->getSkin();
499496 $domain = OpenStackNovaDomain::getDomainByName( $formData['domain'] );
500497 if ( !$domain ) {
501 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-invaliddomain' ) );
502 - $wgOut->addHtml( $out );
 498+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invaliddomain' ) );
503499 return true;
504500 }
505501 $instance = $this->userNova->createInstance( $formData['instancename'], $formData['imageType'], '', $formData['instanceType'], $formData['availabilityZone'], $formData['groups'] );
@@ -522,17 +518,17 @@
523519 $title = Title::newFromText( $wgOut->getPageTitle() );
524520 $job = new OpenStackNovaHostJob( $title, array( 'instanceid' => $instance->getInstanceId() ) );
525521 $job->insert();
526 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-createdinstance', array(),
527 - $instance->getInstanceID(), $instance->getImageId(),
528 - $host->getFullyQualifiedHostName() ) );
 522+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdinstance', $instance->getInstanceID(), $instance->getImageId(), $host->getFullyQualifiedHostName() ) );
529523 } else {
530524 $this->userNova->terminateInstance( $instance->getInstanceId() );
531 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createfailedldap' ) );
 525+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createfailedldap' ) );
532526 }
533527 # TODO: also add puppet
534528 } else {
535 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createinstancefailed' ) );
 529+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createeinstancefailed' ) );
536530 }
 531+ $sk = $wgUser->getSkin();
 532+ $out = '<br />';
537533 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
538534
539535 $wgOut->addHTML( $out );
@@ -547,11 +543,9 @@
548544 function tryDeleteSubmit( $formData, $entryPoint = 'internal' ) {
549545 global $wgOut, $wgUser;
550546
551 - $sk = $wgUser->getSkin();
552547 $instance = $this->adminNova->getInstance( $formData['instanceid'] );
553548 if ( ! $instance ) {
554 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistanthost' ) );
555 - $wgOut->addHtml( $out );
 549+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) );
556550 return true;
557551 }
558552 $instancename = $instance->getInstanceName();
@@ -560,13 +554,15 @@
561555 if ( $success ) {
562556 $success = OpenStackNovaHost::deleteHostByInstanceId( $instanceid );
563557 if ( $success ) {
564 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-deletedinstance', array(), $instanceid ) );
 558+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance', $instanceid ) );
565559 } else {
566 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-deletedinstance-faileddns', array(), $instancename, $instanceid ) );
 560+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedinstance-faileddns', $instancename, $instanceid ) );
567561 }
568562 } else {
569 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deleteinstancefailed' ) );
 563+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteinstancefailed' ) );
570564 }
 565+ $sk = $wgUser->getSkin();
 566+ $out = '<br />';
571567 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
572568
573569 $wgOut->addHTML( $out );
@@ -582,7 +578,6 @@
583579 global $wgOut, $wgUser;
584580 global $wgOpenStackManagerPuppetOptions;
585581
586 - $sk = $wgUser->getSkin();
587582 $host = OpenStackNovaHost::getHostByInstanceId( $formData['instanceid'] );
588583 if ( $host ) {
589584 $puppetinfo = array();
@@ -600,13 +595,15 @@
601596 }
602597 $success = $host->modifyPuppetConfiguration( $puppetinfo );
603598 if ( $success ) {
604 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-modifiedinstance' ) );
 599+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedinstance' ) );
605600 } else {
606 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-modifyinstancefailed' ) );
 601+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifyinstancefailed' ) );
607602 }
608603 } else {
609 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistanthost' ) );
 604+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistanthost' ) );
610605 }
 606+ $sk = $wgUser->getSkin();
 607+ $out = '<br /';
611608 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backinstancelist' ), array(), array(), array() );
612609
613610 $wgOut->addHTML( $out );
Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php
@@ -152,8 +152,7 @@
153153 }
154154 $securitygroupname = $wgRequest->getText( 'groupname' );
155155 if ( ! $wgRequest->wasPosted() ) {
156 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-deletesecuritygroup-confirm', array(), $securitygroupname ) );
157 - $wgOut->addHTML( $out );
 156+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroup-confirm', $securitygroupname ) );
158157 }
159158 $securityGroupInfo = array();
160159 $securityGroupInfo['groupname'] = array(
@@ -172,7 +171,6 @@
173172 $securityGroupForm->setTitle( SpecialPage::getTitleFor( 'NovaSecurityGroup' ) );
174173 $securityGroupForm->setSubmitID( 'novainstance-form-deletesecuritygroupsubmit' );
175174 $securityGroupForm->setSubmitCallback( array( $this, 'tryDeleteSubmit' ) );
176 - $securityGroupForm->setSubmitText( 'confirm' );
177175 $securityGroupForm->show();
178176
179177 return true;
@@ -398,8 +396,7 @@
399397 }
400398 $securitygroupname = $wgRequest->getText( 'groupname' );
401399 if ( ! $wgRequest->wasPosted() ) {
402 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removerule-confirm', array(), $securitygroupname ) );
403 - $wgOut->addHTML( $out );
 400+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerule-confirm', $securitygroupname ) );
404401 }
405402 $securityGroupInfo = array();
406403 $securityGroupInfo['groupname'] = array(
@@ -442,7 +439,6 @@
443440 $securityGroupForm->setTitle( SpecialPage::getTitleFor( 'NovaSecurityGroup' ) );
444441 $securityGroupForm->setSubmitID( 'novainstance-form-removerulesubmit' );
445442 $securityGroupForm->setSubmitCallback( array( $this, 'tryRemoveRuleSubmit' ) );
446 - $securityGroupForm->setSubmitText( 'confirm' );
447443 $securityGroupForm->show();
448444
449445 return true;
@@ -456,7 +452,6 @@
457453 function tryCreateSubmit( $formData, $entryPoint = 'internal' ) {
458454 global $wgOut, $wgUser;
459455
460 - $sk = $wgUser->getSkin();
461456 $project = $formData['project'];
462457 $groupname = $formData['groupname'];
463458 $description = $formData['description'];
@@ -464,10 +459,12 @@
465460 $this->userNova = new OpenStackNovaController( $userCredentials );
466461 $securitygroup = $this->userNova->createSecurityGroup( $groupname, $description );
467462 if ( $securitygroup ) {
468 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createdsecuritygroup' ) );
 463+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdsecuritygroup' ) );
469464 } else {
470 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createsecuritygroupfailed' ) );
 465+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createsecuritygroupfailed' ) );
471466 }
 467+ $sk = $wgUser->getSkin();
 468+ $out = '<br />';
472469 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
473470
474471 $wgOut->addHTML( $out );
@@ -482,24 +479,24 @@
483480 function tryDeleteSubmit( $formData, $entryPoint = 'internal' ) {
484481 global $wgOut, $wgUser;
485482
486 - $sk = $wgUser->getSkin();
487483 $project = $formData['project'];
488484 $userCredentials = $this->userLDAP->getCredentials( $project );
489485 $this->userNova = new OpenStackNovaController( $userCredentials );
490486 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
491487 if ( ! $securitygroup ) {
492 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistantsecuritygroup' ) );
493 - $wgOut->addHtml( $out );
 488+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
494489 return true;
495490 }
496491 $groupname = $securitygroup->getGroupName();
497492 $success = $this->userNova->deleteSecurityGroup( $groupname );
498493 if ( $success ) {
499494 # TODO: Ensure group isn't being used
500 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deletedsecuritygroup' ) );
 495+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedsecuritygroup' ) );
501496 } else {
502 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deletesecuritygroupfailed' ) );
 497+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletesecuritygroupfailed' ) );
503498 }
 499+ $sk = $wgUser->getSkin();
 500+ $out = '<br />';
504501 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
505502
506503 $wgOut->addHTML( $out );
@@ -515,21 +512,22 @@
516513 global $wgOut, $wgUser;
517514 global $wgOpenStackManagerPuppetOptions;
518515
519 - $sk = $wgUser->getSkin();
520516 $groupname = $formData['groupname'];
521517 $description = $formData['description'];
522518 $group = $this->adminNova->getSecurityGroup( $groupname );
523519 if ( $group ) {
524520 # This isn't a supported function in the API for now. Leave this action out for now
525 - $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description ));
 521+ $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description ) );
526522 if ( $success ) {
527 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-modifiedgroup' ) );
 523+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifiedgroup' ) );
528524 } else {
529 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-modifygroupfailed' ) );
 525+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-modifygroupfailed' ) );
530526 }
531527 } else {
532 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistantgroup' ) );
 528+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantgroup' ) );
533529 }
 530+ $sk = $wgUser->getSkin();
 531+ $out = '<br />';
534532 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
535533
536534 $wgOut->addHTML( $out );
@@ -544,7 +542,6 @@
545543 function tryAddRuleSubmit( $formData, $entryPoint = 'internal' ) {
546544 global $wgOut, $wgUser;
547545
548 - $sk = $wgUser->getSkin();
549546 $project = $formData['project'];
550547 $fromport = $formData['fromport'];
551548 $toport = $formData['toport'];
@@ -563,18 +560,19 @@
564561 $this->userNova = new OpenStackNovaController( $userCredentials );
565562 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
566563 if ( ! $securitygroup ) {
567 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistantsecuritygroup' ) );
568 - $wgOut->addHtml( $out );
 564+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
569565 return false;
570566 }
571567 $groupname = $securitygroup->getGroupName();
572568 $success = $this->userNova->addSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups );
573569 if ( $success ) {
574570 # TODO: Ensure group isn't being used
575 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-addedrule' ) );
 571+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedrule' ) );
576572 } else {
577 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-addrulefailed' ) );
 573+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addrulefailed' ) );
578574 }
 575+ $sk = $wgUser->getSkin();
 576+ $out = '<br />';
579577 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
580578
581579 $wgOut->addHTML( $out );
@@ -589,7 +587,6 @@
590588 function tryRemoveRuleSubmit( $formData, $entryPoint = 'internal' ) {
591589 global $wgOut, $wgUser;
592590
593 - $sk = $wgUser->getSkin();
594591 $project = $formData['project'];
595592 $fromport = $formData['fromport'];
596593 $toport = $formData['toport'];
@@ -611,18 +608,19 @@
612609 $this->userNova = new OpenStackNovaController( $userCredentials );
613610 $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] );
614611 if ( ! $securitygroup ) {
615 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistantsecuritygroup' ) );
616 - $wgOut->addHtml( $out );
 612+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistantsecuritygroup' ) );
617613 return false;
618614 }
619615 $groupname = $securitygroup->getGroupName();
620616 $success = $this->userNova->removeSecurityGroupRule( $groupname, $fromport, $toport, $protocol, $ranges, $groups );
621617 if ( $success ) {
622618 # TODO: Ensure group isn't being used
623 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-removedrule' ) );
 619+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedrule' ) );
624620 } else {
625 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-removerulefailed' ) );
 621+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removerulefailed' ) );
626622 }
 623+ $sk = $wgUser->getSkin();
 624+ $out = '<br />';
627625 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backsecuritygrouplist' ), array(), array(), array() );
628626
629627 $wgOut->addHTML( $out );
Index: trunk/extensions/OpenStackManager/special/SpecialNovaAddress.php
@@ -61,8 +61,7 @@
6262 $userCredentials = $this->userLDAP->getCredentials( $project );
6363 $this->userNova = new OpenStackNovaController( $userCredentials );
6464 if ( ! $wgRequest->wasPosted() ) {
65 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-allocateaddress-confirm', array(), $project ) );
66 - $wgOut->addHTML( $out );
 65+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddress-confirm', $project ) );
6766 }
6867 $addressInfo = array();
6968 $addressInfo['project'] = array(
@@ -101,8 +100,7 @@
102101 $this->userNova = new OpenStackNovaController( $userCredentials );
103102 $ip = $wgRequest->getText( 'ip' );
104103 if ( ! $wgRequest->wasPosted() ) {
105 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-releaseaddress-confirm', array(), $ip ) );
106 - $wgOut->addHTML( $out );
 104+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releaseaddress-confirm', $ip ) );
107105 }
108106 $addressInfo = array();
109107 $addressInfo['project'] = array(
@@ -198,8 +196,7 @@
199197 $this->userNova = new OpenStackNovaController( $userCredentials );
200198 $ip = $wgRequest->getText( 'ip' );
201199 if ( ! $wgRequest->wasPosted() ) {
202 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-disassociateaddress-confirm', array(), $ip ) );
203 - $wgOut->addHTML( $out );
 200+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociateaddress-confirm', $ip ) );
204201 }
205202 $addressInfo = array();
206203 $addressInfo['project'] = array(
@@ -298,8 +295,7 @@
299296 $domain = $wgRequest->getText( 'domain' );
300297 $hostname = $wgRequest->getText( 'hostname' );
301298 if ( ! $wgRequest->wasPosted() ) {
302 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removehost-confirm', array(), $hostname, $ip ) );
303 - $wgOut->addHTML( $out );
 299+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehost-confirm', $hostname, $ip ) );
304300 }
305301 $addressInfo = array();
306302 $addressInfo['project'] = array(
@@ -438,14 +434,13 @@
439435
440436 $address = $this->userNova->allocateAddress();
441437 if ( ! $address ) {
442 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-allocateaddressfailed' ) );
443 - $wgOut->addHTML( $out );
 438+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocateaddressfailed' ) );
444439 return true;
445440 }
446441 $ip = $address->getPublicIP();
447 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-allocatedaddress' , array(), $ip ) );
448 - $out .= '<br />';
 442+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-allocatedaddress', $ip ) );
449443 $sk = $wgUser->getSkin();
 444+ $out = '<br />';
450445 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
451446 $wgOut->addHTML( $out );
452447
@@ -466,24 +461,22 @@
467462 # then release the address
468463 $hosts = OpenStackNovaHost::getHostsByIP( $ip );
469464 if ( $hosts ) {
470 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-cannotreleaseaddress', array(), $ip ) );
471 - $wgOut->addHTML( $out );
 465+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) );
472466 return true;
473467 }
474468 $address = $this->adminNova->getAddress( $ip );
475469 if ( $address->getInstanceId() ) {
476 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-cannotreleaseaddress', array(), $ip ) );
477 - $wgOut->addHTML( $out );
 470+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-cannotreleaseaddress', $ip ) );
478471 return true;
479472 }
480473 $success = $this->userNova->releaseAddress( $ip );
481474 if ( $success ) {
482 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-releasedaddress', array(), $ip ) );
 475+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddress', $ip ) );
483476 } else {
484 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-releaseaddressfailed', array(), $ip ) );
 477+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-releasedaddressfailed', $ip ) );
485478 }
486 - $out .= '<br />';
487479 $sk = $wgUser->getSkin();
 480+ $out = '<br />';
488481 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
489482 $wgOut->addHTML( $out );
490483
@@ -502,12 +495,12 @@
503496 $ip = $formData['ip'];
504497 $address = $this->userNova->associateAddress( $instanceid, $ip );
505498 if ( $address ) {
506 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-associatedaddress', array(), $ip, $instanceid ) );
 499+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddress', $ip, $instanceid ) );
507500 } else {
508 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-associateaddressfailed', array(), $ip, $instanceid ) );
 501+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-associatedaddressfailed', $ip, $instanceid ) );
509502 }
510 - $out .= '<br />';
511503 $sk = $wgUser->getSkin();
 504+ $out = '<br />';
512505 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
513506 $wgOut->addHTML( $out );
514507
@@ -525,12 +518,12 @@
526519 $ip = $formData['ip'];
527520 $address = $this->userNova->disassociateAddress( $ip );
528521 if ( $address ) {
529 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-disassociatedaddress', array(), $ip ) );
 522+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddress', $ip ) );
530523 } else {
531 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-disassociateaddressfailed', array(), $ip ) );
 524+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-disassociatedaddressfailed', $ip ) );
532525 }
533 - $out .= '<br />';
534526 $sk = $wgUser->getSkin();
 527+ $out = '<br />';
535528 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
536529 $wgOut->addHTML( $out );
537530
@@ -549,13 +542,11 @@
550543 $project = $formData['project'];
551544 $address = $this->adminNova->getAddress( $ip );
552545 if ( ! $address ) {
553 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-invalidaddress', array(), $ip ) );
554 - $wgOut->addHTML( $out );
 546+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) );
555547 return true;
556548 }
557549 if ( $address->getProject() != $project ) {
558 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-invalidaddressforproject', array(), $ip ) );
559 - $wgOut->addHTML( $out );
 550+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) );
560551 return true;
561552 }
562553 $hostname = $formData['hostname'];
@@ -568,29 +559,29 @@
569560 # We need to add an arecord, if the arecord doesn't already exist
570561 $success = $hostbyname->addARecord( $ip );
571562 if ( $success ) {
572 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addedhost', array(), $hostname, $ip ) );
 563+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
573564 } else {
574 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addhostfailed', array(), $ip, $hostname ) );
 565+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
575566 }
576567 } else if ( $hostbyip ) {
577568 # We need to add an associateddomain, if the associateddomain doesn't already exist
578569 $success = $hostbyip->addAssociatedDomain( $hostname . '.' . $domain->getFullyQualifiedDomainName() );
579570 if ( $success ) {
580 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addedhost', array(), $hostname, $ip ) );
 571+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
581572 } else {
582 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addhostfailed', array(), $ip, $hostname ) );
 573+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
583574 }
584575 } else {
585576 # This is a new host entry
586577 $host = OpenStackNovaHost::addPublicHost( $hostname, $ip, $domain );
587578 if ( $host ) {
588 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addedhost', array(), $hostname, $ip ) );
 579+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedhost', $hostname, $ip ) );
589580 } else {
590 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addhostfailed', array(), $ip, $hostname ) );
 581+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addhostfailed', $ip, $hostname ) );
591582 }
592583 }
593 - $out .= '<br />';
594584 $sk = $wgUser->getSkin();
 585+ $out = '<br />';
595586 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
596587 $wgOut->addHTML( $out );
597588 return true;
@@ -608,13 +599,11 @@
609600 $project = $formData['project'];
610601 $address = $this->adminNova->getAddress( $ip );
611602 if ( ! $address ) {
612 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-invalidaddress', array(), $ip ) );
613 - $wgOut->addHTML( $out );
 603+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddress', $ip ) );
614604 return true;
615605 }
616606 if ( $address->getProject() != $project ) {
617 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-invalidaddressforproject', array(), $ip ) );
618 - $wgOut->addHTML( $out );
 607+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidaddressforproject', $ip ) );
619608 return true;
620609 }
621610 $hostname = $formData['hostname'];
@@ -628,23 +617,23 @@
629618 # We need to keep the host, but remove the fqdn
630619 $success = $host->deleteAssociatedDomain( $fqdn );
631620 if ( $success ) {
632 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removedhost', array(), $hostname, $ip ) );
 621+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) );
633622 } else {
634 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removehostfailed', array(), $ip, $hostname ) );
 623+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) );
635624 }
636625 } else {
637626 # We need to remove the host entry
638627 $success = OpenStackNovaHost::deleteHost( $hostname, $domain );
639628 if ( $success ) {
640 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removedhost', array(), $hostname, $ip ) );
 629+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedhost', $hostname, $ip ) );
641630 } else {
642 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removehostfailed', array(), $ip, $hostname ) );
 631+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removehostfailed', $ip, $hostname ) );
643632 }
644633 }
645634 } else {
646 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-nonexistenthost', array() ) );
 635+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistenthost' ) );
647636 }
648 - $out .= '<br />';
 637+ $out = '<br />';
649638 $sk = $wgUser->getSkin();
650639 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backaddresslist' ), array(), array(), array() );
651640 $wgOut->addHTML( $out );
Index: trunk/extensions/OpenStackManager/special/SpecialNovaProject.php
@@ -175,8 +175,7 @@
176176
177177 $project = $wgRequest->getText( 'projectname' );
178178 if ( ! $wgRequest->wasPosted() ) {
179 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removeprojectconfirm', array(), $project ) );
180 - $wgOut->addHTML( $out );
 179+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removeprojectconfirm', $project ) );
181180 }
182181 $projectInfo = array();
183182 $projectInfo['projectname'] = array(
@@ -191,7 +190,6 @@
192191 $projectForm->setTitle( SpecialPage::getTitleFor( 'NovaProject' ) );
193192 $projectForm->setSubmitID( 'novaproject-form-deleteprojectsubmit' );
194193 $projectForm->setSubmitCallback( array( $this, 'tryDeleteSubmit' ) );
195 - $projectForm->setSubmitText( 'confirm' );
196194 $projectForm->show();
197195
198196 return true;
@@ -283,13 +281,12 @@
284282
285283 $success = OpenStackNovaProject::createProject( $formData['projectname'] );
286284 if ( ! $success ) {
287 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createprojectfailed' ) );
288 - $wgOut->addHTML( $out );
 285+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createprojectfailed' ) );
289286 return true;
290287 }
291 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createdproject' ) );
292 - $out .= '<br />';
 288+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdproject' ) );
293289 $sk = $wgUser->getSkin();
 290+ $out = '<br />';
294291 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
295292 $wgOut->addHTML( $out );
296293
@@ -306,12 +303,12 @@
307304
308305 $success = OpenStackNovaProject::deleteProject( $formData['projectname'] );
309306 if ( $success ) {
310 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deletedproject' ) );
 307+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedproject' ) );
311308 } else {
312 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deleteprojectfailed' ) );
 309+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteprojectfailed' ) );
313310 }
314 - $out .= '<br />';
315311 $sk = $wgUser->getSkin();
 312+ $out = '<br />';
316313 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
317314 $wgOut->addHTML( $out );
318315
@@ -329,14 +326,12 @@
330327 $project = new OpenStackNovaProject( $formData['projectname'] );
331328 $success = $project->addMember( $formData['member'] );
332329 if ( $success ) {
333 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-addedto', array(), $formData['member'],
334 - $formData['projectname'] ) );
 330+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-addedto', $formData['member'], $formData['projectname'] ) );
335331 } else {
336 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-failedtoadd', array(), $formData['member'],
337 - $formData['projectname'] ) );
 332+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoadd', $formData['member'], $formData['projectname'] ) );
338333 }
339 - $out .= '<br />';
340334 $sk = $wgUser->getSkin();
 335+ $out = '<br />';
341336 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
342337 $wgOut->addHTML( $out );
343338
@@ -353,20 +348,18 @@
354349
355350 $project = OpenStackNovaProject::getProjectByName( $formData['projectname'] );
356351 if ( ! $project ) {
357 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-nonexistentproject' ) );
358 - $wgOut->addHTML( $out );
 352+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-nonexistentproject' ) );
359353 return true;
360354 }
361 - $out = '';
362355 foreach ( $formData['members'] as $member ) {
363356 $success = $project->deleteMember( $member );
364357 if ( $success ) {
365 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-removedfrom', array(), $member, $formData['projectname'] ) );
 358+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-removedfrom', $member, $formData['projectname'] ) );
366359 } else {
367 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-failedtoremove', array(), $member, $formData['projectname'] ) );
 360+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedtoremove', $member, $formData['projectname'] ) );
368361 }
369362 }
370 - $out .= '<br />';
 363+ $out = '<br />';
371364 $sk = $wgUser->getSkin();
372365 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backprojectlist' ), array(), array(), array() );
373366 $wgOut->addHTML( $out );
Index: trunk/extensions/OpenStackManager/special/SpecialNovaDomain.php
@@ -106,8 +106,7 @@
107107
108108 $domainname = $wgRequest->getText( 'domainname' );
109109 if ( ! $wgRequest->wasPosted() ) {
110 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-deletedomain-confirm', array(), $domainname ) );
111 - $wgOut->addHTML( $out );
 110+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedomain-confirm', $domainname ) );
112111 }
113112 $domainInfo = array();
114113 $domainInfo['domainname'] = array(
@@ -122,7 +121,6 @@
123122 $domainForm->setTitle( SpecialPage::getTitleFor( 'NovaDomain' ) );
124123 $domainForm->setSubmitID( 'novadomain-form-deletedomainsubmit' );
125124 $domainForm->setSubmitCallback( array( $this, 'tryDeleteSubmit' ) );
126 - $domainForm->setSubmitText( 'confirm' );
127125 $domainForm->show();
128126
129127 return true;
@@ -175,13 +173,12 @@
176174
177175 $success = OpenStackNovaDomain::createDomain( $formData['domainname'], $formData['fqdn'], $formData['location'] );
178176 if ( ! $success ) {
179 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createdomainfailed' ) );
180 - $wgOut->addHTML( $out );
 177+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createdomainfailed' ) );
181178 return true;
182179 }
183 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-createddomain' ) );
184 - $out .= '<br />';
 180+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-createddomain' ) );
185181 $sk = $wgUser->getSkin();
 182+ $out = '<br />';
186183 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() );
187184 $wgOut->addHTML( $out );
188185
@@ -198,12 +195,12 @@
199196
200197 $success = OpenStackNovaDomain::deleteDomain( $formData['domainname'] );
201198 if ( $success ) {
202 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deleteddomain' ) );
 199+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deleteddomain' ) );
203200 } else {
204 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-failedeletedomain' ) );
 201+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-failedeleteddomain' ) );
205202 }
206 - $out .= '<br />';
207203 $sk = $wgUser->getSkin();
 204+ $out = '<br />';
208205 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backdomainlist' ), array(), array(), array() );
209206 $wgOut->addHTML( $out );
210207
Index: trunk/extensions/OpenStackManager/special/SpecialNovaKey.php
@@ -120,9 +120,8 @@
121121 $hash = $wgRequest->getVal( 'hash' );
122122 $keypairs = $this->userLDAP->getKeypairs();
123123 if ( ! $wgRequest->wasPosted() ) {
124 - $out = Html::element( 'pre', array(), $keypairs[$hash] );
125 - $out .= Html::element( 'p', array(), wfMsg( 'openstackmanager-deletekeyconfirm' ) );
126 - $wgOut->addHTML( $out );
 124+ $wgOut->addHTML( Html::element( 'pre', array(), $keypairs[$hash] ) );
 125+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletekeyconfirm' ) );
127126 }
128127 $keyInfo['hash'] = array(
129128 'type' => 'hidden',
@@ -141,7 +140,6 @@
142141 $keyForm->setTitle( SpecialPage::getTitleFor( 'NovaKey' ) );
143142 $keyForm->setSubmitID( 'novakey-form-deletekeysubmit' );
144143 $keyForm->setSubmitCallback( array( $this, 'tryDeleteSubmit' ) );
145 - $keyForm->setSubmitText( 'confirm' );
146144 $keyForm->show();
147145 return true;
148146 }
@@ -191,7 +189,7 @@
192190 }
193191 $out .= Html::rawElement( 'table', array(), $keysOut );
194192 } else {
195 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-invalidkeypair' ) );
 193+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) );
196194 }
197195
198196 $wgOut->addHTML( $out );
@@ -209,23 +207,21 @@
210208 if ( $wgOpenStackManagerNovaKeypairStorage == 'ldap' ) {
211209 $success = $this->userLDAP->importKeypair( $formData['key'] );
212210 if ( ! $success ) {
213 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-keypairimportfailed' ) );
214 - $wgOut->addHTML( $out );
 211+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportfailed' ) );
215212 return true;
216213 }
217 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-keypairimported' ) );
 214+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimported' ) );
218215 } else if ( $wgOpenStackManagerNovaKeypairStorage == 'nova' ) {
219216 # wgOpenStackManagerNovaKeypairStorage == 'nova'
220217 # OpenStack's EC2 API doesn't yet support importing keys, use
221218 # of this option isn't currently recommended
222219 $keypair = $this->userNova->importKeypair( $formData['keyname'], $formData['key'] );
223220
224 - $out = Html::element( 'p', array(), wfMsgExt( 'openstackmanager-keypairimportedfingerprint', array(),
225 - $keypair->getKeyName(), $keypair->getKeyFingerprint() ) );
 221+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-keypairimportedfingerprint', $keypair->getKeyName(), $keypair->getKeyFingerprint() ) );
226222 } else {
227 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-invalidkeypair' ) );
 223+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-invalidkeypair' ) );
228224 }
229 - $out .= '<br />';
 225+ $out = '<br />';
230226 $sk = $wgUser->getSkin();
231227 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() );
232228 $wgOut->addHTML( $out );
@@ -243,11 +239,11 @@
244240
245241 $success = $this->userLDAP->deleteKeypair( $formData['key'] );
246242 if ( $success ) {
247 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deletedkey' ) );
 243+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkey' ) );
248244 } else {
249 - $out = Html::element( 'p', array(), wfMsg( 'openstackmanager-deletedkeyfailed' ) );
 245+ $wgOut->wrapWikiMsg( '<div>$1</div>', array( 'openstackmanager-deletedkeyfailed' ) );
250246 }
251 - $out .= '<br />';
 247+ $out = '<br />';
252248 $sk = $wgUser->getSkin();
253249 $out .= $sk->link( $this->getTitle(), wfMsg( 'openstackmanager-backkeylist' ), array(), array(), array() );
254250 $wgOut->addHTML( $out );

Status & tagging log