• The title above the comments was not translated to dutch in my setup of understrap 0.8.2 (rest of the theme was):

    One thought on… / x thoughts on…

    I found that there are two implementations for plural text in comments.php in the root of the theme, one using an if/else statement, and one using _nx. The languages/nl_NL.po file did not correspond to this.

    My solution is to make a languages/nl_NL.po (and compiled .mo) in my child theme and accomodate for all (even though translation will never be used, so I could have skipped that one):

    #: ../comments.php:28 
    msgctxt "comments title"
    msgid "%1$s thought on “%2$s”"
    msgid_plural "%1$s thoughts on “%2$s”"
    msgstr[0] "%1$s reactie op “%2$s”"
    msgstr[1] "%1$s reacties op “%2$s”"
            
    #: ../comments.php:28
    msgctxt "comments title"
    msgid "One thought on “%s”"
    msgstr "Eén reactie op “%s”"

    And then add this to functions.php in my child theme:

    load_child_theme_textdomain( 'understrap', get_stylesheet_directory() . '/languages/' );

    This way I don’t have to alter the parent theme.

  • The topic ‘Comments title not translated’ is closed to new replies.