Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#2291 closed defect (bug) (fixed)

argument swapping on all BP __ and _e calls where applicable

Reported by: DJPaul Owned by:
Milestone: 1.2.4 Priority: normal
Severity: Version:
Component: Core Keywords: has-patch
Cc: francesco.laffi@…

Description

Built on rev 2904 of the 1.2 branch. Also touched up a couple of code-style issues.

Attachments (2)

patch_2291.patch (45.6 KB) - added by DJPaul 10 years ago.
patch_2291-2.patch (45.6 KB) - added by DJPaul 10 years ago.
v2

Download all attachments as: .zip

Change History (10)

@DJPaul
10 years ago

#1 @DJPaul
10 years ago

Please would someone look at this before it goes stale. It just adds argument swapping to all and _e calls. i.e.

`
sprintf( ( "Hello %$1s, it is %$2s today", 'buddypress' ), 'Paul', 'sunny' );

Can be translated as "Hello Paul, it is sunny today" or "Hello sunny, it is Paul today".
`

#2 @johnjamesjacoby
10 years ago

Do you mind combing through this one more time?

I found a '1$%s' in your patch, which means no cake for you, yet. :)

Outstanding work though, and a long time coming.

@DJPaul
10 years ago

v2

#3 @DJPaul
10 years ago

v2 resolves that. I couldn't find any other errors.

#4 @johnjamesjacoby
10 years ago

Awesome. I like it.

#5 @johnjamesjacoby
10 years ago

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

(In [2941]) Fixes #2291 props DJPaul

#6 @francescolaffi
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Not sure about this but I think that the 2941 changeset is wrong in some points: it changes lot of %s to %*$d , sometimes a number is passed as string because is formatted from bp_core_number_format that add a comma as thousands separator so it must be s not d, otherwise it will trunk numbers after the comma if the number passed is > 999

#7 @francescolaffi
10 years ago

  • Cc francesco.laffi@… added

#8 @johnjamesjacoby
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [2944]) Properly reset format strings from r2941. Fixes #2291 again. Props francescolaffi.

Note: See TracTickets for help on using tickets.