I18N: Add support for Serbian crossed D in remove_accents().

Props Krstarica for the report.
Fixes #38078.

git-svn-id: https://develop.svn.wordpress.org/trunk@38646 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2016-09-23 00:06:24 +00:00
parent 1c2d321ed3
commit 8bc6917cc3
2 changed files with 30 additions and 2 deletions
@@ -115,8 +115,8 @@ class Tests_Formatting_RemoveAccents extends WP_UnitTestCase {
}
/**
* @ticket 37086
*/
* @ticket 37086
*/
public function test_remove_catalan_middot() {
add_filter( 'locale', array( $this, '_set_locale_to_catalan' ) );
@@ -126,4 +126,21 @@ class Tests_Formatting_RemoveAccents extends WP_UnitTestCase {
$this->assertEquals( 'al·lallalla', remove_accents( 'al·lallaŀla' ) );
}
public function _set_locale_to_serbian() {
return 'sr_RS';
}
/**
* @ticket 38078
*/
public function test_transcribe_serbian_crossed_d() {
add_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
$this->assertEquals( 'DJdj', remove_accents( 'Đđ' ) );
remove_filter( 'locale', array( $this, '_set_locale_to_serbian' ) );
$this->assertEquals( 'Dd', remove_accents( 'Đđ' ) );
}
}