I'm trying to translate my plugin using poedit. I have following code in main plugin file:
<?php
/*
Plugin Name: FixFormData
Description: If you want to autocomplete a form with existing data, this plugin is for you.
Version: 1.1
Author: Stijn Aerts
Text Domain: ffd
Author URI: http://stijnaerts.be
License: GPL2
*/
require( plugin_dir_path( __FILE__ ) . 'menu.php');
require_once( plugin_dir_path( __FILE__ ) . 'getuser.php');
add_action( 'wp_enqueue_scripts', 'ffd_load_scripts');
function ffd_load_scripts()
{
load_plugin_textdomain('ffd', false, dirname(plugin_basename(__FILE__)));
}
In menu.php is the string I'm trying to translate:
public function page_init()
{
register_setting(
'fixformdata_group', // Option group
'fixformdata_options', // Option name
array( $this, 'sanitize' ) // Sanitize
);
add_settings_section(
'setting_section_id', // ID
'FixFormData options', // Title
array( $this, 'print_section_info' ), // Callback
'my-setting-admin' // Page
);
add_settings_field(
'tablename',
__('Table name', 'ffd'),
array( $this, 'title_callback' ),
'my-setting-admin',
'setting_section_id'
);
}
Where the string I try to translate is:
__('Table name', 'ffd'),
However when I use poedit to create a catalogue, this fails, he says he can't find any strings to translate.
What am I doing wrong?