[buddypress-trac] [BuddyPress Trac] #7275: bp_core_enqueue_livestamp() results can't be properly translated

buddypress-trac noreply at wordpress.org
Wed Oct 12 23:37:20 UTC 2016


#7275: bp_core_enqueue_livestamp() results can't be properly translated
--------------------------+---------------------
 Reporter:  slaFFik       |       Owner:  r-a-y
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  2.7
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by r-a-y):

 @slaFFik - Thanks for the feedback you gave in today's dev chat.

 Regarding filtering the `moment.js` locale file, I decided not to
 introduce a new filter for this.  Instead, you should be able to use the
 already, existing `'bp_core_register_commons_scripts'` filter.

 Here's a quick code snippet:
 {{{#!php
 <?php
 add_filter( 'bp_core_register_common_scripts', function( $retval ) {
     if ( isset( $retval['bp-moment-locale'] ) ) {
         $retval['bp-moment-locale']['file'] = 'hxxp://NEWLINK.com/moment-
 custom-locale.js';
     }
     return $retval;
 } );
 }}}

 Let me know if you see anything else that needs addressing.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7275#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list