Lbenedix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53172


Change subject: added i18n to specialpage changed the userrights
......................................................................

added i18n to specialpage
changed the userrights

Change-Id: I36b860d190bca7906f621fc28a3aabe6a1d62d07
---
M SpecialUiFeedback.php
M UiFeedback.i18n.php
M UiFeedback.php
3 files changed, 171 insertions(+), 98 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UIFeedback 
refs/changes/72/53172/1

diff --git a/SpecialUiFeedback.php b/SpecialUiFeedback.php
index c4c5992..371899b 100644
--- a/SpecialUiFeedback.php
+++ b/SpecialUiFeedback.php
@@ -19,13 +19,13 @@
         $output_text = '';
 
         if(!$can_read){
-            $output_text = 'You have not the right permissions to see that 
Page';
+            $output_text = wfMessage( 'ui-feedback-special-no-permission' 
)->text();
         }else{ /* can read */
             /* Arrays for Output */
             $importance_array = array('','--','-', '0', '+', '++');
-            $happened_array = array('','did not work as expected','got 
confused', 'missing feature', 'other');
-            $bool_array     = array('no', 'yes');
-            $status_array   = array('open','in review','closed','declined');
+            $happened_array   = array('',wfMessage( 
'ui-feedback-special-happened-1' )->text(), wfMessage( 
'ui-feedback-special-happened-2' )->text(), wfMessage( 
'ui-feedback-special-happened-3' )->text(), wfMessage( 
'ui-feedback-special-happened-4' )->text());
+            $bool_array       = array(wfMessage( 'ui-feedback-special-no' 
)->text(),wfMessage( 'ui-feedback-special-no' )->text(),wfMessage( 
'ui-feedback-special-no' )->text(),wfMessage( 'ui-feedback-special-no' 
)->text(), wfMessage( 'ui-feedback-special-yes' )->text());
+            $status_array     = array(wfMessage( 
'ui-feedback-special-status-open' )->text(),wfMessage( 
'ui-feedback-special-status-in-review' )->text(),wfMessage( 
'ui-feedback-special-status-closed' )->text(),wfMessage( 
'ui-feedback-special-status-declined' )->text());
 
 
             /* get Request-data */
@@ -50,8 +50,8 @@
                 $conditions = 'id ='.$id;
             }else{
                 $conditions =   'status in ('.(($filter_status !== 
'')?$filter_status:'-1').') and '. /* if no checkbox is selected filter for -1 
(which will not be found -> empty result) */
-                                'type in ('.(($filter_type !== 
'')?$filter_type:'-1').') and '.
-                                'importance in ('.(($filter_importance !== 
'')?$filter_importance:'-1').')';
+                    'type in ('.(($filter_type !== '')?$filter_type:'-1').') 
and '.
+                    'importance in ('.(($filter_importance !== 
'')?$filter_importance:'-1').')';
             }
             $res = $dbr->select(
                 array('uifeedback'),
@@ -88,31 +88,31 @@
                  |__|  |__|____/__|  \___  >__|
                                          \/       */
                 $output_text .= '<div class="filters">';
-                $output_text .= '<h2>Filter</h2>';
+                $output_text .= '<h2>'.wfMessage( 'ui-feedback-special-filter' 
)->text().'</h2>';
                 $output_text .= '<form action="'.$_SERVER['PHP_SELF'].'" 
method="GET">';
                 $output_text .= '<table style="border-collapse: 
separate;border-spacing: 10px 5px;">';
                 $output_text .= '<tr>';
-                $output_text .=     '<th>Status</th>';
-                $output_text .=     '<th>Importance</th>';
-                $output_text .=     '<th>Type</th>';
+                $output_text .=     '<th>'.wfMessage( 
'ui-feedback-special-table-head-status' )->text().'</th>';
+                $output_text .=     '<th>'.wfMessage( 
'ui-feedback-special-table-head-importance' )->text().'</th>';
+                $output_text .=     '<th>'.wfMessage( 
'ui-feedback-special-table-head-type' )->text().'</th>';
                 $output_text .= '</tr>';
                 $output_text .= '<tr>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="0" 
'.((strpos('#'.$filter_status,'0'))?'checked':'').'>open</label></td>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_importance" value="0" 
'.((strpos('#'.$filter_importance,'0'))?'checked':'').'>undefined</label></td>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_type" value="1" 
'.((strpos('#'.$filter_type,'1'))?'checked':'').'>Screenshot</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="0" 
'.((strpos('#'.$filter_status,'0'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-open' )->text().'</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_importance" value="0" 
'.((strpos('#'.$filter_importance,'0'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-undefined' )->text().'</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_type" value="1" 
'.((strpos('#'.$filter_type,'1'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-type-screenshot' )->text().'</label></td>';
                 $output_text .= '</tr>';
                 $output_text .= '<tr>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="1" 
'.((strpos('#'.$filter_status,'1'))?'checked':'').'>in review</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="1" 
'.((strpos('#'.$filter_status,'1'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-in-review' )->text().'</label></td>';
                 $output_text .=     '<td><label><input type="checkbox" 
name="filter_importance" value="1" 
'.((strpos('#'.$filter_importance,'1'))?'checked':'').'>--</label></td>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_type" value="0" 
'.((strpos('#'.$filter_type,'0'))?'checked':'').'>Questionnaire</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_type" value="0" 
'.((strpos('#'.$filter_type,'0'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-type-questionnaire' )->text().'</label></td>';
                 $output_text .= '</tr>';
                 $output_text .= '<tr>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="3" 
'.((strpos('#'.$filter_status,'3'))?'checked':'').'>declined</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="3" 
'.((strpos('#'.$filter_status,'3'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-declined' )->text().'</label></td>';
                 $output_text .=     '<td><label><input type="checkbox" 
name="filter_importance" value="2" 
'.((strpos('#'.$filter_importance,'2'))?'checked':'').'>-</label></td>';
                 $output_text .=     '<td>&nbsp;</td>';
                 $output_text .= '</tr>';
                 $output_text .= '<tr>';
-                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="2" 
'.((strpos('#'.$filter_status,'2'))?'checked':'').'>closed</label></td>';
+                $output_text .=     '<td><label><input type="checkbox" 
name="filter_status" value="2" 
'.((strpos('#'.$filter_status,'2'))?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-closed' )->text().'</label></td>';
                 $output_text .=     '<td><label><input type="checkbox" 
name="filter_importance" value="3" 
'.((strpos('#'.$filter_importance,'3'))?'checked':'').'>0</label></td>';
                 $output_text .=     '<td>&nbsp;</td>';
                 $output_text .= '</tr>';
@@ -137,24 +137,24 @@
                       |____| \____/|   __/          /______  /
                                    |__|                    \/ */
                 $output_text .= '<div class="stats">';
-                    $output_text .= '<h2>Stats</h2>';
-                    $output_text .= '<div style="float:left;">';
-                        /* get name and number of closed feedback-posts */
-                        $res_stats = $dbr->select(
-                            array('uifeedback'),
-                            array('username','count(id) as count'),
-                            'username != \'\' and status = \'2\'', /* no anon 
users */
-                            __METHOD__,
-                            array('GROUP BY' => 'username','ORDER BY' => 
'count DESC','LIMIT' => '5')
-                        );
-                        $output_text .= 'Users with most submissions (by 
closed feedback):';
-                        $output_text .= '<table 
style="text-align:right;border-collapse: separate;border-spacing: 10px 5px;">';
-                        /* add rows to table */
-                        foreach( $res_stats as $row ){
-                            $output_text .= 
'<tr><td>'.htmlentities($row->username).'</td><td 
style="text-align:right;">'.$row->count.'</td></tr>';
-                        }
-                        $output_text .= '</table>';
-                    $output_text .= '</div>'; /* end users*/
+                $output_text .= '<h2>'.wfMessage( 'ui-feedback-special-stats' 
)->text().'</h2>';
+                $output_text .= '<div style="float:left;">';
+                /* get name and number of closed feedback-posts */
+                $res_stats = $dbr->select(
+                    array('uifeedback'),
+                    array('username','count(id) as count'),
+                    'username != \'\' and status = \'2\'', /* no anon users */
+                    __METHOD__,
+                    array('GROUP BY' => 'username','ORDER BY' => 'count 
DESC','LIMIT' => '5')
+                );
+                $output_text .= wfMessage( 'ui-feedback-special-top5-users' 
)->text();
+                $output_text .= '<table 
style="text-align:right;border-collapse: separate;border-spacing: 10px 5px;">';
+                /* add rows to table */
+                foreach( $res_stats as $row ){
+                    $output_text .= 
'<tr><td>'.htmlentities($row->username).'</td><td 
style="text-align:right;">'.$row->count.'</td></tr>';
+                }
+                $output_text .= '</table>';
+                $output_text .= '</div>'; /* end users*/
 
                 $output_text .= '</div>'; /* end stats */
 
@@ -167,9 +167,9 @@
                                     \//_____/      \/     \/     \/       */
                 /* add page-navigation */
                 $output_text .='<div class="page_navi">';
-                if($id>1)        $output_text .= ' <a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($id-1).'" >previous</a>&nbsp;|&nbsp;';
-                $output_text .= ' <a href="'.SpecialPage::getTitleFor( 
'UiFeedback' )->getFullURL().'?id='.($id+1).'" >next</a>&nbsp;|&nbsp;';
-                $output_text .= ' <a href="'.SpecialPage::getTitleFor( 
'UiFeedback' )->getFullURL().'?id=-1" >all</a>&nbsp;';
+                if($id>1)        $output_text .= ' <a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($id-1).'" >'.wfMessage( 
'ui-feedback-special-navi-previous' )->text().'</a>&nbsp;|&nbsp;';
+                $output_text .= ' <a href="'.SpecialPage::getTitleFor( 
'UiFeedback' )->getFullURL().'?id='.($id+1).'" >'.wfMessage( 
'ui-feedback-special-navi-next' )->text().'</a>&nbsp;|&nbsp;';
+                $output_text .= ' <a href="'.SpecialPage::getTitleFor( 
'UiFeedback' )->getFullURL().'?id=-1" >'.wfMessage( 
'ui-feedback-special-navi-all' )->text().'</a>&nbsp;';
                 $output_text .= '</div>';
                 /* end page-navi */
             }
