[wp-hackers] i18n of plugin description

wordpress at santosj.name wordpress at santosj.name
Thu Jan 24 17:33:55 GMT 2008

> On Jan 24, 2008 9:09 AM, Stefano Aglietti <steagl4ml at gmail.com> wrote:
>> On Thu, 24 Jan 2008 08:04:25 -0800 (PST), wordpress at santosj.name
>> wrote:
>> >The commit team does not seem keen on that solution or any solution
>> which
>> >involves hooks, and reloading of the plugin description. It will also
>> have
>> >to not have any major refactoring of how the plugin system functions.
>> Ryan proposed some solution time ago, if he could explain it again
>> here would be nice. Would be nice how they can immagine to solve this
>> problem...
> The proposals were pretty similar to what is being discussed here. One
> proposal leveraged gettext:
> Introduce a new file called plugin_name-header.php.  Contents are
> something like this:
> $description = __('blah blah blah', 'plugin_name');
> ... for other fields
> Or we would introduce some API methods instead of setting variables.
> Doesn't really matter.  The plugin_name part of plugin_name-header.php
> will be used as the textdomain.  WP loads the catalog for plugin_name
> and then loads plugin_name-header.php.
> Another proposal was to load plugin_name-lc_CC.txt files.  The file
> would contain the plugin header translated for lc_CC.
> The gettext method requires loading php files that might be broken,
> thus allowing a plugin to break the manage plugins page even if it
> isn't activated.  lc_CC.txt means lots of little files laying around
> in addition to the .mo files.  Either way, we will need to figure out
> how automatic upgrade of plugins will deal will locales.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

Created patch for gettext implementation. Will upload later. Have class.
Will need testers, because I can't and won't create .mo files for it. Will
test to make sure it works before I upload.

Will implement second set of suggestions later.

Translating plugin name will break update notification (automatic
upgrade?), so plugin name won't be translated but Title can be.

Jacob Santos

More information about the wp-hackers mailing list