- Timestamp:
- 04/26/2016 02:23:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/public_html/gp-templates-new/consistency.php
r3007 r3013 28 28 Case Sensitive 29 29 </label> 30 <label>31 <input type="checkbox" name="search_fuzzy" value="1"<?php checked( $search_fuzzy ); ?>>32 Fuzzy Search (<em>term*</em>)33 </label>34 30 </p> 35 31 … … 41 37 42 38 } elseif ( $performed_search && $results ) { 43 if ( ! $search_fuzzy && $translations_unique ) { 44 $translations_unique_count = count( $translations_unique ); 45 if ( 1 === $translations_unique_count ) { 46 echo '<p class="notice">All originals have the same translations</p>'; 47 } else { 48 echo '<div class="notice wporg-notice-warning"><p>There are ' . $translations_unique_count . ' different translations. <a id="toggle-translations-unique" href="#show">View</a></p>'; 49 echo '<ul class="translations-unique hidden">'; 50 foreach ( $translations_unique as $translation ) { 51 printf( 52 '<li data-id="%s">%s</li>', 53 md5( $translation ), 54 str_replace( ' ', '<span class="space"> </span>', esc_translation( $translation ) ) 55 ); 56 } 57 echo '</ul>'; 58 echo '</div>'; 39 $translations_unique_count = count( $translations_unique ); 40 if ( 1 === $translations_unique_count ) { 41 echo '<p class="notice">All originals have the same translations</p>'; 42 } else { 43 echo '<div class="notice wporg-notice-warning"><p>There are ' . $translations_unique_count . ' different translations. <a id="toggle-translations-unique" href="#show">View</a></p>'; 44 echo '<ul class="translations-unique hidden">'; 45 foreach ( $translations_unique as $translation ) { 46 printf( 47 '<li data-id="%s">%s</li>', 48 md5( $translation ), 49 str_replace( ' ', '<span class="space"> </span>', esc_translation( $translation ) ) 50 ); 59 51 } 52 echo '</ul>'; 53 echo '</div>'; 60 54 } 61 55 … … 85 79 } 86 80 87 $search_link = '';88 if ( $search_fuzzy ) {89 $search_link = sprintf(90 ' | <a href="%s">Search</a>',91 esc_url( add_query_arg( [92 'search' => urlencode( $result->original_singular ),93 'search_fuzzy' => 0,94 'search_case_senstive' => 1,95 ] ) )96 );97 }98 99 81 printf( 100 82 '<tr><td>%s</td><td>%s</td></tr>', 101 83 sprintf( 102 84 '<div class="string">%s%s</div> 103 <div class="meta">Project: <a href="/projects/%s">%s</a> %s</div>',85 <div class="meta">Project: <a href="/projects/%s">%s</a></div>', 104 86 esc_translation( $result->original_singular ), 105 87 $original_context, 106 88 $result->project_path, 107 $project_name, 108 $search_link 89 $project_name 109 90 ), 110 91 sprintf(
Note: See TracChangeset
for help on using the changeset viewer.