Changeset 9615 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/consistency.php
- Timestamp:
- 03/22/2020 11:21:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/consistency.php
r6570 r9615 82 82 foreach ( $translations_unique as $translation ) { 83 83 printf( 84 '<li>%s <small>(%s)</small> <a href="#%s">↓</a></li>',84 '<li>%s <small>(%s)</small> <a class="anchor-jumper with-tooltip" aria-label="Go to translation" href="#%s">↓</a></li>', 85 85 str_replace( ' ', '<span class="space"> </span>', esc_translation( $translation ) ), 86 86 1 === $translations_unique_counts[ $translation ] ? $translations_unique_counts[ $translation ] . ' time' : $translations_unique_counts[ $translation ] . ' times', … … 100 100 <tbody> 101 101 <?php 102 $previous_translation = '';103 102 $previous_translation = ''; 103 $translations_unique_index = 0; 104 104 foreach ( $results as $result ) { 105 105 $project_name = $result->project_name; … … 120 120 121 121 if ( $has_different_translations && $previous_translation !== $result->translation ) { 122 $prev_arrow = ''; 123 $next_arrow = ''; 124 125 126 if ( 0 === $translations_unique_index ) { 127 $next_arrow = '<a class="anchor-jumper with-tooltip" aria-label="Go to next translation" href="' . esc_attr( '#t-' . md5( $translations_unique[ $translations_unique_index + 1 ] ) ) . '">↓</a>'; 128 } elseif ( $translations_unique_count - 1 === $translations_unique_index ) { 129 $prev_arrow = '<a class="anchor-jumper with-tooltip" aria-label="Go to previous translation" href="' . esc_attr( '#t-' . md5( $translations_unique[ $translations_unique_index - 1 ] ) ) . '">↑</a>'; 130 } else { 131 $prev_arrow = '<a class="anchor-jumper with-tooltip" aria-label="Go to previous translation" href="' . esc_attr( '#t-' . md5( $translations_unique[ $translations_unique_index - 1 ] ) ) . '">↑</a>'; 132 $next_arrow = '<a class="anchor-jumper with-tooltip" aria-label="Go to next translation" href="' . esc_attr( '#t-' . md5( $translations_unique[ $translations_unique_index + 1 ] ) ) . '">↓</a>'; 133 } 134 135 printf( 136 '<tr id="%s" class="new-translation"><th colspan="2"><strong>%s</strong> %s %s</th></tr>', 137 esc_attr( 't-' . md5( $result->translation ) ), 138 esc_translation( $result->translation ), 139 $next_arrow, 140 $prev_arrow 141 ); 142 122 143 $previous_translation = $result->translation; 123 printf( 124 '<tr id="%s" class="new-translation"><td colspan="2"><strong>%s</strong> <a href="#translations-overview">↑</a></td></tr>', 125 esc_attr( 't-' . md5( $result->translation ) ), 126 esc_translation( $result->translation ) 127 ); 144 $translations_unique_index++; 128 145 } 129 146
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)