[Resolved] Textdomain conflict
I have a small issue which you be able to assist with resolving which I’m sure impacts other users of your plugin.
I have a theme which has .po/.mo files contained within a /languages subdir within the theme
These are called from within the theme functions.php as follows:
load_theme_textdomain(‘foothemetextdomain’, get_template_directory() . ‘/languages’);
So far so good.
In addition, there is a plugin bundled with the theme which resides in:
This plugin also calls it’s lang files with it’s down text domain and with a different type of call:
load_textdomain( ‘barlang’, $mofile );
The net effect of all this is that when I attempt to create po files with your plugin I have a few problems:
1.) The default text domain appears to be “barlang” instead of “foothemetextdomain”
2.) I see this error:
Loading Issue: Author is using load_textdomain instead of load_theme_textdomain or load_child_theme_textdomain function. This may break behavior of WordPress, because some filters and actions won’t be executed anymore. Please contact the Author about that.
3.) When I try to edit the po file I see this error:
Error: The actual loaded translation content does not match the textdomain
Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one textdomain.
It seems, that there is code contained extracted out of other plugins, themes or widgets and used by copy & paste inside some source files.
The affected unknown textdomains are:
All 3 issues go away when I remove the plugin but I need the plugin for some key parts of the themes functionality. Is there some workaround or code I can add to the theme to stop your scans from picking up on the plugin?
- The topic ‘[Resolved] Textdomain conflict’ is closed to new replies.