Skip to:
Content

BuddyPress.org

Changeset 933


Ignore:
Timestamp:
01/27/2009 05:28:59 PM (16 years ago)
Author:
apeatling
Message:

Removed "You" and "their" translation when a localization file is present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r854 r933  
    163163        $content[0] = bp_activity_insert_time_since( $content[0], $date_recorded );
    164164
    165     /* Switch 'their/your' depending on whether the user is logged in or not and viewing their profile */
    166     if ( $filter_words ) {
    167         $content[0] = str_replace( __('their', 'buddypress'), __('your', 'buddypress'), $content[0] );
    168     }
    169    
    170     /* Remove the 'You' and replace if with the persons name */
    171     if ( $filter_you ) {
    172         $content[0] = str_replace( $full_name, __('You', 'buddypress'), $content[0] );             
     165    // The "You" and "Your" conversion is only done in english, if a translation file is present
     166    // then do not translate as it causes problems in other languages.
     167    if ( get_locale() == '' ) {
     168        /* Switch 'their/your' depending on whether the user is logged in or not and viewing their profile */
     169        if ( $filter_words ) {
     170            $content[0] = preg_replace( '/their/', 'your', $content[0] );
     171        }
     172
     173        /* Remove the 'You' and replace if with the persons name */
     174        if ( $filter_you && $full_name != '' ) {
     175            $content[0] = preg_replace( "/$full_name/", 'You', $content[0] );               
     176        }
    173177    }
    174178   
Note: See TracChangeset for help on using the changeset viewer.