Test from Command-Line
Tool scans into package files, such as .zip, .gz, .gzip, .bzip2, .tar, .rar, .7z, .dll. Test scan can be used to test the extent of the file scanner. It doesn't affect the localization output. The feature is just for testing purposes.
The -t:<glob pattern> searches for files using glob pattern.
Lexical.Localization.Tool -le -t:**.dll/**.resources
Produces list of files.
Log started: 12.2.2019 23.12.14
C:/Tmp/Microsoft.Extensions.Configuration.Binder.dll/Microsoft.Extensions.Configuration.Binder.Resources.resources
C:/Tmp/Microsoft.Extensions.Configuration.dll/Microsoft.Extensions.Configuration.Resources.resources
C:/Tmp/Microsoft.Extensions.Configuration.FileExtensions..dll/Microsoft.Extensions.Configuration.FileExtensions.Resources.resources
C:/Tmp/Microsoft.Extensions.Configuration.Ini.dll/Microsoft.Extensions.Configuration.Ini.Resources.resources
The -T:<glob pattern> adds an exclude pattern, files not to scan. For instance, to exclude contents of a zip, add -T:.zip/.
Lexical.Localization.Tool -le -t:**.dll/**.resources -T:**.zip/**
Test Scan Configuration
Test scanning can be added with configuration file as well.
Lexical.Localization.Tool -le testscan.json
"TestJobs" is an array of sections that define test scan job.
"TestJobs": [
{
"PackageExtensions": "dll exe zip bzip2 z tar 7z gzip gz rar",
"GlobPattern": "**/[culture/][Assembly].dll/**.resources",
"GlobPatterns": [],
"WildcardPattern": "*/[culture/][Assembly].dll/*.resources",
"WildcardPatterns": [],
"Filename": "mydata.zip/en/Lexical.Localization.Tool.dll",
"Filenames": [],
"Exclude": "",
"Excludes": []
}
One pattern, FileName, WildcardPattern, GlobPattern needs to be added.
TestJob Parameters:
Parameter | Description | Example Value |
---|---|---|
PackageExtensions | Extensions to open | dll exe zip bzip2 z tar 7z gzip gz rar |
FileName | Single file to scan | filename.ext |
FileNames | List of files to scan | filename1.ext, filename2.ext |
WildcardPattern | Pattern of files to scan | *.dll |
WildcardPatterns | Multiple patterns of files to scan | *.dll, *.exe |
GlobPattern | Glob pattern of files to scan | **.dll/**.resources |
GlobPatterns | Multiple glob patterns to scan | |
Exclude | One glob pattern of files to exclude | **.zip/** |
Excludes | Multiple glob patterns of files to exclude |