WordPress.org

Support

Support » Plugins and Hacks » [Resolved] character set in mail notification of comment on photo

[Resolved] character set in mail notification of comment on photo

  • Mover MM
    Member

    @maciej-matysiak

    Hi OpaJaap!

    I would like to ask about character coding header in mail notifications of comments on photos. All notifications which I get from my WordPress site are coded using UTF-8 and all of them have mail header Content-Type: text/plain; charset=”UTF-8″ (including notifications from other plugins like BuddyPress) except notifications about new comment on photo sent from WP Album Plus. The header field is missing thus my national characters are not displayed properly. Am I missing any locale setting in WP Album Plus?

    Maybe it is related. I have translated partially (using Poedit) wppa.pot and wppa_theme.pot files and saved Polish versions wppa-pl_PL.mo and wppa_theme-pl_PL.mo in the langs directory. Most of the translated sentences and phrases are displayed properly except those being sent in mail notifications. For example, there is the “Comment on photo:” in the wppa-pl_PL.mo translated but a mail being sent has the original English phrase in the subject. Also, the whole content of the mail is not translated. Is it a known issue or missing setting?

    I would appreciate any hints.
    Regards, MM

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jacob N. Breetvelt
    Participant

    @opajaap

    Charset in email: most likely fixed in the next version ( 4.9.3 ).
    I added the headers, but can not test it. Please tell me if it works when you have version 4.9.3 installed. This may take a few days.

    pl_PL: please send me the Polish .po files ( mail to opajaap at opajaap dot nl ). I will update them with the latest new sentences, this will also include the malfunctioning lines ( that are by accidently in the wrong files ).
    I will include thos in the distribution, so you only have to update the files with the few lines.

    Mover MM
    Member

    @maciej-matysiak

    Sounds good! Thank you. Sure, I will test it and let you know of results.

    Polish .po files have been sent to your mailbox. They are not completely translated yet, but I am going to send you the complete translation soon.

    Regards, MM

    Mover MM
    Member

    @maciej-matysiak

    Wow! 4.9.3 already! ๐Ÿ™‚ I just installed it and entered some test comments…

    Email notifications contain new headers but UTF-8 characters still are not displayed properly. I took a look at a raw email message and probably found the cause. Two headers have wrong end-of-line marks:
    1. MIME-Version: 1.0
    2. Content-Transfer-Encoding: 8bit
    These lines end up with CR+LF (Windows) instead of LF (Unix).

    One more thing. I am not sure, probably to display properlly UTF-8 encoded characters in a subject line it shoud begin with =?UTF-8?Q? or =?UTF-8?Q? and end up with ?=

    After moving sentences among .po files now email sentences are being translated ๐Ÿ™‚ Great! Thanks. I guess the rest of Polish sentences I should enter to new .po files and send them back to you, right?

    Regards, MM

    Mover MM
    Member

    @maciej-matysiak

    More tests… After removing CR (\r) from the end-of-line marks which I found in the wppa-functions.php file all UTF-8 characters are displayed properly in my emails, including those in the subject! So there is no need to embrace the subject width =?UTF-8?Q? and ?= … strange, but working ๐Ÿ™‚

    Plugin Author Jacob N. Breetvelt
    Participant

    @opajaap

    I will remove the CR in the next version. Thanx for helping me!

    BTW: This is what the PHP manual says:

    Note:

    If messages are not received, try using a LF (\n) only. Some Unix mail transfer agents (most notably ยป qmail) replace LF by CRLF automatically (which leads to doubling CR if CRLF is used). This should be a last resort, as it does not comply with ยป RFC 2822.

    Plugin Author Jacob N. Breetvelt
    Participant

    @opajaap

    I guess the rest of Polish sentences I should enter to new .po files and send them back to you, right?

    Yes please.

    Mover MM
    Member

    @maciej-matysiak

    Hi OpaJaap!

    The complete Polish translation of the .po files has been sent to your mailbox. The files contain the translated sentences added in version 4.9.4 also.

    Recently, while using your great plugin I encountered a few sentences not being translated in a browser or email, though they are translated in the .po files. These are:
    * “Photo successfully uploaded” – after upload from frontend (no entry in the .po file)
    * “<span style=\”color:red\” >Warning: Do not upload copyrighted material!</span>” – on admin page
    * “You receive this email as administrator of the site” – in email
    * “You receive this email as owner of the album” – in email

    Regards,
    Mover MM

    Plugin Author Jacob N. Breetvelt
    Participant

    @opajaap

    I will make sure the texts are in the right file the next release ( 4.9.5 ). Thanx for the updated files, they will be also in the next release including two that i moved to the other file.
    It should be almost complete then.

    The sentence:

    <span style=\"color:red\" >Warning: Do not upload copyrighted material!</span>

    can only be automaticly corrected in the default of Table II-B20. You will have to modify it there on your installation.

    Mover MM
    Member

    @maciej-matysiak

    The sentence: … Warning: Do not upload copyrighted material! … can only be automaticly corrected in the default of Table II-B20.

    That’s fine for me. I found this sentence in the .po file so based on that I was guessing that it should have been translated even before modifying Table II-B20. So probably this entry may be removed from the .po file then ๐Ÿ™‚

    Plugin Author Jacob N. Breetvelt
    Participant

    @opajaap

    No, if you have the translation complete BEFORE activating the plugin FOR THE FIRST TIME, you will have the translated version in Table II-B20.

    Mover MM
    Member

    @maciej-matysiak

    Thank you for the explanation! Now I begin to understand how it works, I hope.

    Regards,
    Mover MM

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] character set in mail notification of comment on photo’ is closed to new replies.