Making WordPress.org

Changeset 8349


Ignore:
Timestamp:
02/25/2019 10:26:15 PM (5 years ago)
Author:
ocean90
Message:

API: Remove workarounds for language variants.

GP_Locales returns the correct locale now.

See #4206.

Location:
sites/trunk/api.wordpress.org/public_html
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/credits/index.php

    r7300 r8349  
    5050    require GLOTPRESS_LOCALES_PATH;
    5151
    52     // Temporary: Add language variants to the list of GlotPress locales.
    53     $GLOBALS['gp_locales'] = new GP_Locales();
    54 
    55     $de_formal = clone GP_Locales::by_field( 'wp_locale', 'de_DE' );
    56     $de_formal->english_name = 'German (Formal)';
    57     $de_formal->native_name = 'Deutsch (Sie)';
    58     $de_formal->slug = 'de/formal';
    59     $de_formal->wp_locale = 'de_DE_formal';
    60     $GLOBALS['gp_locales']->locales['de/formal'] = $de_formal;
    61 
    62     $nl_formal = clone GP_Locales::by_field( 'wp_locale', 'nl_NL' );
    63     $nl_formal->english_name = 'Dutch (Formal)';
    64     $nl_formal->native_name = 'Nederlands (Formeel)';
    65     $nl_formal->slug = 'nl/formal';
    66     $nl_formal->wp_locale = 'nl_NL_formal';
    67     $GLOBALS['gp_locales']->locales['nl/formal'] = $nl_formal;
    68 
    69     $de_ch_informal = clone GP_Locales::by_field( 'wp_locale', 'de_CH' );
    70     $de_ch_informal->english_name = 'German (Switzerland, Informal)';
    71     $de_ch_informal->native_name = 'Deutsch (Schweiz, Du)';
    72     $de_ch_informal->slug = 'de-ch/informal';
    73     $de_ch_informal->wp_locale = 'de_CH_informal';
    74     $GLOBALS['gp_locales']->locales['de-ch/informal'] = $de_ch_informal;
    75 
    7652    $gp_locale = GP_Locales::by_field( 'wp_locale', isset( $argv[2] ) ? $argv[2] : $_GET['locale'] );
    7753    if ( $gp_locale ) {
  • sites/trunk/api.wordpress.org/public_html/translations/lib.php

    r5881 r8349  
    5252
    5353    require_once GLOTPRESS_LOCALES_PATH;
    54     // Temporary: Add language variants to the list of GlotPress locales.
    55     $GLOBALS['gp_locales'] = new GP_Locales;
    56     $de_formal = clone GP_Locales::by_field( 'wp_locale', 'de_DE' );
    57     $de_formal->english_name = 'German (Formal)';
    58     $de_formal->native_name = 'Deutsch (Sie)';
    59     $de_formal->slug = 'de/formal';
    60     $de_formal->wp_locale = 'de_DE_formal';
    61     $GLOBALS['gp_locales']->locales['de/formal'] = $de_formal;
    62 
    63     $nl_formal = clone GP_Locales::by_field( 'wp_locale', 'nl_NL' );
    64     $nl_formal->english_name = 'Dutch (Formal)';
    65     $nl_formal->native_name = 'Nederlands (Formeel)';
    66     $nl_formal->slug = 'nl/formal';
    67     $nl_formal->wp_locale = 'nl_NL_formal';
    68     $GLOBALS['gp_locales']->locales['nl/formal'] = $nl_formal;
    69 
    70     $de_ch_informal = clone GP_Locales::by_field( 'wp_locale', 'de_CH' );
    71     $de_ch_informal->english_name = 'German (Switzerland, Informal)';
    72     $de_ch_informal->native_name = 'Deutsch (Schweiz, Du)';
    73     $de_ch_informal->slug = 'de-ch/informal';
    74     $de_ch_informal->wp_locale = 'de_CH_informal';
    75     $GLOBALS['gp_locales']->locales['de-ch/informal'] = $de_ch_informal;
    76 
    77     $pt_pt_ao90 = clone GP_Locales::by_field( 'wp_locale', 'pt_PT' );
    78     $pt_pt_ao90->english_name = 'Portuguese (Portugal, AO90)';
    79     $pt_pt_ao90->native_name = 'Português (AO90)';
    80     $pt_pt_ao90->slug = 'pt/ao90';
    81     $pt_pt_ao90->wp_locale = 'pt_PT_ao90';
    82     $GLOBALS['gp_locales']->locales['pt/ao90'] = $pt_pt_ao90;
    8354
    8455    $base_url = is_ssl() ? 'https' : 'http';
Note: See TracChangeset for help on using the changeset viewer.