Repository navigation
Conversation
The command and its tools/grep.py helper are Organic-Maps-specific: they hardcode OM's localized-string accessors (GetLocalizedString, L(...), R.string), source layout and file types. That is knowledge about the consuming codebase, not the Twine file format, so usage detection has moved into the organicmaps repo (tools/python/validate_unused_strings.py), which reuses TwineFile only as a parser. See organicmaps/organicmaps#12497. validate-twine-file and the generate/consume commands are untouched. Signed-off-by: Alexander Borsuk <me@alex.bio>
Member
Author
|
@strump fix ruff lint action check failure? |
Signed-off-by: S. Kozyr <s.trump@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
validate-unused-strings(moved to the organicmaps repo)The
validate-unused-stringscommand and itstwine/tools/grep.pyhelper are Organic-Maps-specific: they hardcode OM's localized-string accessors (GetLocalizedString,L(...),R.string), source layout, and file types. That is knowledge about the consuming codebase, not about the Twine file format — so usage detection has moved into the organicmaps repo attools/python/validate_unused_strings.py, which reusesTwineFileonly as a parser.See organicmaps/organicmaps#12497.
The old implementation also had correctness bugs (only the first regex match per line was captured; Kotlin /
.storyboard/Info.plistwere not scanned), and a proper fix needs OM-side data (classificator, enums, Android lint) — i.e. it would have to reach from the submodule up into its superproject. The in-repo version fixes the bugs and avoids that inverted dependency.Removed
validate-unused-stringsCLI command (twine/cli.py)TwineFileRunner.validate_unused_strings+_grep_core/_grep_ios/_grep_androidhelpers and the OM-specific regexes (twine/runner.py)twine/tools/grep.pyUnaffected
validate-twine-fileand allgenerate-*/consume-*commands.Verified
validate-twine-filestill passes on OM'sdata/strings/strings.txt