#6907 closed defect (bug) (fixed)
Avoid using HTML tags in translation strings (bp-forums/deprecated/1.6.php)
Reported by: | ramiy | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch |
Cc: |
Description
this patch fixes several things:
- I Found one string that didn't used i18n function -
<code>bb-config.php</code> file location:
- Moving out the
<code>
tags out of the translation strings.
- Replacing the
bb-config.php
string with%s
placeholders, like we do it in WP core.
- Add
<code>
tags around all thebb-config.php
strings. Unifying the strings. Some had, some didn't. Now all the file names wrapped with code tags.
Attachments (1)
Change History (8)
#3
@
9 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
@
9 years ago
No escaping is needed. The placeholders are simple strings - not translation strings.
Note: See
TracTickets for help on using
tickets.
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.