I18N: Add support for Bosnian locale in `remove_accents()`.

Applies "letter D with stroke" replacement made in [38646] for Serbian (`sr_RS`) to Bosnian (`bs_BA`) as well.

Props H3llas for the report.
Fixes #39658.

git-svn-id: https://develop.svn.wordpress.org/trunk@39939 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-01-21 17:15:57 +00:00
parent a37269ee4a
commit 385e9d1a78
1 changed files with 3 additions and 2 deletions

View File

@ -1496,7 +1496,7 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
* | -------- | ----- | ----------- | --------------------------------------- |
* | U+00B7 | l·l | ll | Flown dot (between two Ls) |
*
* Serbian (`sr_RS`) locale:
* Serbian (`sr_RS`) and Bosnian (`bs_BA`) locale:
*
* | Code | Glyph | Replacement | Description |
* | -------- | ----- | ----------- | --------------------------------------- |
@ -1506,6 +1506,7 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
* @since 1.2.1
* @since 4.6.0 Added locale support for `de_CH`, `de_CH_informal`, and `ca`.
* @since 4.7.0 Added locale support for `sr_RS`.
* @since 4.8.0 Added locale support for `bs_BA`.
*
* @param string $string Text that might have accent characters
* @return string Filtered string with replaced "nice" characters.
@ -1711,7 +1712,7 @@ function remove_accents( $string ) {
$chars[ 'å' ] = 'aa';
} elseif ( 'ca' === $locale ) {
$chars[ 'l·l' ] = 'll';
} elseif ( 'sr_RS' === $locale ) {
} elseif ( 'sr_RS' === $locale || 'bs_BA' === $locale ) {
$chars[ 'Đ' ] = 'DJ';
$chars[ 'đ' ] = 'dj';
}