Skip to:

Opened 10 years ago

Closed 10 years ago

#5231 closed defect (bug) (fixed)

Number format not being applied

Reported by: sgr33n's profile sgr33n Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: normal
Severity: normal Version:
Component: Core Keywords:



On the "Member list Subnav" the total members number is not being formatted.

Change History (3)

#1 @boonebgorges
10 years ago

Yes, you're right.

Our treatment of number format is inconsistent in the activity/index.php template. It's mostly my fault. See #4997 [7177], #5228 [7516].

I've done an audit of the _count() functions used in this template, and applied the following logic:

  • All number formatting should be done in the -template.php files, as filters applied to the output (add_filter( hook, 'bp_core_number_format' ))
  • No number formatting should be done in the template
  • Add format filters to functions where it was missing
  • When creating Groups tabs, use %s rather than %d to account for number formats

I believe this should be consistent across templates.

#2 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 1.9

#3 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7520:

Improvements to i18n number formatting in activity count functions/templates

This changeset makes number formatting more consistent in the activity
templates of bp-legacy. The logic is as follows:

  • Move all number formatting out of the templates and into the relevant -template.php file.
  • Add number formatting to those _count() template functions that were missing it.
  • Clean up sprintf() swapping arguments to account for string vs int number formats

See #4997, #5228

Fixes #5231

Note: See TracTickets for help on using tickets.