Skip to:
Content

Opened 18 months ago

Closed 17 months ago

Last modified 14 months ago

#6900 closed defect (bug) (fixed)

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

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

Description

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 18 months ago.
6900.diff (1.1 KB) - added by boonebgorges 17 months ago.

Download all attachments as: .zip

Change History (9)

@ramiy
18 months ago

#1 @DJPaul
18 months ago

  • Milestone changed from Awaiting Review to 2.5

#2 @DJPaul
18 months 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
17 months 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.

@boonebgorges
17 months ago

#4 @DJPaul
17 months ago

  • Keywords commit added

+1

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


17 months ago

#6 @dcavins
17 months 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
14 months ago

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