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

buddypress-trac noreply at wordpress.org
Wed Oct 5 20:09:53 UTC 2016


#7275: bp_core_enqueue_livestamp() results can't be properly translated
--------------------------+-----------------
 Reporter:  slaFFik       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.7
Component:  I18N          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 `bp_core_enqueue_livestamp()` was introduced in 2.7. It has this array,
 which includes both singular and plurals:

 {{{
 array(
     'future' => __( 'in %s',         'buddypress' ),
     'past'   => __( '%s ago',        'buddypress' ),
     's'      => __( 'a few seconds', 'buddypress' ),
     'm'      => __( 'a minute',      'buddypress' ),
     'mm'     => __( '%d minutes',    'buddypress' ),
     'h'      => __( 'an hour',       'buddypress' ),
     'hh'     => __( '%d hours',      'buddypress' ),
     'd'      => __( 'a day',         'buddypress' ),
     'dd'     => __( '%d days',       'buddypress' ),
     'M'      => __( 'a month',       'buddypress' ),
     'MM'     => __( '%d months',     'buddypress' ),
     'y'      => __( 'a year',        'buddypress' ),
     'yy'     => __( '%d years',      'buddypress' ),
 )
 }}}

 In Russian (and some other languages) plural like '%d years' can have 2
 forms, for 2-4 (22-24 etc) items, and 5+ (25-30 etc). The word "years" in
 this case will be translated differently: "года" and "лет". Same for
 months/days/etc.

 It seems we need to use `_n()` or `translate_nooped_plural()` with
 `_n_noop()`.

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


More information about the buddypress-trac mailing list