@@ -192,9 +192,9 @@
                 $mac = '<div class="icon mac">2</div>';
                 $lin = '<div class="icon lin">3</div>';
 
-                $output_text .= '<h2 style="clear:both;">Feedback</h2>';
+                $output_text .= '<h2 style="clear:both;">'.wfMessage( 
'ui-feedback-special-feedback' )->text().'</h2>';
                 if(!$only_one_item)
-                    $output_text .='found '.$count.' items:';
+                    $output_text .= wfMessage( 'ui-feedback-special-found' 
)->text().' '.$count.' '.wfMessage( 'ui-feedback-special-items' )->text().':';
 
                 /* Result-Table */
                 $output_text .='<table class="wikitable sortable 
jquery-tablesorter">';
@@ -206,37 +206,37 @@
                     |___|  /\___  >____  /\____ | |____/__|___|  /\___  >____  
>
                          \/     \/     \/      \/              \/     \/     
\/ */
                 /*id*/
-                $output_text .='<th scope="col" class="headerSort">ID</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-id' 
)->text().'</th>';
                 /*username*/
-                $output_text .='<th scope="col" 
class="headerSort">Username</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-username' 
)->text().'</th>';
                 /*browser*/
                 $output_text .= '<th scope="col" class="headerSort"></th>';
                 /*OS*/
                 if($can_write) $output_text .= '<th scope="col" 
