[bbPress – Report Content] bug in translation code
-
Hello
I found a (very small) bug in the plugin source code.
In the file bbpress-report-content/classes/class-bbpress-report-content.php, in the function load_plugin_textdomain, this line
load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
would work if the file was in the plugin’s root, but since it’s in the classes subdirectory, it tries to load translation files from bbpress-report-content/classes/lang/
Might I suggest that the line be changed to
load_plugin_textdomain( $domain, FALSE, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/lang/' );
or, using the fact that __DIR___ is the same as dirname( __FILE__ )
load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __DIR__ ) ) . '/lang/' );
Of course, if the translation files are in /wp-content/languages/bbpress-report-content/, it works fine.
Thank you.
- The topic ‘[bbPress – Report Content] bug in translation code’ is closed to new replies.