Skip to content

Commit

Permalink
Merge pull request #169 from yapapaya/master
Browse files Browse the repository at this point in the history
Fixing Translation Support
  • Loading branch information
actual-saurabh committed Feb 4, 2013
2 parents f5fc610 + c956e96 commit 994b2b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -191,4 +191,4 @@ Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-medi
* HTML5 Audio Tag Support (with fallback)
* HTML5 Video Tag Support (with fallback)

New Widget and Bug Fixes.
Fixed activity formatting and added support for addon updates.
7 changes: 5 additions & 2 deletions app/main/BuddyPressMedia.php
Expand Up @@ -48,6 +48,7 @@ public function __construct() {
*/
add_action('bp_include', array($this, 'init'));
add_action('widgets_init', array($this, 'widgets_init'), 1);
add_action('plugins_loaded',array($this,'load_translation'));
global $bp_media_counter;
$bp_media_counter = 0;
}
Expand Down Expand Up @@ -202,14 +203,16 @@ function init() {
new BPMediaFunction();
}

if (file_exists(BP_MEDIA_PATH . '/languages/' . get_locale() . '.mo'))
load_textdomain(BP_MEDIA_TXT_DOMAIN, BP_MEDIA_PATH . '/languages/' . get_locale() . '.mo');

add_action('admin_notices', array($this, 'admin_notice'));
global $bp_media_admin;
$bp_media_admin = new BPMediaAdmin();
}

static function load_translation(){
load_plugin_textdomain(BP_MEDIA_TXT_DOMAIN, false, basename(BP_MEDIA_PATH).'/languages/');
}

function settings_link($links, $file) {
/* create link */
$plugin_name = plugin_basename(BP_MEDIA_PATH.'index.php');
Expand Down
2 changes: 1 addition & 1 deletion app/main/includes/BPMediaFilters.php
Expand Up @@ -14,7 +14,7 @@ function __construct() {
// and we hook our function via wp_before_admin_bar_render
add_action('admin_bar_menu', array($this, 'my_account_menu'), 1);
// and we hook our function via wp_before_admin_bar_render
add_action('wp_before_admin_bar_render', array($this, 'adminbar_settings_menu'));
add_action('wp_before_admin_bar_render', 'BPMediaFilters::adminbar_settings_menu');
global $bp_media_activity_types;
$bp_media_activity_types = array('media_upload', 'album_updated', 'album_created');
}
Expand Down

0 comments on commit 994b2b5

Please sign in to comment.