• Resolved Sabuj Kundu

    (@manchumahara)


    I am really fan of Loco translate plugin and almost uses everyday for my plugin’s translation. One common problem is it has a setting called “Skip PHP files larger than” default value is 100k and now a days a php file more than 100k is very common and loco translate skip those files. Can you reset it to like 0k means default no restriction. then user can put as need. As default setting 100k sometimes create trouble for newbie and first time users.

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

    (@timwhitlock)

    Thanks for your comment,

    I will fix this so entering “0” means no restriction.

    However, I won’t be making this the default and I’m not inclined to raise the default value either. I added the 100k limit quite deliberately and with some thought.

    The issue is that a large PHP file takes MUCH more memory to parse than its actual size. Many hosting providers have modest memory limits for good reason. It is better to get a “skipped file” warning than a fatal error due to exhausted memory. This is especially important because users without correct server settings will receive a blank page instead of a useful error. This then comes to me as a mysterious “not working” bug report that I can’t solve.

    Beginners (as you say in your post title) are advised against extracting their own strings anyway. See Working with POT files. I strongly advise against doing this unless you are the bundle author. There are more reliable ways, see Adding a language without a template

    Plugin Author Tim W

    (@timwhitlock)

    Marking as resolved because this fix will be in the 2.4.4 version.

    Plugin Author Tim W

    (@timwhitlock)

    Just to let you know, this is now live in version 2.4.4.

    Setting “0” as the field option (or anything else that resolves to zero bytes) causes no file size checks to be performed when extracting strings.

    As per articles already linked above, be sure to exclude massive files from extractable sources because you can easily exhaust allocated memory.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Default ‘Skip PHP files larger than’ 100k create trouble for beginner’ is closed to new replies.