[theme-reviewers] Proposed WordPress 3.3 Theme Review Guidelines Revisions

Otto otto at ottodestruct.com
Thu Nov 10 21:21:05 UTC 2011


On Thu, Nov 10, 2011 at 3:14 PM, Tyler Cunningham
<seizedpropaganda at gmail.com> wrote:
> I still think this is a bit much to be a REQUIRED. I see Mark's point and
> I'm sure he's right when it comes to automation, but shouldn't the decision
> ultimately be left up to the theme developer?
> I think this would be a much better RECOMMENDED, does anyone else agree?

No. Doing it with variables is just plain wrong, on all levels. It's
not really a matter of choice, it's a matter of standards. The strings
need to be capable of being parsed by other code. This is
code-parsing-other-code here, and that's the basis of all the gettext
translation mechanism.

In the plugins area, for example, there's a handy button on the
backend for plugin developers to generate the POT files for your
plugin automatically. If you use a variable, then they don't work.
Why? Because those programs don't *run* your code, they scan it for __
and _e and similar, then generate the necessary translation files. All
translation tools work in this manner.

So put simply, the use of variables for the translation namespace
fundamentally *doesn't work* with any existing translation tools. The
code should be machine parse-able, and it is, if you don't rely on any
variables in your translatable strings.

-Otto


More information about the theme-reviewers mailing list