Ticket #60091: 60091.diff
File 60091.diff, 1.3 KB (added by , 11 months ago) |
---|
-
src/wp-includes/l10n.php
1699 1699 if ( $translations_available ) { 1700 1700 $structure[] = '<optgroup label="' . esc_attr_x( 'Available', 'translations' ) . '">'; 1701 1701 foreach ( $translations as $translation ) { 1702 // Add zero-width non-joiner to language code so screen readers spell out each letter. 1703 $language_code_characters = str_split( $translation['language'] ); 1704 $language_code_add_entities = implode( '‌', $language_code_characters ); 1705 $language_code_with_zwnj = str_replace( 1706 array( '‌_‌', 'a‌o‌9‌0', 'i‌n‌f‌o‌r‌m‌a‌l', 'f‌o‌r‌m‌a‌l' ), 1707 array( '_', 'a‌o90', 'informal', 'formal' ), 1708 $language_code_add_entities 1709 ); 1710 1702 1711 $structure[] = sprintf( 1703 1712 '<option value="%s" lang="%s"%s>%s</option>', 1704 1713 esc_attr( $translation['language'] ), 1705 1714 esc_attr( current( $translation['iso'] ) ), 1706 1715 selected( $translation['language'], $parsed_args['selected'], false ), 1707 esc_html( $ translation['native_name'] )1716 esc_html( $language_code_with_zwnj . ' - ' . $translation['native_name'] ) 1708 1717 ); 1709 1718 } 1710 1719 $structure[] = '</optgroup>';