[wp-hackers] wordpress.org *.pot file feature for plugins gets broken by PoEdit

scribu scribu at gmail.com
Mon Jul 20 10:24:04 UTC 2009


This is the reason that plugin authors provide a .pot file generated with
the custom WP scanner. It's not a perfect solution, but it's a good
compromise, imo.


On Sun, Jul 19, 2009 at 7:46 PM, Heiko Rabe <heiko.rabe at code-styling.de>wrote:

> Yes this only works for active plugins (as i wrote) and yes it forces
> double definition (plugin comment header AND gettext).
> The point is, that without a gettext based definition the plugin fields
> definitely get lost by a new gettext scanning process of source files.
>
> This gettext calls could also place in a NOP function, never called
> elsewhere but ensure keeping it inside *.po file during rescan but yes this
> forces at least double definition.
>
> regards
>
>
>
>  Am I correct in thinking this would only work if the plugin is active?
>>  This info needs to work for inactive plugins too.  Also it seems to require
>> double-entry of data, which to me is a bad idea.
>>
>> Stephen
>>
>> On Jul 19, 2009, at 8:54 AM, Heiko Rabe wrote:
>>
>>  ...
>>>
>>
>>  This dissenting message entry creation is not standardized and won't work
>>> with normal gettext pasing applications.
>>> There should be introduced a safe way this can also be handled by
>>> re-scanning with gettext applications, otherwise this feature is worthless.
>>> One option would be a section of code only for purpose of getting this
>>> right by gettext processors like:
>>>
>>> function my_plugin_data($plugin_data) {
>>>  $plugin['Name'] => __('....', 'custom-field-images'),
>>>  $plugin['Title'] => __('....', 'custom-field-images'),
>>>  $plugin['PluginURI'] => __('....', 'custom-field-images'),
>>>  $plugin['Description'] =>__('....', 'custom-field-images'),
>>>  $plugin['Author'] => __('....', 'custom-field-images'),
>>>  $plugin['AuthorURI'] => __('....', 'custom-field-images'),
>>>  $plugin['Version'] => __('....', 'custom-field-images'),
>>>  $plugin['TextDomain'] => __('....', 'custom-field-images') ,
>>>  $plugin['DomainPath'] => __('....', 'custom-field-images')
>>>  return $plugin_data;
>>> }
>>> add_filter('wp_plugin_data-' .'custom-field-images', 'my_plugin_data');
>>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
http://scribu.net


More information about the wp-hackers mailing list