Make WordPress Core

Changeset 33027


Ignore:
Timestamp:
07/01/2015 03:42:32 PM (9 years ago)
Author:
ocean90
Message:

l10n: Update wp_get_installed_translations() to support variants of a language.

  • A variant of a language has its own locale, for example the locale of the formal variant of German is de_DE_formal.
  • Update remove_accents() and some CSS rules to support de_DE_formal.
  • Add tests for get_bloginfo( 'language' ).
  • API changes will be deployed over the next few days.

see #28303.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/l10n.css

    r32677 r33027  
    5959
    6060/* de_DE: Text needs more space for translation */
    61 .locale-de-de .inline-edit-row fieldset label span.title {
     61.locale-de-de .inline-edit-row fieldset label span.title,
     62.locale-de-de-formal .inline-edit-row fieldset label span.title {
    6263    width: 7em; /* default 5em */
    6364}
    64 .locale-de-de .inline-edit-row fieldset label span.input-text-wrap {
     65.locale-de-de .inline-edit-row fieldset label span.input-text-wrap,
     66.locale-de-de-formal .inline-edit-row fieldset label span.input-text-wrap {
    6567    margin-left: 7em; /* default 5em */
    6668}
    67 .locale-de-de #customize-header-actions .button {
     69.locale-de-de #customize-header-actions .button,
     70.locale-de-de-formal #customize-header-actions .button {
    6871    padding: 0 5px 1px; /* default 0 10px 1px */
    6972}
    70 .locale-de-de #customize-header-actions .spinner {
     73.locale-de-de #customize-header-actions .spinner,
     74.locale-de-de-formal #customize-header-actions .spinner {
    7175    margin: 16px 3px 0; /* default 16px 4px 0 5px */
    7276}
  • trunk/src/wp-includes/formatting.php

    r32994 r33027  
    11391139        $locale = get_locale();
    11401140
    1141         if ( 'de_DE' == $locale ) {
     1141        if ( 'de_DE' == $locale || 'de_DE_formal' == $locale ) {
    11421142            $chars[ chr(195).chr(132) ] = 'Ae';
    11431143            $chars[ chr(195).chr(164) ] = 'ae';
  • trunk/src/wp-includes/l10n.php

    r32940 r33027  
    821821            continue;
    822822        }
    823         if ( ! preg_match( '/(?:(.+)-)?([A-Za-z_]{2,6}).po/', $file, $match ) ) {
     823        if ( ! preg_match( '/(?:(.+)-)?([a-z]{2,3}(?:_[A-Z]{2})?(?:_[a-z0-9]+)?).po/', $file, $match ) ) {
    824824            continue;
    825825        }
Note: See TracChangeset for help on using the changeset viewer.