class="headerSort"></th>';
                 /*time*/
                 if($only_one_item)
-                    $output_text .='<th scope="col" class="headerSort 
headerSortUp">Timestamp</th>';
+                    $output_text .='<th scope="col" class="headerSort 
headerSortUp">'.wfMessage( 'ui-feedback-special-table-head-time' 
)->text().'</th>';
                 /*type*/
-                $output_text .='<th scope="col" class="headerSort">Type</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-type' 
)->text().'</th>';
                 /*importance*/
-                $output_text .='<th scope="col" 
class="headerSort">Importance</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-importance' 
)->text().'</th>';
                 /*happened*/
-                $output_text .='<th scope="col" class="headerSort">What 
happened</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-happened' 
)->text().'</th>';
                 /*task*/
-                $output_text .='<th scope="col" class="headerSort">Task</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-task' 
)->text().'</th>';
                 /*done*/
-                $output_text .='<th scope="col" class="headerSort">Done</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-done' 
)->text().'</th>';
                 if(!$only_one_item){ // Dont display the freetext-lines in 
one-entry-view
                     /*text1*/
-                    $output_text .='<th scope="col" 
class="headerSort">Details</th>';
+                    $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-details' 
)->text().'</th>';
                 }
                 /*status*/
-                $output_text .='<th scope="col" class="headerSort 
headerSortUp">Status</th>';
+                $output_text .='<th scope="col" class="headerSort 
headerSortUp">'.wfMessage( 'ui-feedback-special-table-head-status' 
)->text().'</th>';
                 /*comment*/
