Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ilib-loctool-regex: Add new regex-based plugin #50

Merged
merged 21 commits into from
Jan 29, 2025
Merged

Conversation

ehoogerbeets
Copy link
Contributor

  • intended for file formats that are simple enough that they can be parsed with regular expressions
  • settings in the project config file allow you to specify the regular expressions and how to handle the parts that they match
  • outputs regular Resource instances
  • cannot write any file format, so must be used with a resource file type

@ehoogerbeets ehoogerbeets self-assigned this Jan 6, 2025
Copy link

changeset-bot bot commented Jan 6, 2025

🦋 Changeset detected

Latest commit: 1c71485

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ilib-loctool-regex Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

- all unit tests for the file type class pass. The file class needs
  a lot more work
- unit tests have been updated to test the right things but do not pass yet
- added testregex test utility to help in testing your regular
  expressions
- more unit tests are passing, but not all of them yet
- also, make sure we can recover from a match that contains no
  source string
- now we keep track of the parts of the file that haven't been
  matched yet by previous regular expressions, and the subsequent
  regular expressions only match in those parts. In this way, there
  is a natural hierarchy to the expressions where the order of the
  expressions in the config file determines their priority.
- added tips to the README to help people build their regular
  expressions
- fixed a bug where Unicode escape sequences were not unescaped
  properly
- also convert dependencies for ilib-locale and ilib-istring
  to intra-workspace dependencies
- switched to use the more standard `resourceFileTypes` setting that
already exists in the loctool. This allows the loctool to manage
the file types and cause them to write out their contents at the
end of the loctool run.
- previous method did not work. Loctool did not tell each resource
file type to write itself out because it didn't know about the
existence of the resource file types!
@wadimw wadimw self-requested a review January 28, 2025 14:50
@nmkedziora nmkedziora merged commit afc142c into main Jan 29, 2025
1 check passed
@ehoogerbeets ehoogerbeets deleted the addRegexPlugin branch January 29, 2025 16:05
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.

4 participants