[wp-hackers] Improving Plugin (and Theme) metadata

Andy Skelton skeltoac at gmail.com
Fri Feb 8 22:57:38 GMT 2008


On Feb 8, 2008 4:21 PM, Jennifer Hodgdon <yahgrp at poplarware.com> wrote:
>
> The problem with this idea is that people who internationalize their
> plugins and themes do not generally use WP-provided tools for making
> PO and MO files. They generally use third-party tools such as POEdit. See:
>

Deeper problem: ultimately accessible PO-making tools are not provided
by WP. How about a web form that uploads a theme or plugin and returns
a PO?

I didn't know about Ryan's i18n script until today. Now I'm looking at
it and thinking it would not be hard to augment the theme script to
locate the meta comment in style.css and to create a script to treat
plugin files the same way.

The logic: locate a comment beginning near the top of the file, split
it just like WP does, and put all the strings in the PO.

Then, WordPress core can filter the meta strings through __ as a
callback to avoid getting caught by xgettext:
$title = call_user_func('__', $title);

Andy


More information about the wp-hackers mailing list