[wp-trac] Re: [WordPress Trac] #3089: Localized values for plugin
metadata
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 9 21:44:48 GMT 2008
#3089: Localized values for plugin metadata
-------------------------------------+--------------------------------------
Reporter: nbachiyski | Owner: ryan
Type: enhancement | Status: reopened
Priority: normal | Milestone: 2.7
Component: i18n | Version:
Severity: major | Resolution:
Keywords: has-patch tested phpdoc |
-------------------------------------+--------------------------------------
Changes (by codestyling):
* status: closed => reopened
* resolution: fixed =>
* severity: normal => major
Comment:
I don't think so, this must not be the final solution:
{{{
foreach( (array)$all_plugins as $plugin_file => $plugin_data) {
//Translate fields
if( !empty($plugin_data['TextDomain']) ) {
if( !empty( $plugin_data['DomainPath'] ) )
load_plugin_textdomain($plugin_data['TextDomain'],
dirname($plugin_file). $plugin_data['DomainPath']);
else
load_plugin_textdomain($plugin_data['TextDomain'],
dirname($plugin_file));
foreach ( array('Name', 'PluginURI', 'Description',
'Author', 'AuthorURI', 'Version') as $field )
$plugin_data[ $field ] = translate($plugin_data[
$field ], $plugin_data['TextDomain']);
}
}}}
If you have an environment containing a lot of plugins and each having big
*.mo files (WP de_DE > 250kb / some mailing lists > 100kb and so on) or a
huge count of, they would sum up in memory and may exceed the
max_memory_usage value prior to produce the plugin page itself !
Because the gettext handling is not able to unload that files yet, the
loop introduced keeps all of them in memory with complete content during
looping '''all'''! found plugins.
I think, this is very critical at production systems having a huge count
of plugins installed and are not longer able to use the plugin page
without crashing the script.
In my opinion there is at least a second solution needed to unload the
translation files after successful translated parts to avoid memory
override and thatswhy i reopen this as potential dangerous and massive
time consuming enhancement.
--
Ticket URL: <http://trac.wordpress.org/ticket/3089#comment:52>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list