WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 6 months ago

Last modified 3 months ago

#38665 closed enhancement (fixed)

Add user language preference to 'Add new user' form

Reported by: barryceelen Owned by: johnbillion
Milestone: 5.5 Priority: normal
Severity: normal Version: 4.7
Component: Users Keywords: needs-testing has-patch
Focuses: administration Cc:

Description

Existing users can select an admin language. Perhaps allow preselecting a language on the user edit screen may be helpful.

Attachments (3)

38665.diff (2.4 KB) - added by barryceelen 4 years ago.
38665.2.diff (2.8 KB) - added by johnbillion 8 months ago.
38665.3.diff (1003 bytes) - added by johnbillion 7 months ago.

Download all attachments as: .zip

Change History (23)

#1 @johnbillion
4 years ago

  • Keywords needs-patch added

Makes sense. We did the same thing for sites in #33528.

This ticket was mentioned in Slack in #core by johnbillion. View the logs.


4 years ago

#3 @ocean90
4 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Type changed from feature request to enhancement

@barryceelen
4 years ago

#4 @barryceelen
4 years ago

  • Keywords has-patch added; needs-patch removed

38665.diff adds the language dropdown to the 'Add User' form.

Setting $user->locale is moved outside of the $update conditional.
Also removes setting $user->locale = ''. Unsure why that was there in the first place?

The language select is only shown if !is_multisite(). Is that correct?

Last edited 4 years ago by barryceelen (previous) (diff)

#5 @johnbillion
4 years ago

  • Focuses administration added
  • Keywords needs-testing added

Need to consider that there's also the ability to add a user to a site from the Network Admin -> Sites -> Edit -> Users screen.

#6 @desrosj
19 months ago

  • Keywords needs-refresh added

The most recent patch needs to be refreshed.

#7 @johnbillion
8 months ago

  • Keywords needs-testing removed
  • Milestone changed from Future Release to 5.5
  • Owner set to johnbillion
  • Status changed from new to reviewing

@johnbillion
8 months ago

#8 @johnbillion
8 months ago

  • Keywords needs-refresh removed

Updated the patch with changes which means the UI and behaviour of the dropdown now matches that of the one used when editing a user.

#9 @johnbillion
8 months ago

Confirmed that the welcome email sent to the user is sent in their own language.

#10 @johnbillion
7 months ago

  • Component changed from I18N to Users

#11 @johnbillion
7 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47516:

Users: Add a user language preference option to the "Add New User" form.

This uses the same language selection control as the user editing screen and allows new users to be invited to a site in their own language.

Props barryceelen, johnbillion

Fixes #38665

#12 @SergeyBiryukov
7 months ago

In 47519:

Coding Standards: Fix WPCS issues in [47516].

See #38665.

#13 @SergeyBiryukov
7 months ago

In 47520:

Coding Standards: Remove some extra tabs in wp-admin/user-new.php.

Follow-up to [47516], [47519].

See #38665.

#14 @johnbillion
7 months ago

  • Keywords needs-dev-note added

#15 @johnbillion
7 months ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This has broken the ability for the user to change their language from the user profile editing screen. $user->locale always gets set to an empty string.

@johnbillion
7 months ago

#16 @johnbillion
7 months ago

  • Keywords needs-testing added

#17 @johnbillion
7 months ago

  • Keywords has-patch added; needs-patch removed

#18 @afercia
6 months ago

Looking at 38665.3.diff, I'd like to suggest to add an inline comment where $user->locale is set to empty string. That may help avoid the same mistake in the future, as it's not immediately clear why it's needed. See

Also removes setting $user->locale = . Unsure why that was there in the first place?

#19 @johnbillion
6 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

[47739] missed this ticket.

#20 @johnbillion
3 months ago

  • Keywords needs-dev-note removed
Note: See TracTickets for help on using tickets.