-                $output_text .='<th scope="col" class="headerSort">Notes</th>';
+                $output_text .='<th scope="col" 
class="headerSort">'.wfMessage( 'ui-feedback-special-table-head-notes' 
)->text().'</th>';
                 /*Notify*/
                 if($can_write)
-                    $output_text .='<th scope="col" class="headerSort" title=" 
This user wants to be notified about status changes"></th>';
+                    $output_text .='<th scope="col" class="headerSort" 
title="'.wfMessage( 'ui-feedback-special-tooltip-notify' )->text().'"></th>';
                 /* end Row*/
                 $output_text .='</tr>';
 
@@ -252,7 +252,7 @@
                     /*id*/
                     $output_text .= '<td><a href ="'.SpecialPage::getTitleFor( 
'UiFeedback' )->getFullURL().'?id='.($row->id).'">'.$row->id.'</a></td>';
                     /*username*/
-                    if($row->username === '') $output_text .= 
'<td>anonymous</td>';
+                    if($row->username === '') $output_text .= 
'<td>'.wfMessage( 'ui-feedback-special-anonymous' )->text().'</td>';
                     else                      $output_text .= '<td><a 
href="'.Title::makeTitleSafe( NS_USER_TALK, $row->username 
)->getFullURL().'">'.$row->username.'</a></td>';
                     /*browser*/
                     if($can_write) $output_text .= '<td 
title="'.$row->useragent.'">';
@@ -287,8 +287,8 @@
                     if($only_one_item)
                         $output_text .= 
'<td>'.htmlspecialchars($row->created).'</td>';
                     /*type*/
-                    if($row->type === '1')  $output_text .= '<td><a href 
="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><div class="icon screenshot-icon" 
title="Screenshot">1</div></a></td>';
-                    else                    $output_text .= '<td><a href 
="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><div class="icon questionnaire-icon" 
title="Questionnaire">2</div></a></td>';
+                    if($row->type === '1')  $output_text .= '<td><a href 
="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><div class="icon screenshot-icon" 
title="'.wfMessage( 'ui-feedback-special-type-screenshot' 
)->text().'">1</div></a></td>';
+                    else                    $output_text .= '<td><a href 
="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><div class="icon questionnaire-icon" 
title="'.wfMessage( 'ui-feedback-special-type-questionnaire' 
)->text().'">2</div></a></td>';
                     /*importance*/
                     if($row->importance == 0) $output_text .= 
'<td>&nbsp;</td>';
                     else                    $output_text .= 
'<td>'.$importance_array[$row->importance].'</td>';
@@ -309,25 +309,25 @@
                     /*status*/
                     $output_text .= '<td>';
                     if($row->status == 0){
-                        $output_text .= '<b>open</b><br/>';
+                        $output_text .= '<b>'.wfMessage( 
'ui-feedback-special-status-open' )->text().'</b><br/>';
                         if($can_write) /* only admins can change the status*/
-                            $output_text .= '<a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'">review</a>';
+                            $output_text .= '<a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'">'.wfMessage( 
'ui-feedback-special-status-in-review' )->text().'</a>';
                     }else if($row->status == 1){
                         if($can_write) /* only admins can change the status*/
-                            $output_text .= '<a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><b>in review</b></a>';
+                            $output_text .= '<a 
href="'.SpecialPage::getTitleFor( 'UiFeedback' 
)->getFullURL().'?id='.($row->id).'"><b>'.wfMessage( 
'ui-feedback-special-status-in-review' )->text().'</b></a>';
                         else
