Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I posted the comment below on this thread.
    I hope a correction will be realeased soon.

    Hi,

    Not sure if i understood the whole thing, cause i’m new to WP.
    But I think the translation files (the *.po) are not correctly formatted.

    In the fr_FR version I found :
    #: src/functions/template-tags/loop.php:162
    #: src/functions/template-tags/loop.php:171
    msgid “%1$s for %2$s”
    msgstr “%1$s pour %2$s”

    But the php code on the targeted lines mentions the function esc_html_x which relies on a translation context. However, this context does not figure in the .po file. So that the esc_html_x function cannot retrieve the correct translation.

    I replaced esc_html_x with esc_html__ in my version of The Events Calendar plugin, and it worked. So, I see 2 solutions :
    – the contextual esc_html function should not be used (implying less information for the translators),
    – the whole translation files (*.po) have to be merged with the .pot file…

    Hope it helps.
    Olivier

    Hi,

    Not sure if i understood the whole thing, cause i’m new to WP.
    But I think the translation files (the *.po) are not correctly formatted.

    In the fr_FR version I found :
    #: src/functions/template-tags/loop.php:162
    #: src/functions/template-tags/loop.php:171
    msgid “%1$s for %2$s”
    msgstr “%1$s pour %2$s”

    But the php code on the targeted lines mentions the function esc_html_x which relies on a translation context. However, this context does not figure in the .po file. So that the esc_html_x function cannot retrieve the correct translation.

    I replaced esc_html_x with esc_html__ in my version of The Events Calendar plugin, and it worked. So, I see 2 solutions :
    – the contextual esc_html function should not be used (implying less information for the translators),
    – the whole translation files (*.po) have to be merged with the .pot file…

    Hope it helps.
    Olivier

Viewing 2 replies - 1 through 2 (of 2 total)