Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6739 closed defect (bug) (no action required)

New span counter structure interferes with internationalization

Reported by: efrap Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.4.0
Component: Core Keywords: close
Cc: ramiy

Description

Insertion of span tags for counters in 3.4 interferes with internationalization (from .po files). Fails and falls back to english.

Ex:

bp-groups-loader.php 2.4 line 564 - Members does not translate

<?php
'name'            => sprintf( _x( 'Members %s', 'My Group screen nav', 'buddypress' ), '<span>' . number_format( $this->current_group->total_member_count ) . '</span>' ),

bp-groups-loader.php previous version line 513 - Members translates ok

<?php
'name'            => sprintf( _x( 'Members <span>%s</span>', 'My Group screen nav', 'buddypress' ), number_format( $this->current_group->total_member_count ) ),

This problem can be found in a few pages, including:
activity/entry.php line 67
activity/index.php line 55
groups/index.php lines 49-52
members/index.php line 52

Other internationalization problems of this type exist - I may submit other tickets if this one is useful here.

Change History (8)

#1 @efrap
6 years ago

2.4, not 3.4

#2 @DJPaul
6 years ago

  • Cc ramiy added

Changes were made in #6660.

I don't understand why this would break the translation, but we can investigate. cc'ing @ramiy who made the suggestions originally.

#3 @ramiy
6 years ago

I don't know why it falls back to english, it shouldn't. The code is solid, we did the same thing in WP Core.

Maybe the problem in the translated string? maybe someone translated the string to english using "Copy from original" link?

@efrap, what language are you using?

#4 @efrap
6 years ago

Using French, English and Spanish. Worked before, tracked down the problem to these files after 2.4 update. Could there be something wrong with my install?

#5 @efrap
6 years ago

.mo .po files have probably changed with 2.4., i.e. "Members" instead of "Members <span>%s</span>" - I will check this today.

#6 @efrap
6 years ago

  • Keywords close added
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

That was the problem. Your help was very useful. .po files have been updated, everything is fine. Sorry for wasting your time on this - I should have figured this one out by myself, or in the forums.

#7 @boonebgorges
6 years ago

No apologies necessary. Thanks for the report and for the updates @efrap !

#8 @DJPaul
6 years ago

  • Component changed from API to Core
Note: See TracTickets for help on using tickets.