• Hello,
    The inc/template-tags.php, line 56, contains the hard-coded english word “of” , which is used as in “Page x of y” . (For you to get the idea.The actual text does not show the word “Page”) . It resides between the <span></span> html tags.

    Actual code :

            <div class="page-number"><?php echo intval( $paged ); ?> <span>of</span> <?php echo intval( $wp_query->max_num_pages ); ?></div>
    

    Proposed code :

            <div class="page-number"><?php echo intval( $paged ); ?> <span>/</span> <?php echo intval( $wp_query->max_num_pages ); ?></div>
    

    Yes, I implemented the easiest (imho) translation-proof “/” instead of an actual word ??

    Of course a more academic approach would look like :

            <div class="page-number"><?php echo intval( $paged ); ?> <span>_x('of')</span> <?php echo intval( $wp_query->max_num_pages ); ?></div>
    

    I’m not sure that single character replacement warrants that I propose a svn patch myself? ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi @palijn, thanks for reporting this. I’m going to file a ticket on this issue, but can you confirm this is happening when you add pagination to pages or posts, or is it happening elsewhere? I just want to be able to clearly tell the developers how to reproduce this and where it is happening. Many thanks in advance.

    Thread Starter Palijn

    (@palijn)

    Hi @sacredpath ,
    I am seeing this when the home page is set to display the most recent posts, and there is pagination at the bottom since more articles exist than displayed.
    As an aside : the “Older posts” string was not translated, a situation affecting many other strings, therefore I submitted a complete French translation on the translation project page. I hope these translations will be included in the theme, I’m totally new to this process and will happily perform additional steps as directed.
    To get back to your question :
    I don’t know if this appears on other parts of the site, but I think I did pinpoint the exact code location where this happens. I’m happy to provide feedback on specific inquiries but I’m sure you’ll understand at this time I cannot perform an extensive review of my website to find a random “of” pop up somewhere…
    Thanks for your support

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    @palijn, if your site is live, can I have a link to it? With Libretto active on my test site, I’m not able to get pagination to show.

    I’m going to go ahead and submit the bug report to get the “of” taken care of, since it requires the change to the theme files, so even if I cannot see it, they should be able to find it.

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    This bug has been submitted, and hopefully the fix will be deployed very soon.

    Hi @palijn, thanks again for reporting this! We’ve updated the theme, so the string “of” will be marked for translation in version 1.0.9.

    Just let us know if there’s anything else we can look at!

    Thread Starter Palijn

    (@palijn)

    Hi @laurelfulford , thanks a lot. I’ve updated the theme and updated the translation as well. It’s wonderful ??
    I saw that even more strings were added to the .pot catalog.
    Would you be so kind to help me find out how I can send the updated fr.po/fr.mo to be included in the theme ? I’m not sure the last time worked well.

    Hi @palijn! Translations for our themes are managed on this site: https://translate.wordpress.com/

    Libretto’s French translation can be found here: https://translate.wordpress.com/projects/wpcom/themes/libretto/fr/default/

    The .po and .mo files are generated from those translations, and included in the next update of the theme. There’s a little more information about how this process works here: https://translate.wordpress.com/faq/

    I hope this helps! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Missing translation code _x() in inc/template-tags.php’ is closed to new replies.