1

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?

WVW
  • 221
  • 1
  • 2
  • 10

1 Answers1

0

I have a similar problem here and it seems it might raise an error if you have two identical terms in the .po file. Check if the .po file has more than one line like this:

msgid "Your name"
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
brenorb
  • 21
  • 2