Make WordPress Core

Opened 8 years ago

Closed 18 months ago

Last modified 17 months ago

#38664 closed enhancement (fixed)

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

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

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
8 years ago

By "adding" you mean "installing" right?

#2 @barryceelen
8 years ago

Correct :-)

#3 @ocean90
8 years ago

  • Summary changed from Allow adding locales via the language setting on the user profile edit page admin to Allow installing translations via the language setting on the user profile edit page admin
  • Type changed from feature request to enhancement

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
8 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
8 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
8 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.


8 years ago

#8 @swissspidy
6 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.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
6 years ago

  • Milestone changed from 5.0 to 5.1

#10 @pento
6 years ago

  • Milestone changed from 5.1 to Future Release

#11 @swissspidy
6 years ago

  • Owner set to swissspidy
  • Status changed from new to assigned

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


22 months 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
22 months ago

  • Milestone changed from Future Release to 6.2

@swissspidy commented on PR #3226:


20 months 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.


18 months ago

#16 @swissspidy
18 months ago

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

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
18 months 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
17 months ago

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

#20 @swissspidy
17 months 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.