#34937 closed enhancement (fixed)
Language packs for plugins not installed on multisite installation
Reported by: | pputzer | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | I18N | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
I've recently switched my two plugins to use WP language packs for their translations. Somehow, the translations did not seem to work on my site. A closer look at /wp-content/languages/plugins/ of the production installation has revealed that directory to be empty, in contrast to the local MAMP installation I use for development. Language packs for themes and WP itself are present in both installations.
While i can't be completely sure (the production installation obviously has WP_DEBUG turned off and the error log is empty), the most salient difference between the two is the fact that the production environment is a multisite network.
Note: The bug would also appear to have been present in previous versions of WP, but I only looked after the site had already been upgraded to 4.4.
Attachments (1)
Change History (12)
#3
@
9 years ago
@ocean90 The main site (site_id 1) is on en-US. The installation is not under version control.
There are quite a lot of plugins installed, but AFAIK the only one that hooks into the upgrade process is WP Pusher. To be sure, I tried to check for updates with WP Pusher disabled before filing the ticket.
Regarding themes: There are only two themes installed for which I'd expect there to be language packs and these language packs are present (Twenty Ten and Twenty Fifteen). The other themes are not hosted on WP.org, so no language packs.
I'll try to reproduce this on a minimal WP multisite installation, but those are difficult to setup in exactly the same way on a local installation.
#4
@
9 years ago
- Keywords needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to 4.5
- Type changed from defect (bug) to enhancement
Currently the update check uses only the locale of the main site. To get updates for all locales you can use this code:
<?php function update_check_include_all_locales( $locales ) { return array_values( get_available_languages() ); } add_filter( 'plugins_update_check_locales', 'update_check_include_all_locales' ); add_filter( 'themes_update_check_locales', 'update_check_include_all_locales' );
I'm fine with changing the default value, at least for multisite installs.
#5
follow-up:
↓ 7
@
9 years ago
Thanks! I installed that fragment as mu-plugin and now it did download all the missing translations.
This not being the default behaviour on multisite is weird, because you can add languages from each individual site on the network (and those core translations are downloaded). Personally, I'd still consider that a bug from the user's (adminstrator's) perspective, because AFAIK there is now way to trigger a manual download of the plugin translations from within the UI.
#7
in reply to:
↑ 5
@
9 years ago
Replying to pputzer:
This not being the default behaviour on multisite is weird, because you can add languages from each individual site on the network (and those core translations are downloaded). Personally, I'd still consider that a bug from the user's (adminstrator's) perspective, because AFAIK there is now way to trigger a manual download of the plugin translations from within the UI.
I would most definitely call that a bug. The only way to trigger translations to be offered to download is to change the root site lang to the desired locale, as I explained here: #35599
Hello pputzer, thanks for your report.
Which locale is enabled for the main site? Which plugins are active? Is the production under version control? Can you reproduce this consistent? What about themes?