Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Again, Missing Language phrase(buddypress) by theme WordPress

  • SOLVED

Again, a theme issue(I guess).
In my home page, there is a buddypress activity stream, which is a shortcode by the theme author, but the author has so much bugs in the missing language.

Please have a look at the activities stream here:
[[LINK href="http://i.gyazo.com/0f65871078e0ad035832abb7362ea686.png"]]http://i.gyazo.com/0f65871078e0ad035832abb7362ea686.png[[/LINK]]

<strong>To see this issue, you will need to register an account but noworries this is a development site, all accounts will be deleted later.</strong>

<strong>Try CLICK on it</strong>
You see the word [<strong>Favorite</strong>] and [<strong>Mark as Favorite</strong>], it displays in original English, and if click on it as action of mark as favorite, it turn to zh_TW(Traditional Chinese) mode..., and if click it again, it return [<strong>收藏</strong>]("Favorite" in Chinese mode). See screenshot below:
[[LINK href="http://i.gyazo.com/606277d1d8bba754a1316dbc450741da.png"]]http://i.gyazo.com/606277d1d8bba754a1316dbc450741da.png[[/LINK]]

I have test both buddypress language file and the theme language file, all you see changes in the screenshots are by the buddypress language file, the language file from the theme doesn't affect it(both of them list those 2 phrases)

The red delete(刪除) link follow after the [Favorite] works perfect, I guess it is because the theme author doesn't mention it in the theme(fortunately).

Not sure if your explorer displays Traditional Chinese.

So this may the issue file from the theme, local in wp-content/themes/theme-name/buddypress/activity/entry.php

-------------------------------------------------------------------------
<?php

/**
* BuddyPress - Activity Stream (Single Item)
*
* This template is used by activity-loop.php and AJAX functions to show
* each activity.
*
* @package BuddyPress
* @subpackage bp-legacy
*/

?>

<?php do_action( 'bp_before_activity_entry' ); ?>

<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
<div class="activity-avatar">
<a title="<?php _e( 'View Profile','klein' ); ?>" href="<?php bp_activity_user_link(); ?>">
<?php bp_activity_avatar(); ?>
</a>
</div>

<div class="activity-content">
<div class="activity-header">
<?php bp_activity_action(); ?>
</div>
<?php if ( bp_activity_has_content() ) : ?>
<div class="activity-inner">
<?php bp_activity_content_body(); ?>
</div>
<?php endif; ?>

<?php do_action( 'bp_activity_entry_content' ); ?>

<div class="activity-meta">

<?php if ( bp_get_activity_type() == 'activity_comment' ) : ?>

<a href="<?php bp_activity_thread_permalink(); ?>" class="view bp-secondary-action" title="<?php _e( 'View Conversation', 'buddypress' ); ?>"><?php _e( 'View Conversation', 'buddypress' ); ?></a>

<?php endif; ?>

<?php if ( is_user_logged_in() ) : ?>

<?php if ( bp_activity_can_comment() ) : ?>

<a href="<?php bp_activity_comment_link(); ?>" class="acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment <span>%s</span>', 'buddypress' ), bp_activity_get_comment_count() ); ?></a>

<?php endif; ?>

<?php if ( bp_activity_can_favorite() ) : ?>

<?php if ( !bp_get_activity_is_favorite() ) : ?>

<a href="<?php bp_activity_favorite_link(); ?>" class="fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ); ?></a>

<?php else : ?>

<a href="<?php bp_activity_unfavorite_link(); ?>" class="unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ); ?></a>

<?php endif; ?>

<?php endif; ?>

<?php if ( bp_activity_user_can_delete() ){ ?>
<?php bp_activity_delete_link(); ?>
<?php } ?>

<?php do_action( 'bp_activity_entry_meta' ); ?>

<?php endif; ?>

</div>

</div>

<?php do_action( 'bp_before_activity_entry_comments' ); ?>

<?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count() ) : ?>

<div class="activity-comments">

<?php bp_activity_comments(); ?>

<?php if ( is_user_logged_in() ) : ?>

<form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
<div class="ac-reply-avatar col-md-2"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
<div class="ac-reply-content col-md-10 col-md-pull-1">
<div class="ac-textarea">
<textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
</div>
<input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ); ?>" /> &nbsp; <a href="#" class="ac-reply-cancel"><?php _e( 'Cancel', 'buddypress' ); ?></a>
<input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
</div>
<div class="clearfix"></div>
<?php do_action( 'bp_activity_entry_comments' ); ?>

<?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>

</form>

<?php endif; ?>

</div>

<?php endif; ?>

<?php do_action( 'bp_after_activity_entry_comments' ); ?>

</li>

<?php do_action( 'bp_after_activity_entry' ); ?>
-------------------------------------------------------------------------

Also the issue po files,
Buddypress po file:[[LINK href="http://dev-www.iplants.com.tw/wp-content/plugins/buddypress/bp-languages/buddypress-zh_TW.po"]]http://dev-www.iplants.com.tw/wp-content/plugins/buddypress/bp-languages/buddypress-zh_TW.po[[/LINK]]
Theme Language po file:[[LINK href="http://dev-www.iplants.com.tw/wp-content/themes/klein-2.1.1/languages/zh_TW.po"]]http://dev-www.iplants.com.tw/wp-content/themes/klein-2.1.1/languages/zh_TW.po[[/LINK]]


<strong>More information</strong>

The buddypress activities stream displays in the page is by a shortcode [gears_bp_activity_stream show="" max="8"] from a plugin named gear(developed by same author with the theme), and I have [[LINK href="https://www.dropbox.com/s/gc5mbaibk6mdvrr/gears.zip"]]gear.zip[[/LINK]] download link. Just see if this is helpful.
(buddypress has no any official shortcodes)

Answers (1)

2014-08-06

timDesain Nanang answers:

the strings is as same as with the po file


<?php _e( 'Favorite', 'buddypress' ); ?>

<?php _e( 'Remove Favorite', 'buddypress' ); ?>


i think it's another issue.

try to inspect the console log. is there an error?


Bard comments:

Hi, what is about the console log? can you point me clearly?


timDesain Nanang comments:

if you are using google chrome, press F12 button, then click the console tab.

but, seems there is no error there.

try to clear all the cookies


timDesain Nanang comments:

the screenshot