Support » Plugin: Recent Posts Widget With Thumbnails » possible bug in the translation of “author label”

  • Resolved georgeinmexico

    (@georgeinmexico)


    My clients don’t like the default translation provided for the words “By %s” or “By Author”. I have looked in the .po file provided with the plugin, but I can’t find that string available for translation in the po file.

    In the main plugin php file, could you check to see if the last line of this is creating a bug:

    // translate repeately used texts once (for more performance)
    $text = ‘, ‘;
    $this->defaults[ ‘comma’ ] = __( $text );
    $text = ‘…’;
    $this->defaults[ ‘ellipses’ ] = __( $text );
    $text = ‘By %s’;
    $this->defaults[ ‘author_label’ ] = _x( $text, ‘theme author’ );

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    There is no bug. The plugin uses the WordPress standard translation. Which label does your client prefer?

    Thread Starter georgeinmexico

    (@georgeinmexico)

    Martin, Thank you for replying to my post, and explaining that the plugin uses the standard wordpress translation. I am very grateful to be receiving your support for your free plugin. That is very generous!

    The part that I thought was a bug is that I was not able to find the string “By %s” in the PO file for your plugin. Are you pulling that translation from the default wordpress MO file (ar.mo)? If so, then I could modify the translation in the default wordpress translation file.

    My Arabic client prefers “بقلم %s” as the the translation of “By %s”, which can be back-translated into english as “By %s” “Written by %s” or “By the pen of %s”.

    My farsi client preferred something else as well, but as I wasn’t able to change the translation for him, I ended up hiding the string with some really bad CSS.

    Would you be willing to add a span tag and css class to the “author”, so that it could be styled or hidden with CSS?

    Thank you for this support! I am getting a lot of value for free from your plugin, and I wanted to help by reporting what might have been a bug, rather than just fixing it on my two sites. I really appreciate your plugin.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    Yes, the translation is taken from the ar.mo file. But you shsould not change it. You can do that, but the next upgrade will overwrite it.

    I’m thinking of an additional text field where you can write the preferred label. What about that?

    Thread Starter georgeinmexico

    (@georgeinmexico)

    Martin, it is very thoughtful of you to add that text field. I have seen other plugins cause confusion that way, by splitting their translations between a PO file and backend fields, which means translators have to look for strings in two different places. I think they way you have it is clever, allowing users to take advantage of the core wordpress translation strings.

    If you wanted to change something, you could add a span around that string like this:
    <div class=”rpwwt-post-author”><span class=”rpwwt-post-by”>By</span> William Shakespeare</div>

    Or if there is something I could add to my functions.php to hide “By” when the author is called, that could accomplish the same purpose.

    Thank you for your help.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    I would allow an empty field. So there will be no need to hide that label via CSS. I will add the span, because maybe someone wants to design the label.

    Please be patient for some days for my work.

    Thread Starter georgeinmexico

    (@georgeinmexico)

    That would work well for me. Thank you for improving your plugin for me and everyone else!

    Plugin Author Martin Stehle

    (@hinjiriyo)

    With the new version 6.8.0 you can set the label for author names easily.

    If you’ like the plugin, I’ll be glad about your review.

    I forgot the span element around the label. I hope it is not necessary. If you’d need it, I’ll add it soon.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘possible bug in the translation of “author label”’ is closed to new replies.