• Hi Tim,

    there seems to be a big problem that was already discussed in this forum with possible problems when updating to PHP8 if you have faulty translation files or faulty strings in it.

    Would it be possible to implement a function to scan for faulty translation files. Maybe a manual scan option? So everybody could fix the problem before updating to php8.x

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Implementing this is already on my TODO list. I just don’t have the capacity right now.

    It’s a huge problem for translators that PHP8 throws fatals for badly formatted strings. There are lots out there. My inbox is full of them.

    Thread Starter Robert Skiba

    (@robertskiba)

    Do you have an idea how to manually fix it? How to find the badly translated strings?

    Plugin Author Tim W

    (@timwhitlock)

    The two ways I would try are both slow.

    1. Open every translation file in Loco Translate and scan down the list. A warning sign should show for any strings it has detected as malformed.
    2. Make sure you have error logging set up properly and you will see the bad translations in your log files every time a fatal occurs. You must have exception_ignore_args switched OFF and a sensible value for exception_string_param_max_len.

    The latter is more reliable, but requires full code coverage by site visitors in order to catch them all.

    Re suggestion (1) It is also on my TODO list to show a notice above the editor when errors are found.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems when updating to PHP8’ is closed to new replies.