• Resolved remyrivalis

    (@remyrivalis)


    Hello,

    I have update the plugin from 7.3.0 to 7.3.1 and it was ok.

    Then I have update the translation of the plugins (I use french) and my WordPress is totaly broken :

    Fatal error: Uncaught ValueError: Argument number specifier must be greater than zero and less than 2147483647 in \wp-content\plugins\breadcrumb-navxt\class.bcn_breadcrumb_trail.php on line 124

    I have delete the plugin directory because I have no other choice.

    Update : It seems that in 7.3.0 I haven’t translation files, they are available with the version 7.3.1

    • This topic was modified 3 months, 1 week ago by remyrivalis. Reason: adding information
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author John Havlik

    (@mtekk)

    This one is a bit confusing, that line was not changed in 7.3.1. Additionally, it doesn’t look like the French translation has been updated recently either https://translate.wordpress.org/projects/wp-plugins/breadcrumb-navxt/stable/fr/default/?filters%5Bterm%5D=Go+to+the+first+page+of+search+results+for+%25title%25.&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=priority&sort%5Bhow%5D=desc

    Lastly, I’m not seeing anything in the French translation for the string on the line of the error that should cause a problem (or is even different from the original English or Spanish translation (which I test against locally)). I’m not sure if there is something specific with the server setup (if it is a specific PHP version that causes it), or something I’m missing here.

    Can you all check if line 124 of class.bcn_breadcrumb_trail.php is the same as this: https://plugins.trac.wordpress.org/browser/breadcrumb-navxt/tags/7.3.1/class.bcn_breadcrumb_trail.php#L124

    And add this code to your functions.php to prevent the translations to be downloaded:

    // Prevent downloading translation for plugin breadcrumb-navxt
    add_filter( 'pre_http_request', function ( $bFalse, $args, $sUrl ) {
    if ( strpos( $sUrl, 'downloads.wordpress.org/translation/plugin/breadcrumb-navxt/' ) ) {
    return new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.') );
    }
    return $bFalse;

    }, 10, 3 );

    Found the problem: Translation of “Search results for '%1$s'” is

    Résultats de recherche pour %$1s

    but should be:

    Résultats de recherche pour %1$s (or better)

    Résultats de recherche pour '%1$s'

    Made an edit to https://translate.wordpress.org/projects/wp-plugins/breadcrumb-navxt/stable/fr

    I think the problem is not the quote but the fact that %1$s is translated %$1s (the $ is not at the good place). I’m fixing it.

    (Edit : I’ve misread the comment before which is saying the same thing, sorry.)

    • This reply was modified 3 months, 1 week ago by Julie Moynat.
    • This reply was modified 3 months, 1 week ago by Julie Moynat.

    I added the quotes just to be similar to the original text

    But & #39; (without the space between & and #) is an apostrophe so I’ve proposed the French quotes instead.

    • This reply was modified 3 months, 1 week ago by Julie Moynat.
    • This reply was modified 3 months, 1 week ago by Julie Moynat.

    Real code is

    & # 39;%1$s& # 39;

    but the gutenberg editor for comments here translates it. I can’t make it to exactly display the correct spelling so I added spaces

    • This reply was modified 3 months, 1 week ago by coriolis_too.
    • This reply was modified 3 months, 1 week ago by coriolis_too.

    @coriolis_too yes, this is the English string and & #39; is an apostrophe. In French typography, when we’re quoting words, we use French quotes that are : « quelques mots » and not ‘quelques mots’.

    That’s why the person who introduce the bug have removed the apostrophes in my initial translation when validating it… (We can see that in the history.)

    Now, we need someone to validate quickly the translation to fix all French websites using BreadcrumbNavXT…

    I’ve contacted the WordPress FR community via Slack and the translation has been validated. The new translation should be available in around one hour so we will be able to test if everything is fixed.

    Hi there,

    Thank you very much @juliemoynat for letting us know about the issue.
    We sincerely apologize to @mtekk for making a mistake in our translations. This should be fixed now (the new translation package should be available in the next hour).

    Jb, General Translation Editor fr_FR

    The translation is deployed so you can do the update.

    I’ve reactivated the plugin on my website and now, it works well!

    Plugin Author John Havlik

    (@mtekk)

    @coriolis_too thanks for digging into this farther. Given the error I was expecting something like this but was lead astray by the line number PHP was giving.

    @juliemoynat thanks for fixing the translation and notifying the translation team. I’m not sure why your replies were deleted from the thread, I think they provided important context.

    @audrasjb thanks for getting the fixed translation string approved and following up on this. It looks like there may be an opportunity to improve the translation tool and WordPress itself here. WordPress should check for PHP errors when loading a translation package, similar to what it does on plugin activation. Additionally, the translation tool could warn on strings that would cause a sprintf/printf error, the tool already identifies these printf tags in the original string (maybe it could even prevent such a translation from being approved).

    @juliemoynat

    I have same problem here. Could you please explain how to proceed to upgrade the French translation in WordPress ?

    Regards,

    Thread Starter remyrivalis

    (@remyrivalis)

    @jeff-rullier If you are blocked with fatal error first delete french translation in \wp-content\languages\plugins\ all files breadcrumb-navxt-fr_FR*

    Then go to wordpress update dans update translation

    Problem solved for me.

    @remyrivalis

    It worked for me also. Thank you very much !

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.