WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#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 3 years ago.
20764.2.diff (1.9 KB) - added by obenland 3 years ago.
Removed spaces around static keys, as suggested by nacin
20764.3.diff (1.9 KB) - added by obenland 3 years ago.
Removed instances of esc_html() in favor of wp_specialchars_decode()

Download all attachments as: .zip

Change History (7)

@kobenland3 years ago

comment:1 @SergeyBiryukov3 years ago

  • Milestone changed from Awaiting Review to Future Release

Closed #14830 as a duplicate.

@obenland3 years ago

Removed spaces around static keys, as suggested by nacin

comment:2 @nacin3 years 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 @ryan3 years ago

  • Milestone changed from Future Release to 3.5

@obenland3 years ago

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

comment:4 @ryan3 years 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.