Make WordPress Core

Opened 10 years ago

Closed 7 years ago

Last modified 6 years ago

#38665 closed enhancement (fixed)

Add user language preference to 'Add new user' form

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

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 10 years ago.
38665.2.diff​ (2.8 KB ) - added by johnbillion 7 years ago.
38665.3.diff​ (1003 bytes ) - added by johnbillion 7 years ago.

Download all attachments as: .zip

Change History (23)

#1 @johnbillion
10 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.


10 years ago

#3 @ocean90
10 years ago

  • Milestone Awaiting Review → Future Release
  • Type feature request → enhancement

#4 @barryceelen
10 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 10 years ago by barryceelen (previous) (diff)

#5 @johnbillion
10 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
8 years ago

  • Keywords needs-refresh added

The most recent patch needs to be refreshed.

#7 @johnbillion
7 years ago

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

#8 @johnbillion
7 years 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
7 years ago

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

#10 @johnbillion
7 years ago

  • Component I18N → Users

#11 @johnbillion
7 years ago

  • Resolution → fixed
  • Status reviewing → 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 years ago

In 47519:

Coding Standards: Fix WPCS issues in [47516].

See #38665.

#13 @SergeyBiryukov
7 years 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 years ago

  • Keywords needs-dev-note added

#15 @johnbillion
7 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed
  • Status closed → 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.

#16 @johnbillion
7 years ago

  • Keywords needs-testing added

#17 @johnbillion
7 years ago

  • Keywords has-patch added; needs-patch removed

#18 @afercia
7 years 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
7 years ago

  • Resolution → fixed
  • Status reopened → closed

[47739] missed this ticket.

#20 @johnbillion
6 years ago

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