News & Info

Daily Updates and Tech Chatter

Translating Plugins and Excess SLP Files

wpCSL Code Messages

I am working on an issue that is causing JavaScript to stop displaying subpanels when a language translation does not load properly.   While working on that problem I noticed this construct in a few of the .po language files:

#: WPCSL-generic/build/zipfiles/store-locator-le/include/storelocatorplus-actions_class.php:331
#: WPCSL-generic/build/zipfiles/svnrepo/tags/3.11.10/include/storelocatorplus-actions_class.php:331
#: WPCSL-generic/build/zipfiles/svnrepo/tags/3.11.11/include/storelocatorplus-actions_class.php:331

All of the entries with WPCSL-generic/build/ are not part of the final product distribution, or they SHOULDN’T BE as of a bug fix made around April of 2013.   I have not yet found where these entries are being generated.  I’m guessing from the Codestyling Localization plugin that is scanning all of the files in the plugin directory.

If you are going to start a translation and notice that your server has a ./WPCSL-generic/build directory you can, and should, safely delete the entire WPCSL-generic directory from under the store-locator-le directory.   In fact this is true of ANY site that has SLP installed.  Not only does it save disk space, but removing any WPCSL-generic/build files will reduce the code living on the server which means less vectors of attack for hackers.

Leave the WPCSL-generic/classes directory.  That is the correct production build of the wpCSL framework.

 

 

Tags: , , , ,

1 Awesome Comments So Far

Don't be a stranger, join the discussion by leaving your own comment
  1. Lance Cleveland
    September 26, 2013 at 4:24 PM #

    I’ve created a modified version of CodeStyling Localization and submitted the one-line patch to the developer, along with a donation, hoping he will add this to the next release. In the meantime if you are using the raw code, for example from a git repository, instead of doing translations from a production release .zip file and are using CodeStyling Localization you may want to add this patch. It cuts down the file scans and amount of loaded textdomains from 2547 entries to 33. It is WAAAAYYYY faster for anyone working on a development branch of the code repository and doing translations.

    In the CL file codestyling-localization.php on line 1305 change this:
    $excludes = array();

    to this:
    $excludes = apply_filters(‘codestyling_localization_excludedirs’,array());

    If is in the csp_po_ajax_handle_dlg_rescan() function of the CL plugin in the last else clause in that section of code.

    Store Locator Plus uses that filter to add some intelligent “skip this directory” entries to the CL plugin and avoid unnecessary overhead.