WordPress.org

Make WordPress Core

#20764 closed defect (bug) (fixed)

Role names not translated in new user notification message in MS

Reported by: kobenland Owned by: ryan
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.3.2
Component: I18N Keywords: has-patch dev-feedback
Focuses: Cc:

Description

In Multisite when a new user gets added to a site, the role name in the notification message does not get translated.

Currently the role name itself is used (which is lowercase and English only) not the role display name.

In the patch I call get_editable_roles() to also take custom role names into account, when fetching the role display name.

Attachments (3)

20764.diff (1.9 KB) - added by kobenland 23 months ago.
20764.2.diff (1.9 KB) - added by obenland 21 months ago.
Removed spaces around static keys, as suggested by nacin
20764.3.diff (1.9 KB) - added by obenland 21 months ago.
Removed instances of esc_html() in favor of wp_specialchars_decode()

Download all attachments as: .zip

Change History (7)

kobenland23 months ago

comment:1 SergeyBiryukov23 months ago

  • Milestone changed from Awaiting Review to Future Release

Closed #14830 as a duplicate.

obenland21 months ago

Removed spaces around static keys, as suggested by nacin

comment:2 nacin21 months ago

Looks good, though a note, esc_html() going into an email looks off. But that's a recurring theme through MS and core.

comment:3 ryan21 months ago

  • Milestone changed from Future Release to 3.5

obenland21 months ago

Removed instances of esc_html() in favor of wp_specialchars_decode()

comment:4 ryan21 months ago

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

In [21316]:

Translate role names in the new user notification email. Props obenland. fixes #20764

Note: See TracTickets for help on using tickets.