mercredi 8 juin 2016

WP l18n __() do not return translated strings

I have an issue translating some places in wordpress "Coldform" plugin. The whole plugin l18n is translated except this array:

$yn = __('Your name', 'coldform');

$contact_coldform_strings = array(
    'name'     => '<input name="coldform_name" id="coldform_name" type="text" size="33" maxlength="99" value="' . $coldform_post_vars_name . '" placeholder="'. $yn .'" />', 
    'email'    => '<input name="coldform_email" id="coldform_email" type="text" size="33" maxlength="99" value="' . $coldform_post_vars_email . '" placeholder="'. __('Your email', 'coldform') .'" />', 
    'response' => '<input name="coldform_response" id="coldform_response" type="text" size="33" maxlength="99" value="' . $coldform_post_vars_response . '" placeholder="'. __('Please type the correct response', 'coldform') .'" />', 
    'message'  => '<textarea name="coldform_message" id="coldform_message" cols="33" rows="7" placeholder="'. __('Your message', 'coldform') .'">' . $coldform_post_vars_message . '</textarea>', 
    'verify'   => '<input name="coldform_verify" type="text" size="33" maxlength="99" value="" />', 
    'error'    => '',
);

Firstly I think that array is cause of problem. So I try to exclude translation, but it not helped. My domain is loaded, other translations work perfectly, but this place fails. I recreate my pot, po and mo files but event it not helped. So where is the problem? Here is my pot file line for 'Your name' translation:

#: contact-coldform.php:123 contact-coldform.php:198
msgid "Your name"
msgstr ""

Here po file line:

#: contact-coldform.php:123 contact-coldform.php:198
msgid "Your name"
msgstr "varduolis"

Any suggestions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire