Changeset 38646
- Timestamp:
- 09/23/2016 12:06:24 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r38593 r38646 1491 1491 * | U+00B7 | l·l | ll | Flown dot (between two Ls) | 1492 1492 * 1493 * Serbian (`sr_RS`) locale: 1494 * 1495 * | Code | Glyph | Replacement | Description | 1496 * | -------- | ----- | ----------- | --------------------------------------- | 1497 * | U+0110 | Đ | DJ | Latin capital letter D with stroke | 1498 * | U+0111 | đ | dj | Latin small letter d with stroke | 1499 * 1493 1500 * @since 1.2.1 1494 1501 * @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`. 1502 * @since 4.7.0 Added locale support for `sr_RS`. 1495 1503 * 1496 1504 * @param string $string Text that might have accent characters … … 1698 1706 } elseif ( 'ca' === $locale ) { 1699 1707 $chars[ 'l·l' ] = 'll'; 1708 } elseif ( 'sr_RS' === $locale ) { 1709 $chars[ 'Đ' ] = 'DJ'; 1710 $chars[ 'đ' ] = 'dj'; 1700 1711 } 1701 1712 -
trunk/tests/phpunit/tests/formatting/RemoveAccents.php
r38193 r38646 116 116 117 117 /** 118 * @ticket 37086119 */118 * @ticket 37086 119 */ 120 120 public function test_remove_catalan_middot() { 121 121 add_filter( 'locale', array( $this, '_set_locale_to_catalan' ) ); … … 127 127 $this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) ); 128 128 } 129 130 public function _set_locale_to_serbian() { 131 return 'sr_RS'; 132 } 133 134 /** 135 * @ticket 38078 136 */ 137 public function test_transcribe_serbian_crossed_d() { 138 add_filter( 'locale', array( $this, '_set_locale_to_serbian' ) ); 139 140 $this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) ); 141 142 remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) ); 143 144 $this->assertEquals( 'Dd', remove_accents( 'Đđ' ) ); 145 } 129 146 }
Note: See TracChangeset
for help on using the changeset viewer.