No possibility to translate certain parts of the theme.

  • Author
    Posts
  • #38602
    allfadr
    Power User

    The .po file doesn’t include translatable items for:

    1) the Recent Comments widget.
    The English phrase in the widget is “John Doe on Pubic Discussion”, John doe being the username, Pubic Discussion being the post name. I am to translate the “on” preposition. The .po file provides no possibility.

    2) the comments form.
    No part of the comments form (e.g. “Leave a reply”) is featured in the .po file.

    #38607
    Zed
    Cryout Creations mastermind

    Both the Comments widget and the comments form are part of WordPress and not controlled by the theme.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #38621
    allfadr
    Power User

    (You mean that it’s WordPress’ business to provide translations for them?
    OK. I’m brute-force-translating things in the corresponding WP PHP files, as a (hopefully) temporary solution (there’s no WP in my language).)

    …But this now must be a bug, no? =)
    The heading of the comments section of a post is controlled by the theme.
    There’s this function in “theme-comments.php”:

    function parabola_number_comments() { ?>
    <h3 id=”comments-title”>
    <?php printf( _n( ‘One Comment’, ‘%1$s Comments’, get_comments_number(), ‘parabola’ ), number_format_i18n( get_comments_number() )); ?> </h3> <?php }

    There’s no string in the .po file that corresponds to the ‘%1$s Comments’ argument. So only the ‘One Comment’ string can be translated, and if there are >1 comments, the heading is in English.

    #38630
    Zed
    Cryout Creations mastermind

    The comment form is generated by a WordPress function that the theme barely touches.
    The comment count you’re listing is not part of the form (you previously mentioned the form) and is correctly identified by WordPress’s Glotpress:

    What are you making the translation with? Your program might not support (or incorrectly handle) translations with plurals.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #38633
    allfadr
    Power User

    “The comment count you’re listing is not part of the form”
    Of course it isn’t. I’m not talking about the comments form any more: i understand now it’s not something a theme controls.
    I’m talking the comments section of a post. The theme controls its heading.

    I’m using Poedit. Bad choice?
    Poedit lists the ‘One comment’ string for translation, but not the ‘%1$s Comments’ string.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘No possibility to translate certain parts of the theme.’ is closed to new replies.