File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 2525$ real_search_results = count ($ locale1_strings );
2626$ limit_results = 200 ;
2727// Limit results to 200 per locale
28- array_splice ($ locale1_strings , $ limit_results - 1 );
29- array_splice ($ locale2_strings , $ limit_results - 1 );
28+ array_splice ($ locale1_strings , $ limit_results );
29+ array_splice ($ locale2_strings , $ limit_results );
3030
3131$ searches = [
3232 $ source_locale => $ locale1_strings ,
Original file line number Diff line number Diff line change 55include __DIR__ . '/simplesearchform.php ' ;
66
77if ($ error_count > 0 ) {
8- $ content = "<h2> {$ error_count } " .
9- ($ error_count == 1 ? 'result ' : 'results ' ) .
10- " found</h2> \n" ;
8+ $ search_id = 'check_variable ' ;
9+ $ content = "<h2><span class= \"results_count_ {$ search_id }\"> "
10+ . Utils::pluralize ($ error_count , 'result ' )
11+ . "</span> found</h2> \n" ;
1112
1213 if (isset ($ filter_block )) {
1314 $ content .= "<div id='filters'> " .
1718 "</div> \n" ;
1819 }
1920
20- $ content .= "<table class='collapsable'> \n" .
21+ $ content .= "<table class='collapsable results_table { $ search_id } '> \n" .
2122 " <tr> \n" .
2223 " <th>Entity</th> \n" .
2324 " <th> {$ source_locale }</th> \n" .
3940 $ path_locale2 = VersionControl::hgPath ($ locale , $ repo , $ string_id );
4041
4142 $ component = explode ('/ ' , $ string_id )[0 ];
42- $ content .= "<tr class=' {$ component }'>
43+ $ content .= "<tr class=' {$ component } { $ search_id } '>
4344 <td>
4445 <span class='celltitle'>Entity</span>
4546 <a class='link_to_entity' href= \"/ {$ string_id_link }\"> " . ShowResults::formatEntity ($ string_id ) . "</a>
Original file line number Diff line number Diff line change 44// Include the common simple search form
55include __DIR__ . '/simplesearchform.php ' ;
66
7- $ content = '<h2> ' . count ($ unchanged_strings ) . " strings identical to English</h2> \n" ;
7+ $ search_id = 'unchanged_strings ' ;
8+ $ content = "<h2><span class= \"results_count_ {$ search_id }\"> "
9+ . Utils::pluralize (count ($ unchanged_strings ), 'string ' )
10+ . "</span> identical to English</h2> \n" ;
811
912if (isset ($ filter_block )) {
1013 $ content .= "<div id='filters'> " .
1417 "</div> \n" ;
1518}
1619
17- $ content .= "<table class='collapsable'> \n" ;
20+ $ content .= "<table class='collapsable results_table { $ search_id } '> \n" ;
1821$ content .= " <tr class='column_headers'> \n" .
1922 " <th>String ID</th> \n" .
2023 " <th>English</th> \n" .
3336 */
3437 $ direction = RTLSupport::getDirection ($ source_locale );
3538
36- $ content .= " <tr class=' {$ component }'> \n" .
39+ $ content .= " <tr class=' {$ component } { $ search_id } '> \n" .
3740 " <td dir='ltr'><a href=' {$ entity_link }'> {$ string_id }</a></td> \n" .
3841 " <td dir=' {$ direction }' lang=' {$ source_locale }'> {$ string_value }</td> \n" .
3942 " <td dir=' {$ direction }' lang=' {$ locale }'> " . $ strings_locale [$ string_id ] . "</td> \n" .
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ $(document).ready(function() {
2424 available_searches . forEach ( function ( search_id ) {
2525 var class_name ;
2626 class_name = e . target . id === 'showall'
27- ? '.' + search_id
28- : '.' + search_id + '.' + e . target . id ;
27+ ? 'tr .' + search_id
28+ : 'tr .' + search_id + '.' + e . target . id ;
2929
3030 var results_count = $ ( class_name ) . length ;
3131 var results_message =
You can’t perform that action at this time.
0 commit comments