Support » Plugin: Loco Translate » Error with msgctxt?

  • Resolved Andreas Münch

    (@andreasmuench)


    Hey,
    I created a .pot with Loco Translate and got this issue:

    When a msgctxt is used for a translation like:

    msgctxt "Código Postal"
    msgid "ZIP"
    msgstr ""

    Then the translation __(‘ZIP’, ‘mydomain’) does not return the translation.
    I had a look into the translation object and it did not have the entry “ZIP”, but it had the entry “Código PostalZIP”, that´s why “ZIP” was not found.

    Do you have an idea where this error comes from?

    Thanks

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

    (@timwhitlock)

    Looks to me like someone opened the POT file in the editor – thinking it was a translation file – and entered a translation into the context field by mistake.

    Loco Translate won’t (and can’t) extract a translation into the msgctxt field from the code you’ve shown. If you sync your POT back to the source code, you should see this mistake disappear.

    Andreas Münch

    (@andreasmuench)

    Ok, thanks very much for your quick reply, that´s be a possibility I didn´t even think of.
    People do crazy stuff 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error with msgctxt?’ is closed to new replies.