Changeset 12791
- Timestamp:
- 11/19/2020 12:33:58 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-template.php
r12784 r12791 639 639 if ( true === $r['active_format'] ) { 640 640 /* translators: %s: human time diff of the last time the site was active. */ 641 $r['active_format'] = _x( ' active %s', 'last time the site was active', 'buddypress' );641 $r['active_format'] = _x( 'Active %s', 'last time the site was active', 'buddypress' ); 642 642 } 643 643 -
trunk/src/bp-core/bp-core-functions.php
r12776 r12791 1576 1576 * 1577 1577 * @param int|string $last_activity_date The date of last activity. 1578 * @param string $string A sprintf()-able statement of the form ' active %s'.1578 * @param string $string A sprintf()-able statement of the form 'Active %s'. 1579 1579 * @return string $last_active A string of the form '3 years ago'. 1580 1580 */ … … 1598 1598 * @param string $last_active Last activity string based on time since date given. 1599 1599 * @param string $last_activity_date The date of last activity. 1600 * @param string $string A sprintf()-able statement of the form ' active %s'.1600 * @param string $string A sprintf()-able statement of the form 'Active %s'. 1601 1601 */ 1602 1602 return apply_filters( 'bp_core_get_last_activity', $last_active, $last_activity_date, $string ); -
trunk/src/bp-core/classes/class-bp-core-user.php
r12754 r12791 206 206 207 207 /* translators: %s: human time diff of the last time the user was active on the site. */ 208 $this->last_active = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), _x( ' active %s', 'last time the user was active', 'buddypress' ) );208 $this->last_active = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), _x( 'Active %s', 'last time the user was active', 'buddypress' ) ); 209 209 } 210 210 -
trunk/src/bp-groups/bp-groups-blocks.php
r12757 r12791 304 304 '<time datetime="%1$s">%2$s</time>', 305 305 esc_attr( bp_core_get_iso8601_date( $group->last_activity ) ), 306 /* translators: %s: a human time diff.*/306 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 307 307 sprintf( esc_html__( 'Active %s', 'buddypress' ), bp_get_group_last_active( $group ) ) 308 308 ); -
trunk/src/bp-groups/bp-groups-widgets.php
r12590 r12791 77 77 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"> 78 78 <?php 79 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */80 printf( _x( ' active %s', 'last time the group was active', 'buddypress' ), bp_get_group_last_active() );79 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 80 printf( _x( 'Active %s', 'last time the group was active', 'buddypress' ), bp_get_group_last_active() ); 81 81 ?> 82 82 </span> -
trunk/src/bp-groups/classes/class-bp-groups-invite-template.php
r12590 r12791 276 276 $this->invite->user->user_link = "<a href='{$this->invite->user->user_url}'>{$this->invite->user->fullname}</a>"; 277 277 278 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */279 $this->invite->user->last_active = bp_core_get_last_activity( $this->invite->user->last_activity, __( ' active %s', 'buddypress' ) );278 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 279 $this->invite->user->last_active = bp_core_get_last_activity( $this->invite->user->last_activity, __( 'Active %s', 'buddypress' ) ); 280 280 281 281 if ( bp_is_active( 'groups' ) ) { -
trunk/src/bp-groups/classes/class-bp-groups-widget.php
r12590 r12791 150 150 bp_group_member_count(); 151 151 } else { 152 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */153 printf( __( ' active %s', 'buddypress' ), bp_get_group_last_active() );152 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 153 printf( __( 'Active %s', 'buddypress' ), bp_get_group_last_active() ); 154 154 } 155 155 ?> -
trunk/src/bp-members/bp-members-blocks.php
r12757 r12791 333 333 '<time datetime="%1$s">%2$s</time>', 334 334 esc_attr( bp_core_get_iso8601_date( $member->last_activity ) ), 335 /* translators: %s: a human time diff.*/335 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 336 336 sprintf( esc_html__( 'Active %s', 'buddypress' ), bp_core_time_since( $member->last_activity ) ) 337 337 ); -
trunk/src/bp-members/bp-members-template.php
r12745 r12791 956 956 // Backwards compatibility for anyone forcing a 'true' active_format. 957 957 if ( true === $r['active_format'] ) { 958 $r['active_format'] = __( 'active %s', 'buddypress' ); 958 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 959 $r['active_format'] = __( 'Active %s', 'buddypress' ); 959 960 } 960 961 … … 1687 1688 function bp_get_last_activity( $user_id = 0 ) { 1688 1689 1689 if ( empty( $user_id ) ) 1690 if ( empty( $user_id ) ) { 1690 1691 $user_id = bp_displayed_user_id(); 1691 1692 $last_activity = bp_core_get_last_activity( bp_get_user_last_activity( $user_id ), __('active %s', 'buddypress') ); 1692 } 1693 1694 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 1695 $last_activity = bp_core_get_last_activity( bp_get_user_last_activity( $user_id ), __('Active %s', 'buddypress') ); 1693 1696 1694 1697 /** -
trunk/src/bp-templates/bp-legacy/buddypress/groups/groups-loop.php
r12082 r12791 65 65 <div class="item"> 66 66 <div class="item-title"><?php bp_group_link(); ?></div> 67 <div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span></div> 67 <div class="item-meta"> 68 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"> 69 <?php 70 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 71 printf( __( 'Active %s', 'buddypress' ), bp_get_group_last_active() ); 72 ?> 73 </span> 74 </div> 68 75 69 76 <div class="item-desc"><?php bp_group_description_excerpt(); ?></div> -
trunk/src/bp-templates/bp-legacy/buddypress/groups/single/cover-image-header.php
r12082 r12791 61 61 62 62 <span class="highlight"><?php bp_group_type(); ?></span> 63 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span> 63 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"> 64 <?php 65 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 66 printf( __( 'Active %s', 'buddypress' ), bp_get_group_last_active() ); 67 ?> 68 </span> 64 69 65 70 <?php bp_group_description(); ?> -
trunk/src/bp-templates/bp-legacy/buddypress/groups/single/group-header.php
r12082 r12791 70 70 <div id="item-header-content"> 71 71 <span class="highlight"><?php bp_group_type(); ?></span> 72 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span> 72 <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>"> 73 <?php 74 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 75 printf( __( 'Active %s', 'buddypress' ), bp_get_group_last_active() ); 76 ?> 77 </span> 73 78 74 79 <?php -
trunk/src/bp-templates/bp-nouveau/buddypress/groups/groups-loop.php
r12789 r12791 45 45 <?php 46 46 printf( 47 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */47 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 48 48 esc_html__( 'Active %s', 'buddypress' ), 49 49 sprintf( -
trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/cover-image-header.php
r12789 r12791 32 32 <?php 33 33 printf( 34 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */34 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 35 35 esc_html__( 'Active %s', 'buddypress' ), 36 36 sprintf( -
trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/group-header.php
r12789 r12791 29 29 <?php 30 30 printf( 31 /* translators: %s: last activity timestamp (e.g. " active 1 hour ago") */31 /* translators: %s: last activity timestamp (e.g. "Active 1 hour ago") */ 32 32 esc_html__( 'Active %s', 'buddypress' ), 33 33 sprintf( -
trunk/tests/phpunit/testcases/blogs/template.php
r12779 r12791 17 17 $blogs_template->blog->last_activity = $time; 18 18 19 $this->assertEquals( bp_core_get_last_activity( $time, __( ' active %s', 'buddypress' ) ), bp_get_blog_last_active() );19 $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_blog_last_active() ); 20 20 21 21 $blogs_template->blog = null; … … 34 34 $blogs_template->blog->last_activity = $time; 35 35 36 $this->assertEquals( bp_core_get_last_activity( $time, __( ' active %s', 'buddypress' ) ), bp_get_blog_last_active( array( 'active_format' => true, ) ) );36 $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_blog_last_active( array( 'active_format' => true, ) ) ); 37 37 38 38 $blogs_template->blog = null; -
trunk/tests/phpunit/testcases/members/template.php
r12692 r12791 235 235 $members_template->member->last_activity = $time; 236 236 237 $this->assertEquals( bp_core_get_last_activity( $time, __( ' active %s', 'buddypress' ) ), bp_get_member_last_active() );237 $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_member_last_active() ); 238 238 } 239 239 … … 250 250 $members_template->member->last_activity = $time; 251 251 252 $this->assertEquals( bp_core_get_last_activity( $time, __( ' active %s', 'buddypress' ) ), bp_get_member_last_active( array( 'active_format' => true, ) ) );252 $this->assertEquals( bp_core_get_last_activity( $time, __( 'Active %s', 'buddypress' ) ), bp_get_member_last_active( array( 'active_format' => true, ) ) ); 253 253 } 254 254
Note: See TracChangeset
for help on using the changeset viewer.