• Resolved Almaz

    (@almaz)


    It would be great if you could specify a translator’s email address or even a website address in the plugin’s settings, which would be inserted in the headers of PO files.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tim W

    (@timwhitlock)

    The Translator Credit setting is per user, not for the whole plugin.

    See https://localise.biz/wordpress/plugin/manual/settings#user

    Thread Starter Almaz

    (@almaz)

    Thank you for your quick response!

    But I have in my PO file headers: “Report-Msgid-Bugs-To: BUG-EMAIL-ADDR <EMAIL@ADDRESS>\n”

    Plugin Author Tim W

    (@timwhitlock)

    Oh right. I’ll look at adding support for that line too.

    In the mean time you can edit PO headers via the File info tab: top-right cog icon.

    Thread Starter Almaz

    (@almaz)

    Thank you so much for your prompt and quality support!

    Plugin Author Tim W

    (@timwhitlock)

    I’ve decided to add support for this via filters. It strikes me that the value of this header is project-specific, so neither user nor plugin settings seem the right place to put it. Plus, nobody else has asked for this feature.

    The latest release 2.5.4 has two new filters loco_po_headers and loco_pot_headers. You can use these in your code to modify the headers when new po and pot files are created.

    Example using an existing header to decide what to enter:

    function filter_pot_headers( ArrayAccess $head ){
        if( 'foo' === $head['X-Domain'] ){
            $head['Report-Msgid-Bugs-To'] = 'Baz';
        }
    }
    add_filter('loco_po_headers','filter_po_headers',10,1);
    Plugin Author Tim W

    (@timwhitlock)

    Correction: The function in my example is named filter_pot_headers when I meant to write filter_po_headers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Filling out the translator’s email address line’ is closed to new replies.