[theme-reviewers] Translation Slugs for Walkers

Otto otto at ottodestruct.com
Fri Dec 9 21:17:39 UTC 2011


On Fri, Dec 9, 2011 at 2:16 PM, Sayontan Sinha <sayontan at gmail.com> wrote:
> I am trying to extend a menu walker on the admin side by adding a couple of
> fields. The way the Walker_Nav_Menu class is written, I have to replicate
> the methods defined in the class, then add my own code (i.e. I cannot do
> things like parent::parent_method()). When I do this, I have to end up
> copying things such as translated strings. What is the recommended method
> for such strings? Do I leave the default (no slug) or do I add my theme's
> slug to the originals?
>
> My guess is that I have to put in my theme's slugs, but I would like to
> request confirmation.

I'm not 100% on this, but I believe that if the string is unaltered
and exactly the same, then leaving out the slug will work fine and
make it use the default translation. You may want to test this to see
if my theory is right.

However, if you leave out the slug, then theme check will give you a
warning. But it is only a recommended warning, shouldn't cause an
automatic fail. To avoid having the reviewer fail the theme, you
should include a readme.txt file (you should do this anyway), and make
a note about this in it that says it's intentional and why.

-Otto


More information about the theme-reviewers mailing list