Skip to:

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6907 closed defect (bug) (fixed)

Avoid using HTML tags in translation strings (bp-forums/deprecated/1.6.php)

Reported by: ramiy's profile ramiy Owned by: boonebgorges's profile boonebgorges
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch


this patch fixes several things:

  1. I Found one string that didn't used i18n function - <code>bb-config.php</code> file location:
  1. Moving out the <code> tags out of the translation strings.
  1. Replacing the bb-config.php string with %s placeholders, like we do it in WP core.
  1. Add <code> tags around all the bb-config.php strings. Unifying the strings. Some had, some didn't. Now all the file names wrapped with code tags.

Attachments (1)

6907.patch (3.8 KB) - added by ramiy 8 years ago.

Download all attachments as: .zip

Change History (8)

8 years ago

#1 @DJPaul
8 years ago

  • Milestone changed from Awaiting Review to 2.5

#2 @DJPaul
8 years ago

  • Milestone changed from 2.5 to Under Consideration

Lots of good stuff, but I don't like the new string '%s file location:'. I think it ought to have a translator comment explaining the value that the token will be replaced with.

Note to committers: whoever puts this in once the patch is revised, please look at the escaping on the changed lines. There are a few more improvements we can make to this legacy code.

#3 @ramiy
8 years ago

@DJPaul, This is how we do it in WordPress core. When we have <code> (usually to emphasis file names, classes of functions), we use %s placeholder, and move the HTML tags outside.

#4 @ramiy
8 years ago

No escaping is needed. The placeholders are simple strings - not translation strings.

#5 @boonebgorges
8 years ago

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

In 10680:

Remove markup from translatable strings in legacy Forums component.

Props ramiy.
Fixes #6907.

#6 @boonebgorges
8 years ago

  • Milestone changed from Under Consideration to 2.6

#7 @DJPaul
8 years ago

  • Component changed from Locale - i18n to I18N
Note: See TracTickets for help on using tickets.