Skip to:

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#6900 closed defect (bug) (fixed)

Avoid using HTML tags in translation strings (bp-settings/bp-settings-template.php)

Reported by: ramiy's profile ramiy Owned by: dcavins's profile dcavins
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch 2nd-opinion commit


Old string:

  • There is a pending change of your email address to %1$s.<br />Check your email (%2$s) for the verification link. <a href="%3$s">Cancel</a>

New strings:

  • There is a pending change of your email address to %s.
  • Check your email (%s) for the verification link.
  • Cancel

Attachments (2)

6900.patch (1.2 KB) - added by ramiy 8 years ago.
6900.diff (1.1 KB) - added by boonebgorges 8 years ago.

Download all attachments as: .zip

Change History (9)

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

I don't like this patch because it splits a paragraph into multiple phrases. I expect there may be languages where people want to re-order the sentences, or continue to have just one. I can see you've tried to tackle this by introducing a line break, but I think that's a worse solution than leaving this string as it is.

#3 @boonebgorges
8 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Under Consideration to 2.6

'Cancel' as a standalone string here probably won't work. 'Cancel' is generally used as button text, which it is not in this case, so it's possible that some locales will want to translate it differently. So we need either (a) to combine it with more of the string, (b) turn it into a button, (c) change it to _x() and add context, or (d) change the wording altogether so that the context is more obvious. For accessibility reasons, I think that (d) is probably the best option.

See 6900.diff.

8 years ago

#4 @DJPaul
8 years ago

  • Keywords commit added


This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.

8 years ago

#6 @dcavins
8 years ago

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

In 10689:

Improve translation strings in email change notice.

Move HTML tags out of translation strings
when possible.

Props ramiy, DJPaul, boonebgorges.

Fixes #6900.

#7 @DJPaul
8 years ago

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