Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Remove bbp-languages folder since language packs will get wiped out w…
Browse files Browse the repository at this point in the history
…hen automated plugin updates come through. Move bbpress.pot file into the root project folder to help it get slurped when it hits WP extend.

git-svn-id: http://bbpress.svn.wordpress.org/branches/plugin@3139 9866e705-20ec-0310-96e7-cbb4277adcfb
  • Loading branch information
johnjamesjacoby committed May 12, 2011
1 parent 501eb7d commit 2f736f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions bbpress.php
Expand Up @@ -406,11 +406,9 @@ function _setup_actions() {
/**
* Register Textdomain
*
* Load the translation file for current language. Checks both the
* languages folder inside the bbPress plugin and the default WordPress
* languages folder. Note that languages inside the bbPress plugin
* folder will be removed on bbPress updates, and using the WordPress
* default folder is safer.
* Load the translation file for current language. Checks only the default
* WordPress languages folder to avoid language files being wiped out
* with plugin updates.
*
* @since bbPress (r2596)
*
Expand All @@ -427,18 +425,13 @@ function register_textdomain() {
// Get mo file name
$mofile = sprintf( 'bbpress-%s.mo', $locale );

// Setup paths to current locale file
// Setup path to current locale file
$mofile_global = WP_LANG_DIR . '/bbpress/' . $mofile;
$mofile_local = $this->plugin_dir . '/bbp-languages/' . $mofile;

// Look in global /wp-content/languages/ folder
if ( file_exists( $mofile_global ) )
return load_textdomain( 'bbpress', $mofile_global );

// Look in /wp-content/plugins/bbpress/ folder (just in case)
elseif ( file_exists( $mofile_local ) )
return load_textdomain( 'bbpress', $mofile_local );

// Nothing found
return false;
}
Expand Down
File renamed without changes.

0 comments on commit 2f736f9

Please sign in to comment.