Support » Plugin: Loco Translate » Cannot scan all files

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

    (@timwhitlock)

    Hi.
    You will have to configure Loco Translate to understand this plugin as it is not set up according to WordPress standards.

    Several things to note:

    Primarily: It uses a constant instead of a text domain literal. SD_TEXT_DOMAIN.
    Loco Translate has a workaround for this problem – you can enter * (asterisk) as the text domain. This will force ALL strings to be extracted.

    The main plugin file is large, so you’ll also have to increase this setting to at least 122K

    I also note that four strings in this plugin will never display due to mistakes in their code.

    I will post an example configuration in a moment.

    • This reply was modified 3 years, 3 months ago by Tim W. Reason: fixed link
    Plugin Author Tim W

    (@timwhitlock)

    The following config works for this plugin. I make it 175 strings.

    https://github.com/loco/wp-bundles/blob/master/data/wordpress/plugins/sell-downloads/loco.xml

    Install this config by pasting the XML. Go to “Setup” tab, and choose “Import config from XML”

    Note that it saves the POT outside of the plugin root. Ensure that this location is safe from your auto-updates. If in doubt, change that path to one you know is safe.

    I had a similar issue (trying to generate a pot file) with the plugin notice saying that 500 or so obsolete strings had been removed.

    Didn’t happen with the legacy version, so at first thought it was a bug. Took me a while to figure out it was related to filesize setting.

    Yes, people should read the manual and go through the settings etc. but it would have been much more user friendly if the plugin notice had included something along the lines of “1 file skipped”. Just my 2 cents.

    Plugin Author Tim W

    (@timwhitlock)

    The UI shows the number of skipped files when you create a POT, but not when you sync it subsequently.

    A take the point, but it’s not recommended to sync a POT that you didn’t create yourself. String extraction should only really be done by authors.

    In terms of the sync UI, it needs a complete overhaul and should probably not be done in-editor at all. A separate, more advanced “merge” UI is planned, which will show strings added/removed etc.. This will have more scope to add warnings about skipped files.

    Thanks for the feedback.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot scan all files’ is closed to new replies.