Make WordPress Core

Opened 10 years ago

Closed 4 years ago

Last modified 3 years ago

#38664 closed enhancement (fixed)

Allow installing translations via the language setting on the user profile edit page admin

Reported by: barryceelen Owned by: swissspidy
Priority: normal Milestone: 6.2
Component: I18N Version: 4.7
Severity: normal Keywords: has-patch needs-user-docs has-dev-note
Cc: Focuses:

Description

A language option was added to the user's profile settings page. It would be nice to be able to add languages like you can in Settings > General

Change History (21)

#1 @ocean90
10 years ago

By "adding" you mean "installing" right?

#2 @barryceelen
10 years ago

Correct :-)

#3 @ocean90
10 years ago

  • Summary Allow adding locales via the language setting on the user profile edit page adminAllow installing translations via the language setting on the user profile edit page admin
  • Type feature requestenhancement

Related commit: [30335]

I'm not sure about that because it would allow non-admins to modify/add files on your filesystem.

#4 follow-up: @johnbillion
10 years ago

I think this feature should at least be allowed for users who can manage options. Without it, an admin has to either install a new language manually, or they have to switch the site language to their preference in order to install it, then switch it back, then switch their user language to their newly-installed preference.

#5 in reply to: ↑ 4 @swissspidy
10 years ago

I think this feature should at least be allowed for users who can manage options. Without it, an admin has to either install a new language manually, or they have to switch the site language to their preference in order to install it, then switch it back, then switch their user language to their newly-installed preference.

+1

#6 @MaximeCulea
10 years ago

If you are looking for wp_disallow_file_mods( $context ) method, it has been implemented in ticket.38673

This ticket was mentioned in Slack in #core-multisite by ocean90. View the logs.


10 years ago

#8 @swissspidy
8 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review5.0

I think should use the new install_languages capability introduced in [41268] for this.

I'm doing that in my Preferred Languages feature plugin as well.

#9 @pento
8 years ago

  • Milestone 5.05.1

#10 @pento
8 years ago

  • Milestone 5.1Future Release

#11 @swissspidy
8 years ago

  • Owner set to swissspidy
  • Status newassigned

This ticket was mentioned in PR #3226 on WordPress/wordpress-develop by swissspidy.


4 years ago
#12

  • Keywords has-patch added; needs-patch removed

This change allows installing new translations when changing the user locale on the profile page if the editing user has the necessary capabilities.

https://i0.wp.com/user-images.githubusercontent.com/841956/189542293-05383dd0-eda5-4039-bb45-b12f4813c3ac.png

Trac ticket: [](https://core.trac.wordpress.org/ticket/38664)

#13 @johnbillion
4 years ago

  • Milestone Future Release6.2

@swissspidy commented on PR #3226:


4 years ago
#14

On the settings screen we have a loading spinner to indicate that something/a download is happening. Should we add this here too?

Good idea! Spinner added now

This ticket was mentioned in Slack in #core-i18n by swissspidy. View the logs.


4 years ago

#16 @swissspidy
4 years ago

  • Resolutionfixed
  • Status assignedclosed

In 55099:

I18N: Allow installing new translations when changing the user locale on the profile page.

Up until now, new translations could only be installed via Settings -> General.
When editing the user profile, one could only select locales that were already installed.

This change allows also installing new translations if the editing user has the necessary capabilities.

Props barryceelen, johnbillion, ocean90, swissspidy.
Fixes #38664.

#18 @swissspidy
4 years ago

Looks like the language spinner JS (added in [55099], but also exists elsewhere) could be adjusted a little bit.

If a plugin like Preferred Languages completely removes the #WPLANG/#locale input, languageSelect.find( 'option:selected' ).data( 'installed' ) is also falsey, causing the spinner to be displayed all the time, even if there were no new languages added.

Could be as simple as:

-if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
+if ( languageSelect && ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {

#19 @milana_cap
3 years ago

  • Keywords add-to-field-guide needs-user-docs added

#20 @swissspidy
3 years ago

  • Keywords has-dev-note added; add-to-field-guide removed

This will be added to the dedicated i18n dev note

Note: See TracTickets for help on using tickets.