Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years 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
Priority: normal Milestone: 2.6
Component: I18N Version:
Severity: normal 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 11 years ago.
6900.diff​ (1.1 KB ) - added by boonebgorges 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @DJPaul
11 years ago

  • Milestone Awaiting Review → 2.5

#2 @DJPaul
11 years ago

  • Milestone 2.5 → 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
11 years ago

  • Keywords 2nd-opinion added
  • Milestone Under Consideration → 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​.

#4 @DJPaul
11 years ago

  • Keywords commit added

+1

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


11 years ago

#6 @dcavins
11 years ago

  • Owner set to dcavins
  • Resolution → fixed
  • Status new → 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
10 years ago

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