[wp-trac] [WordPress Trac] #28571: Add a way to disable asynchronous translation updates
WordPress Trac
noreply at wordpress.org
Wed Sep 3 10:29:36 UTC 2014
#28571: Add a way to disable asynchronous translation updates
------------------------------+------------------------
Reporter: pavelevap | Owner: ocean90
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.0
Component: I18N | Version: trunk
Severity: major | Resolution:
Keywords: has-patch commit | Focuses:
------------------------------+------------------------
Comment (by nacin):
Replying to [comment:38 pavelevap]:
> Nice, so I can use `$language_update` in `async_update_translation` for
simply removing some theme from language updates?
yes.
> Are there any hooks which could be used to create list of available
translations ready for updates (on Dashboard - Updates screen)?
yeah, somewhere. :)
> What about safe location?
You can make your own if you wanted to. Untested, but this would probably
work:
{{{
add_filter( 'load_textdomain_mofile', function( $mofile ) {
$local_mofile = str_replace( WP_LANG_DIR . '/plugins/', WP_LANG_DIR .
'/local-plugins/', $mofile );
$local_mofile = str_replace( WP_LANG_DIR . '/themes/', WP_LANG_DIR .
'/local-themes/', $mofile );
if ( file_exists( $local_mofile ) ) {
return $local_mofile;
}
return $mofile;
});
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28571#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list