• Resolved snugly1heftiness1cargo

    (@snugly1heftiness1cargo)


    My site has started throwing errors for logged-in users. Tracing the error, it seems to occur at wp-content/plugins/better-wp-security/core/modules/two-factor/includes/template.php:98, due to a missing argument in printf. The code in that file seems ok, so the error is in a translation that hasn’t been updated.

    At wp-content/languages/plugins/better-wp-security-es_ES.po:1871, the msgstr has an additional template element (%5$s). The same thing happens in the previous template (line 1867).

    I have corrected the translations, but they are pending approval.

    For any other users affected: check your translations (instead of es_ES, open the corresponding file for your language) and edit to remove additional template elements.

    As a general suggestion, maybe you should invalidate translations when the number or type of template spots change in the original, to avoid errors. I’d much rather my users see some untranslated text than an error.

    Technical details:

    • Plugin version: 9.1.0
    • PHP version: 8.1.25
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @snugly1heftiness1cargo,

    This looks like the same issue as reported in this topic.

    When the SolSec plugin v9.0.0 was released (2023-10-17) these strings changed to status Fuzzy on translate.www.ads-software.com (I know because I am the Translation Editor for the Dutch translation).

    If you look at the Last modified date of these (2) strings you can see they have been (incorrectly) updated on 2023-10-17 18:30:06 UTC.

    If, whoever did that, had updated the fuzzy strings correctly this issue would never have existed (like with the Dutch translation ;-)).

    Basically strings whose status change to Fuzzy after a plugin update need to be properly reviewed and updated on translate.www.ads-software.com. That’s how it works ??

    +++ To prevent any confusion, I’m not SolidWP +++

    • This reply was modified 10 months, 2 weeks ago by nlpro.
    Thread Starter snugly1heftiness1cargo

    (@snugly1heftiness1cargo)

    Hi @nlpro,

    Thank you for all the details! I guess this problem is solved completely, or will be as soon as the translations are updated. The insight into the translation system was most instructive.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP error in es_ES translation due to mismatched templates’ is closed to new replies.