[buddypress-trac] [BuddyPress] #2595: Titles are not localized in bp_get_page_title()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Nov 6 13:08:54 UTC 2011


#2595: Titles are not localized in bp_get_page_title()
----------------------------+---------------------
 Reporter:  SergeyBiryukov  |       Owner:  DJPaul
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:  1.5
Component:  Core            |     Version:
 Severity:  critical        |  Resolution:  fixed
 Keywords:  needs-patch     |
----------------------------+---------------------
Changes (by RuBAN-GT):

 * version:  1.2.5 =>
 * type:  defect (bug) => enhancement
 * severity:  normal => critical


Comment:

 And so, I made corrections in analogy with 1.2 version of buddypress.
 Fixes for 1.5:
 '''bp-core/bp-core-filters.php:'''

 {{{
 $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ),
 bp_get_displayed_user_fullname(), ucwords( bp_current_component() ) ) );
 }}}

 replace:

 {{{
 $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ),
 $bp->displayed_user->fullname, __( ucwords( $bp->current_component ),
 'buddypress' ) ) );
 }}}

 ----------------

 {{{
 $title = sprintf( __( '%1$s | %2$s | %3$s', 'buddypress' ),
 $bp->bp_options_title,
 $bp->bp_options_nav[$bp->current_item][$bp->current_action]['name'],
 bp_get_name_from_root_slug( bp_get_root_slug() ) );
 }}}

 replace:

 {{{
 $title = sprintf( __( '%1$s | %2$s | %3$s', 'buddypress' ), __(
 bp_get_name_from_root_slug(), 'buddypress' ), $bp->bp_options_title,
 $bp->bp_options_nav[$bp->current_component][$bp->current_action]['name']
 );
 }}}

 --------------

 {{{
 $title = sprintf( __( '%s Directory', 'buddypress' ),
 bp_get_name_from_root_slug( bp_members_slug() ) );
 else
 $title = sprintf( __( '%s Directory', 'buddypress' ),
 bp_get_name_from_root_slug( bp_get_root_slug() ) );
 }}}

 replace:

 {{{
 $title = sprintf( __( '%s Directory', 'buddypress' ), __( ucwords(
 $bp->members->slug ), 'buddypress' ) );
 else
 $title = sprintf( __( '%s Directory', 'buddypress' ), __(
 bp_get_name_from_root_slug(), 'buddypress' ) );
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/2595#comment:14>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list