Opened 10 years ago
Closed 10 years ago
#29395 closed enhancement (fixed)
Site Language: Install translations on the fly
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | Cc: |
Description
This was previously included in #15677, but we decided to extract it for now, because it needs some more work.
Goal
The new language dropdown shows in addition to the installed languages also all available translations. When you select one of the available translations core will download the language pack and switches the site language.
Screencast: https://cloudup.com/cxEoda9nxh6
Issues
The main issue is the access to the filesystem: If it requires the credentials it currently does't work, because of the Automatic_Upgrader_Skin() in wp_download_language_pack().
Attachments (3)
Change History (22)
#2
follow-up:
↓ 3
@
10 years ago
I guess this should allow us to get rid of the unnecessary language selection step on install for localized builds. Or do we still need it for some reason?
See http://make.wordpress.org/polyglots/2014/09/03/i-really-like-the-new-installation-language-page/.
#3
in reply to:
↑ 2
@
10 years ago
Replying to SergeyBiryukov:
I guess this should allow us to get rid of the unnecessary language selection step on install for localized builds.
Resolved in #29487.
This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.
10 years ago
This ticket was mentioned in IRC in #wordpress-dev by johnbillion. View the logs.
10 years ago
This ticket was mentioned in Slack in #docs by ocean90. View the logs.
10 years ago
This ticket was mentioned in Slack in #core by johnbillion. View the logs.
10 years ago
#10
@
10 years ago
My current idea is to introduce an AJAX action which takes care of the FS check and the installation. Some brain dump:
- On submit we check if the selected languages is already installed
- If not we send an AJAX request with the language to install
- The action does first a FS check, if it fails the user will be promted to enter the FS credentials
- The user enters the data and submits the data again via AJAX
- The AJAX action does the installation
- On success we send the locale back, on failure we return a message (maybe
add_settings_error()
) - After that the form will be submitted with the new locale and the options can be saved.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#12
@
10 years ago
Let's make use of wp_can_install_language_pack()
here and ignore FS credentials for now.
This ticket was mentioned in Slack in #core by johnbillion. View the logs.
10 years ago
#14
follow-up:
↓ 15
@
10 years ago
- Keywords 4.1-early removed
29395.2.patch looks great. Works as expected when the filesystem is writable, only shows the currently installed languages when it isn't.
The only change I'd like to make is to move the spinner next to the submit button on both settings screens. What do you think ocean90?
Barring that, this can and should go in.
#15
in reply to:
↑ 14
@
10 years ago
Replying to johnbillion:
The only change I'd like to make is to move the spinner next to the submit button on both settings screens. What do you think ocean90?
Makes sense, would be consistent with other screens like install or Post UI.
#17
follow-up:
↓ 19
@
10 years ago
- Keywords has-patch removed
r30495 missed this ticket.
I think we're done here. Anything else you want to do for 4.1 ocean90?
[29691] should probably be undone by this, as noted in #29456.