-                            $output_text .= '<b>in review</b>';
+                            $output_text .= '<b>'.wfMessage( 
'ui-feedback-special-status-in-review' )->text().'</b>';
                     }else if($row->status == 2){
-                        $output_text .= 'closed<br/>';
+                        $output_text .= ''.wfMessage( 
'ui-feedback-special-status-closed' )->text().'<br/>';
                     }else if($row->status == 3){
-                        $output_text .= 'declined<br/>';
+                        $output_text .= ''.wfMessage( 
'ui-feedback-special-status-declined' )->text().'<br/>';
                     }
                     $output_text .= '</td>';
                     /* comment */
                     $output_text .= 
'<td>'.htmlspecialchars($row->comment).'</td>';
                     /* notify - only admins see this */
                     if($can_write){
-                        if($row->notify) $output_text .= '<td title="This user 
wants to be notified about status changes"><a href="'.Title::makeTitleSafe( 
NS_USER_TALK, $row->username )->getFullURL().'"><div class="icon 
notify">1</div></a></td>';
+                        if($row->notify) $output_text .= '<td 
title="'.wfMessage( 'ui-feedback-special-tooltip-notify' )->text().'"><a 
href="'.Title::makeTitleSafe( NS_USER_TALK, $row->username 
)->getFullURL().'"><div class="icon notify">1</div></a></td>';
                         else             $output_text .= '<td></td>';
                     }
                     /* end row */
@@ -346,12 +346,12 @@
                 /* this information is not usefull for 'normal' users, so only 
admins will see it */
                 if(!$only_one_item && $can_write){
                     $output_text .= '<div style="border:1px solid 
black;background:#FCFCFC;padding:5px;width:325px">';
-                    $type_array = array('pop-up after edit','questionnaire 
button','screenshot button');
+                    $type_array = array(wfMessage( 
'ui-feedback-special-stats-type-1' )->text(),wfMessage( 
'ui-feedback-special-stats-type-2' )->text(),wfMessage( 
'ui-feedback-special-stats-type-3' )->text());
                     /*get rows from database*/
                     $res_stats = 
$dbr->select(array('uifeedback_stats'),array('type','shown', 'clicked', 
'sent'),'',__METHOD__,array( 'ORDER BY' => 'type DESC' ));
-                    $output_text .= 'Number of shown and clicked requests for 
feedback:';
+                    $output_text .= wfMessage( 
'ui-feedback-special-stats-head' )->text();
                     $output_text .= '<table 
style="text-align:right;border-collapse: separate;border-spacing: 10px 5px;">';
-                    $output_text .= 
'<tr><th>type</th><th>shown</th><th>clicked</th><th>sent</th></tr>';
+                    $output_text .= '<tr><th>'.wfMessage( 
'ui-feedback-special-stats-type' )->text().'</th><th>'.wfMessage( 
'ui-feedback-special-stats-shown' )->text().'</th><th>'.wfMessage( 
'ui-feedback-special-stats-clicked' )->text().'</th><th>'.wfMessage( 
'ui-feedback-special-stats-sent' )->text().'</th></tr>';
                     /* add rows to the table */
                     foreach( $res_stats as $row_stats ){
                         $output_text .= '<tr>'.
@@ -366,7 +366,7 @@
                 }/* end show and click stats */
 
             }else{
-                $output_text .= '<h2 style="clear:both;">Feedback</h2>nothing 
found for your filters';
+                $output_text .= '<h2 style="clear:both;">'.wfMessage( 
'ui-feedback-special-feedback' )->text().'</h2>'.wfMessage( 
'ui-feedback-special-nothing-found' )->text();
             }
 
             /*         .__               .__           .___  __
@@ -381,15 +381,15 @@
                 $output_text .= '<a 
href="'.htmlspecialchars($row->url).'">'.$row->url.'</a>';
 
                 if($row->type === '1' ){ /* screenshot Feedback */
-                    $output_text .= '<h2>Comment</h2>';
+                    $output_text .= '<h2>'.wfMessage( 
'ui-feedback-special-table-head-details' )->text().'</h2>';
                     $output_text .= htmlspecialchars($row->text1);
                     if(strlen($row->text1) == 0){
-                        $output_text .= '<i>none</i>';
+                        $output_text .= '<i>'.wfMessage( 
'ui-feedback-special-none' )->text().'</i>';
                     }
                 }else{ /* Questionnaire Feedback */
-                    $output_text .= '<h2>What happened</h2>';
+                    $output_text .= '<h2>'.wfMessage( 
'ui-feedback-special-table-head-happened' )->text().'</h2>';
                     $output_text .= htmlspecialchars($row->text1);
-                    if(strlen($row->text1) == 0) $output_text .= '<i>none</i>';
+                    if(strlen($row->text1) == 0) $output_text .= 
'<i>'.wfMessage( 'ui-feedback-special-none' )->text().'</i>';
                 }
                 $output_text .= '<div>';
 
