• Resolved Rob Walker

    (@rob-walker)


    Thanks for the plugin, it has helped tremendously by finding errors and shortcomings in my first WP theme.

    I’m getting the text domain error: “WARNING: Your theme appears to be in the wrong directory for the theme name. The directory name must match the slug of the theme. This theme’s correct slug and text-domain is westfall-manufacturing.”

    Based on these definition in my style.css:

    Theme Name: Westfall Manufacturing
    Text Domain: westfallmfg

    it appears that the text domain is being generated from a “sluggified” version of Theme Name (which accords with the documention) and is ignoring the Text Domain definition.

    The official themes such as twentyfifteen and twentyfourteen have directory names which match their defined Text Domains and not sluggified versions of Theme Name so I’m assuming that the Text Domain definition works. I also don’t find any documentation that indicates the need to define the textdomain other than in style.css.

    I appreciate that this issue is not specific to your plugin, but hope that you’d be well suited to helping me. To that end:

    Does this indicate that any translations will fail to work on the textdomain ‘westfallmfg’ and that I should change all textdomain references and the theme directory to ‘westfall-manufacturing’

    Thanks.

    https://ww.wp.xz.cn/plugins/theme-check/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Your assumption is incorrect. The default twenty themes are special cases. Your text domain is the slug version of the theme name. You do not get to choose your own in the theme directory. You must use the slug version, because that is what the whole system assumes and that is what the theme folders name will be if you upload it to the directory.

    Use ‘westfall-manufacturing’. Of course, if you’re not putting your theme in the directory for others to use, then it is largely irrelevant. Theme Check is for themes submitted to the directory. Not for any other purpose.

    Thread Starter Rob Walker

    (@rob-walker)

    Cursed special cases!

    Thanks, this is excellent information.

    While I appreciate that Theme Check is intended for submitted themes, you should appreciate that it is also damned useful, which I also appreciate.

    In addition, I appreciate your prompt response.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Not recognizing Text Domain definition’ is closed to new replies.