Making WordPress.org

Changeset 6570


Ignore:
Timestamp:
02/08/2018 05:18:20 PM (9 years ago)
Author:
ocean90
Message:

Translate, Consistency: Use md5 hash of translations for group anchors.

Also use a case sensitive comparison when grouping translations.

See #2917.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/consistency.php

    r6454 r6570  
    8585                                str_replace( ' ', '<span class="space"> </span>', esc_translation( $translation ) ),
    8686                                1 === $translations_unique_counts[ $translation ] ? $translations_unique_counts[ $translation ] . ' time' : $translations_unique_counts[ $translation ] . ' times',
    87                                 esc_attr( sanitize_title( 't-' . $translation ) )
     87                                esc_attr( 't-' . md5( $translation ) )
    8888                        );
    8989                }
    … …  
    123123                                        printf(
    124124                                                '<tr id="%s" class="new-translation"><td colspan="2"><strong>%s</strong> <a href="#translations-overview">&uarr;</a></td></tr>',
    125                                                 esc_attr( sanitize_title( 't-' . $result->translation ) ),
     125                                                esc_attr( 't-' . md5( $result->translation ) ),
    126126                                                esc_translation( $result->translation )
    127127                                        );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-consistency.php

    r6452 r6570  
    173173
    174174        public function _sort_callback( $a, $b ) {
    175                 return strnatcasecmp( $a->translation, $b->translation );
     175                return strnatcmp( $a->translation, $b->translation );
    176176        }
    177177}
Note: See TracChangeset for help on using the changeset viewer.