Making WordPress.org

Changeset 12194


Ignore:
Timestamp:
11/04/2022 01:07:02 AM (2 years ago)
Author:
dd32
Message:

Translate: Update custom code to expect the possibility that GP_Locale::$wp_locale may be correct for locale variants at some point.

See [12176], #4367, #core56989.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-export.php

    r11141 r12194  
    4747
    4848        // Change wp_locale until GlotPress returns the correct wp_locale for variants.
     49        // https://meta.trac.wordpress.org/changeset/12176/
    4950        $wp_locale = $gp_locale->wp_locale;
    50         if ( 'default' !== $args['locale-slug'] ) {
     51        if ( 'default' !== $args['locale-slug'] && ! str_contains( $wp_locale, $args['locale-slug'] ) ) {
    5152            $wp_locale = $wp_locale . '_' . $args['locale-slug'];
    5253        }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-language-pack.php

    r11768 r12194  
    600600
    601601            // Change wp_locale until GlotPress returns the correct wp_locale for variants.
     602            // https://meta.trac.wordpress.org/changeset/12176/
    602603            $wp_locale = $gp_locale->wp_locale;
    603             if ( 'default' !== $set->slug ) {
     604            if ( 'default' !== $set->slug && ! str_contains( $wp_locale, $set->slug ) ) {
    604605                $wp_locale = $wp_locale . '_' . $set->slug;
    605606            }
Note: See TracChangeset for help on using the changeset viewer.