Making WordPress.org

Changeset 5520


Ignore:
Timestamp:
05/26/2017 09:03:33 PM (9 years ago)
Author:
coreymckrill
Message:

WordCamp: Don't load wordcamporg text domain for en_US

The .mo file for en_US doesn't exist, so we shouldn't try to find it
and load it from wp-content/languages.

This will hopefully address the issue with WordCamp plugins' UIs still
displaying in the site's locale instead of the user's.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php

    r5518 r5520  
    226226 * `wordcamporg` is used by all the custom plugins and themes, so that translators only have to deal with a single
    227227 * GlotPress project, and we only have to install/update a single mofile per locale.
    228  */
    229 load_textdomain( 'wordcamporg', sprintf( '%s/languages/wordcamporg/wordcamporg-%s.mo', WP_CONTENT_DIR, get_user_locale() ) );
     228 *
     229 * There is no .mo file for en_US, so don't load the text domain if that is the specified user locale.
     230 */
     231if ( 'en_US' !== get_user_locale() ) {
     232    load_textdomain( 'wordcamporg', sprintf( '%s/languages/wordcamporg/wordcamporg-%s.mo', WP_CONTENT_DIR, get_user_locale() ) );
     233}
    230234
    231235// WordCamp.org QBO Integration
Note: See TracChangeset for help on using the changeset viewer.