@@ -401,24 +401,24 @@
                             \/     \/             \/        */
                 /* Review Form - only for admins */
                 if($can_write){
-                        $output_text .= '<div style = "float:left;">';
-                            $output_text .= '<h1>Review</h1>';
-                            if($row->notify)
-                                $output_text .= 'Info: <i>This user wants to 
be notified about status changes</i><br/>';
-                            $output_text .= '<form name="review" method="post" 
id="ui-review-form" action=""">';
-                            $output_text .= '<div style="float:left;">';
-                                $output_text .= 'Status:<br/>';
-                                $output_text .= '<label><input type="radio" 
name="status" value="1" '.(($row->status==1)?'checked':'').'>in 
review</label><br/>';
-                                $output_text .= '<label><input type="radio" 
name="status" value="2" 
'.(($row->status==2)?'checked':'').'>closed</label><br/>';
-                                $output_text .= '<label><input type="radio" 
name="status" value="3" 
'.(($row->status==3)?'checked':'').'>declined</label><br/>';
-                                $output_text .= '</div>';
-                                $output_text .= '<div 
style="float:left;margin-left:20px">';
-                                $output_text .= '<label>Notes:<br/><textarea 
name="comment" rows="5" 
style="width:300px">'/*.$row->comment*/.'</textarea></label>';
-                                $output_text .= '<input type="hidden" 
name="id" value="'.$id.'">';
-                                $output_text .= '<input type="hidden" 
name="method" value="review">';
-                                $output_text .= '<br/><input type="button" 
value="send" onClick="send_review();">';
-                            $output_text .= '</div></form>';
-                        $output_text .= '</div>';
+                    $output_text .= '<div style = "float:left;">';
+                    $output_text .= '<h1>'.wfMessage( 
'ui-feedback-special-review' )->text().'</h1>';
+                    if($row->notify)
+                        $output_text .= ''.wfMessage( 
'ui-feedback-special-info' )->text().': <i>'.wfMessage( 
'ui-feedback-special-tooltip-notify' )->text().'</i><br/>';
+                    $output_text .= '<form name="review" method="post" 
id="ui-review-form" action=""">';
+                    $output_text .= '<div style="float:left;">';
+                    $output_text .= ''.wfMessage( 
'ui-feedback-special-table-head-status' )->text().':<br/>';
+                    $output_text .= '<label><input type="radio" name="status" 
value="1" '.(($row->status==1)?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-in-review' )->text().'</label><br/>';
+                    $output_text .= '<label><input type="radio" name="status" 
value="2" '.(($row->status==2)?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-closed' )->text().'</label><br/>';
+                    $output_text .= '<label><input type="radio" name="status" 
value="3" '.(($row->status==3)?'checked':'').'>'.wfMessage( 
'ui-feedback-special-status-declined' )->text().'</label><br/>';
+                    $output_text .= '</div>';
+                    $output_text .= '<div 
style="float:left;margin-left:20px">';
+                    $output_text .= '<label>'.wfMessage( 
'ui-feedback-special-table-head-notes' )->text().':<br/><textarea 
name="comment" rows="5" 
style="width:300px">'/*.$row->comment*/.'</textarea></label>';
+                    $output_text .= '<input type="hidden" name="id" 
value="'.$id.'">';
+                    $output_text .= '<input type="hidden" name="method" 
value="review">';
+                    $output_text .= '<br/><input type="button" value="send" 
onClick="send_review();">';
+                    $output_text .= '</div></form>';
+                    $output_text .= '</div>';
                 }
                 /* previous Comments/Reviews */
                 $res = $dbr->select(
@@ -430,7 +430,7 @@
                 );
                 if($res->numRows()>0){
                     $output_text .= '<div style = "clear:both;">';
-                    $output_text .= '<h1>Previous Notes</h1>';
+                    $output_text .= '<h1>'.wfMessage( 
'ui-feedback-special-previous-notes' )->text().'</h1>';
                     $output_text .= '<ul>';
                     foreach( $res as $review_row ) {
                         $output_text .= '<li>'.$review_row->created.' - 
'.$review_row->reviewer.' - 
<b>'.$status_array[$review_row->status].'</b>:<br/>'.$review_row->comment.'</li>';
@@ -451,7 +451,7 @@
                 /* Screenshot */
                 if($row->type == '1'){
                     $output_text .= '<div style="clear: both;">';
-                    $output_text .= '<h2>Screenshot:</h2>';
+                    $output_text .= '<h2>'.wfMessage( 
'ui-feedback-special-type-screenshot' )->text().':</h2>';
                     $output_text .= '<img 
style="max-width:800px;cursor:pointer;" src="'.SpecialPage::getTitleFor( 
'UiFeedback_api' )->getFullURL().'?getScreenshotByID='.$row->id.'" 
alt="screenshot" 
onclick="$(this).css(\'max-width\',\'\').css(\'cursor\',\'auto\');">';
                     $output_text .= '</div>';
                 }
diff --git a/UiFeedback.i18n.php b/UiFeedback.i18n.php
index d85750f..3e24984 100644
--- a/UiFeedback.i18n.php
+++ b/UiFeedback.i18n.php
@@ -19,7 +19,7 @@
 
     'ui-feedback-headline' => 'Feedback',
     'ui-feedback-scr-headline' => 'Feedback',
-    
+
     'ui-feedback-task-label' => 'I wanted to:',
     'ui-feedback-task-1' => 'add/edit an item', // item
     'ui-feedback-task-2' => 'add/edit a label', // label
@@ -30,7 +30,7 @@
     'ui-feedback-task-7' => 'other:', // other
 
     'ui-feedback-done-label' => 'Were you able to complete your task?',
-    
+
     'ui-feedback-good-label'    => 'What happened while you were editing?',
     'ui-feedback-bad-label'     => 'What behavior have you been expecting?',
     'ui-feedback-comment-label' => 'Please give us some more details:',
@@ -54,7 +54,7 @@
 
     'ui-feedback-yes' => 'yes',
     'ui-feedback-no' => 'no',
-    
+
     'ui-feedback-problem-reset' => 'reset',
     'ui-feedback-problem-send' => 'send',
     'ui-feedback-problem-close' => 'close',
@@ -64,11 +64,84 @@
 
     'ui-feedback-yellow' => 'Highlight areas that are relevant.',
     'ui-feedback-black' => 'Blackout any personal information.',
-    
+
     'ui-feedback-help-text' => 'You can highlight and blackout areas on the 
page to give us a hint where to look at',
 
     'ui-feedback-prerender-text1' => 'A screenshot will now be rendered and 
uploaded to the server. That could take some time.',
     'ui-feedback-prerender-text2' => 'Please don\'t close the browser until 
you see the message "Feedback sent".',
-    
-);
 
