Make WordPress Core

Changeset 26585


Ignore:
Timestamp:
12/03/2013 08:38:03 PM (11 years ago)
Author:
nacin
Message:

Remove certain accents in the Danish language.

props tlamedia.
fixes #23907.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r26557 r26585  
    813813            $chars[ chr(195).chr(188) ] = 'ue';
    814814            $chars[ chr(195).chr(159) ] = 'ss';
     815        } elseif ( 'da_DK' === $locale ) {
     816            $chars[ chr(195).chr(134) ] = 'Ae';
     817            $chars[ chr(195).chr(166) ] = 'ae';
     818            $chars[ chr(195).chr(152) ] = 'Oe';
     819            $chars[ chr(195).chr(184) ] = 'oe';
     820            $chars[ chr(195).chr(133) ] = 'Aa';
     821            $chars[ chr(195).chr(165) ] = 'aa';
    815822        }
    816823
  • trunk/tests/phpunit/tests/formatting/RemoveAccents.php

    r25002 r26585  
    9595        remove_filter( 'locale', array( $this, '_remove_accents_germanic_umlauts_cb' ) );
    9696    }
     97
     98    public function _set_locale_to_danish() {
     99        return 'da_DK';
     100    }
     101
     102    /**
     103     * @ticket 23907
     104     */
     105    public function test_remove_danish_accents() {
     106        add_filter( 'locale', array( $this, '_set_locale_to_danish' ) );
     107       
     108        $this->assertEquals( 'AeOeAaaeoeaa', remove_accents( 'ÆØÅæøå' ) );
     109       
     110        remove_filter( 'locale', array( $this, '_set_locale_to_danish' ) );
     111    }
     112
    97113}
Note: See TracChangeset for help on using the changeset viewer.