Skip to content

feat: extract strings across a folder or the whole workspace - #47

Merged
nolindnaidoo merged 2 commits into
mainfrom
feat/folder-scan
Oct 6, 2026
Merged

nolindnaidoo merged 2 commits into
mainfrom
feat/folder-scan

Conversation

@nolindnaidoo

Copy link
Copy Markdown
Owner

The folder scan for String-LE. See FOLDER-SCAN.md in letools-site.

Command Does
String-LE: Extract Strings from Workspace The distinct strings in every file in the workspace
String-LE: Extract Strings from Folder The same for one folder. Also on a folder in the Explorer. From the palette it asks for one

The report, the eight scan settings and the positions behaviour are as in urls-le.

What differs

  • A file its format reader could not parse is listed under "Could not be read" with the reason.
  • A string longer than 120 characters, or one with a line break, is shown as one cut line. Strings are still compared whole.

src/workspace is byte-identical to ids-le's. A test holds the README's sample to what a scan really prints. Everything is translated into all twelve languages. Changelog entries are in the 2.5.0 section. No version bump.

Extract read the one open document. Extract Strings from Workspace and
Extract Strings from Folder read many files from disk. The folder
command is also on a folder in the Explorer, and asks for one when run
from the palette.

The report is the distinct strings, the most widely used first, with
how often each is written, in how many files, and where. Positions
follow showPositions as they do for Extract.

A file its format reader could not parse is listed with the reason. A
string longer than 120 characters, or one with a line break, is shown
as one cut line, and two strings are still compared whole.

src/workspace is the same three files as in ids-le, byte for byte, and
the scan settings are the eight urls-le has. Commands, settings and
messages are translated into the twelve languages the extension ships.
Comment thread src/commands/extractWorkspace.ts Fixed
Most strings in a project are written once, and each got a heading and
a file list of its own. On a real project of 2,651 distinct strings the
report ran to 14,112 lines.

A string written once is now placed in a Where column of its row. Only a
repeated string gets a section listing each place. Every string is
still in the table, and the same project reports in 5,532 lines.
// Most strings in a project are written once. Such a one is placed in
// its row, so the sections below are only the repeated ones.
for (const entry of strings) {
const row = `| ${shown(entry.value).replace(/\|/g, '\\|')} | ${entry.occurrences.length} | ${filesOf(entry.occurrences).length} |`;
@nolindnaidoo
nolindnaidoo merged commit b1cf1eb into main Oct 6, 2026
31 of 32 checks passed
@nolindnaidoo
nolindnaidoo deleted the feat/folder-scan branch October 6, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants