[theme-reviewers] Translation-ready themes
Otto
otto at ottodestruct.com
Tue Jun 24 17:56:19 UTC 2014
A PO file is literally just a POT file with the translated parts filled in.
Renaming it will work fine for POEdit.
I don't recommend using POEdit to actually generate POT/PO/MO files from
the source code itself, as it is a generic tool and it does not know about
the WordPress-specific i18n functions. Nor does it really know about
WordPress theme and plugin headers.
The WordPress makepot.php tool uses the actual wp core code to do a lot of
the work, so it's up-to-date and will always work correctly. The resulting
POT file it generates can then be used in any translation tool, such as
POEdit, to do the actual translation.
The handbook mentions the makepot.php file first. This is the recommended
method.
https://make.wordpress.org/docs/theme-developer-handbook/theme-functionality/localization/#generating-pot-file
Note that it says "You need thegettext (GNU Internationalization utilities)
package", however I do not believe this is true anymore. I'll investigate,
but I've been able to run the makepot.php file on a Windows box with XAMPP
installed without issues. Pretty sure it lacks the gettext package. That
information may be outdated and need to be revised.
Additionally, it does not mention that you need to check out the entire
/trunk directory, and not just the /tools/i18n directory. The makepot.php
file makes references back to the WordPress code in the /trunk/src
directory, so the entire copy of WordPress needs to be checked out as well.
WordPress does not have to be configured or anything, but the code must be
available for usage.
-Otto
On Tue, Jun 24, 2014 at 12:45 PM, Chip Bennett <chip at chipbennett.net> wrote:
>
> Note that I took the "make a .POT file by renaming a .PO file" from the
previously linked Codex/Handbook reference:
>
https://make.wordpress.org/docs/theme-developer-handbook/theme-functionality/localization/
>
> "There are a few other tools that can be used for generating a pot file.
You can use locally Poedit. After generating the po file you can rename the
file to POT."
>
>
> I've never played with the WP developer tools. I'll have to take a look.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140624/0539b8a9/attachment-0001.html>
More information about the theme-reviewers
mailing list