+
+    /*Specialpage texts*/
+    'ui-feedback-special-feedback' => 'Feedback',
+    'ui-feedback-special-stats' => 'Stats',
+
+    'ui-feedback-special-nothing-found' => 'Nothing found',
+    'ui-feedback-special-found' => 'found',
+    'ui-feedback-special-items' => 'items',
+    'ui-feedback-special-none' => 'none',
+
+
+
+    'ui-feedback-special-no-permission' => 'You have not the right permissions 
to see that Page',
+
+    'ui-feedback-special-happened-1'=>'did not work as expected',
+    'ui-feedback-special-happened-2'=>'got confused',
+    'ui-feedback-special-happened-3'=>'missing feature',
+    'ui-feedback-special-happened-4'=>'other',
+
+    'ui-feedback-special-yes'   => 'yes',
+    'ui-feedback-special-no'    =>'no',
+
+    'ui-feedback-special-status-open' => 'open',
+    'ui-feedback-special-status-in-review' => 'in review',
+    'ui-feedback-special-status-closed' => 'closed',
+    'ui-feedback-special-status-declined' => 'declined',
+
+    'ui-feedback-special-filter' => 'Filter',
+
+    'ui-feedback-special-undefined' => 'undefined',
+
+    'ui-feedback-special-type-screenshot' => 'Screenshot',
+    'ui-feedback-special-type-questionnaire' => 'Questionnaire',
+
+    'ui-feedback-special-top5-users' => 'Users with most submissions (by 
closed feedback):',
+
+    'ui-feedback-special-navi-previous' => 'previous',
+    'ui-feedback-special-navi-next' => 'next',
+    'ui-feedback-special-navi-all' => 'all',
+
+
+    'ui-feedback-special-table-head-id' => 'ID',
+    'ui-feedback-special-table-head-username' => 'Username',
+    'ui-feedback-special-table-head-time' => 'Timestamp',
+    'ui-feedback-special-table-head-type' => 'Type',
+    'ui-feedback-special-table-head-importance' => 'Importance',
+    'ui-feedback-special-table-head-happened' => 'What happened',
+    'ui-feedback-special-table-head-task' => 'Task',
+    'ui-feedback-special-table-head-done' => 'Done',
+    'ui-feedback-special-table-head-details' => 'Details',
+    'ui-feedback-special-table-head-status' => 'Status',
+    'ui-feedback-special-table-head-notes' => 'Notes',
+
+    'ui-feedback-special-tooltip-notify' => 'This user wants to be notified 
about status changes',
+
+    'ui-feedback-special-anonymous' => 'anonymous',
+
+
+    'ui-feedback-special-stats-head' => 'Number of shown and clicked requests 
for feedback:',
+    'ui-feedback-special-stats-type-1' => 'pop-up after edit',
+    'ui-feedback-special-stats-type-2' => 'questionnaire button',
+    'ui-feedback-special-stats-type-3' => 'screenshot button',
+
+    'ui-feedback-special-stats-type' => 'type',
+    'ui-feedback-special-stats-shown' => 'shown',
+    'ui-feedback-special-stats-clicked' => 'clicked',
+    'ui-feedback-special-stats-sent' => 'sent',
+
+
+    'ui-feedback-special-review' => 'Review',
+    'ui-feedback-special-previous-notes' => 'Previous Notes',
+    'ui-feedback-special-info' => 'Info',
+
+
+);
\ No newline at end of file
diff --git a/UiFeedback.php b/UiFeedback.php
index 7d9e807..02e23aa 100644
--- a/UiFeedback.php
+++ b/UiFeedback.php
@@ -25,8 +25,8 @@
 
 // add permissions and groups
 //$wgGroupPermissions['user']['userrights'] = true;
-//$wgGroupPermissions['user']['read_uifeedback'] = true;
-$wgGroupPermissions['*']['read_uifeedback'] = true;
+$wgGroupPermissions['user']['read_uifeedback'] = true;
+//$wgGroupPermissions['*']['read_uifeedback'] = true;
 $wgGroupPermissions['UIFeedback_Administator']['write_uifeedback'] = true;
 
 // Register modules

-- 
To view, visit https://gerrit.wikimedia.org/r/53172
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36b860d190bca7906f621fc28a3aabe6a1d62d07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UIFeedback
Gerrit-Branch: master
Gerrit-Owner: Lbenedix <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to