Conversation
|
Thank you for this PR! I like the idea of allowing users to extract using regex for cases not covered by proper parsers & extractors. I'm not quite sure whether it makes sense to merge this PR though, because I'm currently working on a large rewrite for the next major release. The new version is a lot more modular and will have support for more languages and frameworks. In any case, I will make sure that this feature is included as well - and I can certainly use your code as a starting point. Out of curiosity, what extractors would you need to match your project? |
|
Hi, thanks for appreciating this pull request. I don't know how much progress you've already made with the large rewrite. But I think if you still need some time to complete this rewrite and you'll add this regex extractor in the new upgrade, there is a benefit of merging this pull request. It gives people the possibility to already get started with this project and create a regex for their project. When the upgrade is ready they can upgrade easily because their regex already exists.
We're using Handlebars for templating and have create our own helper for the to be translated strings. So we could have create a Handlebars extractor. But this was a more generic approach and I thought was going to add more value to this project since everyone could fallback to regex if their extractor was missing. Maybe this extractor will be obsolete if the new version will be more modular so it will be easier to add custom extractors. |
Since the current existing extractors didn't match our project, I've created an extractor to be used with regular expressions.
I think this can be a good additional extractor for this project since you can basically extract everything you want, even if your project isn't using HTML of JavaScript. You just have to create a good regex to extract strings from your files.
I hope you'll think this is a nice addition to your project.