lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 89 forks source link

Scan always returns strings from category type 'javascript' and 'language' #131

Open westo27 opened 4 years ago

westo27 commented 4 years ago

Hey, whenever I do a scan it always seems to return strings from these two categories. I've tried excluding it from the scan by adding 'ignoredCategories' => ['javascript'], to the config file but it doesn't seem to do anything. If I try to exclude a different category in this way it works fine.

The strings seem to be stored in the backend of the extension, so it's odd that it grabs them when I've set the root to the front end and set scanning the root parent directory to false.

But regardless, even if it's scanning these strings it shouldn't return them if I've configured it to ignore this category.

Capture

PavelFil commented 3 years ago

As a temporary solution you can remove the JavaScript Scanner from the scanners list.

'modules' =>   [
    'translatemanager' => [
        ...
        'scanners' => [
            '\lajax\translatemanager\services\scanners\ScannerPhpFunction',
            '\lajax\translatemanager\services\scanners\ScannerPhpArray',
            '\lajax\translatemanager\services\scanners\ScannerDatabase',
        ],
    ],
]