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
Run lingui extract for specified files #510
Comments
Have you considered |
@tricoder42 , I will try to explain the use case a bit better. Let's say my project have these files: After running What we want to do is to create a wrapper command that:
This would be helpful for incremental run or CI check run. I think this would also relate to the work that requires to implement From my understanding, |
Make sense, thank you for explaining!
The tricky part here will be checking if message is obsolete. Since we don't extract messages from all files, we need to check origin of messages: if there're any messages in previous catalog extracted from specified files, but now they're missing, then they're obsolete. It'll require some refactoring in extract script. I would wait until #326 is merged and then implement it on Are you insterested in working on PR? |
Hi @tricoder42, thank you for reopening the issue. |
No worries. I already merged #326, so you can start it from It's gonna take a while to figure out how it should work, especially with new catalogs API. With new catalogs, you might have messages split between several files:
It means, when you run When you run There's already
|
I have good news. I just talked to people at my company and there is interest to support this which means things might be able to move a bit faster. @tricoder42 , do you have an idea for v3 release timeline? If it is still a bit a way, we might also be interested in backporting this to v2 so we can start using it soon in our company |
@dephiros That would be great! I set the deadline for milestone to beginning of June. I believe the beta could be ready in 1-2 weeks and then I want to test it on several projects (CRA, Next, Gatsby) to find obvious bugs. Backporting is always an option, just keep in mind that catalogs are a bit different. In v2, you always have just one catalog, while in v3 you can have many. That might complicate things a bit. On the other hand, lot of things will be reused, like matching obsolete messages based on origin. |
@tricoder42 @dephiros Is this feature still being worked on? I'm running into the same issue as well on my site and this would really help out! |
Sorry I haven't been available to work on this
…On Wed, Feb 26, 2020, 14:10 Nat Alison ***@***.***> wrote:
@tricoder42 <https://github.com/tricoder42> @dephiros
<https://github.com/dephiros> Is this feature still being worked on? I'm
running into the same issue as well on my site and this would really help
out!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#510?email_source=notifications&email_token=AARPAWJF24UXMN6ZXEBRNRTRE3SGXA5CNFSM4HOXRXMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENCCZBQ#issuecomment-591670406>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARPAWKZI2ALAY5WRUAM7TTRE3SGXANCNFSM4HOXRXMA>
.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, @tricoder42. Is this available in latest version? |
@levinqdl It isn't, unfortunatelly. The issue was closed due to lack of activity. Feel free to send a PR if you want to bring it to live. There're few problems to solve which I've desribed in this comment #510 (comment) |
Hi! I was looking for this feature as well, we're experiencing higher extract times right now (more code, more messages)... FYI we use lingui CLI within our development workflow using |
I could work on it this week at night, lets go |
I think I fixed this issue with two lines of code .. I'll create a pull request once correctly tested Some performance testing: New version with files param:
Actual code branch without files filter:
|
Wow! You rock! 🤘 Thanks! Looking forward to update |
😱 Released 3.3.0 with this fix/feature introduced!
|
Is your feature request related to a problem? Please describe.
I am trying to run
lingui extract
in CI steps to warn developer if they forget to runlingui extract
. However runninglingui extract
over the entire project takes ~10minsDescribe the solution you'd like
lingui extract
should take an optional glob that narrow down the list of files the command run onDescribe alternatives you've considered
lingui v3 seems to include a watch option. Maybe this is related?
Additional context
The text was updated successfully, but these errors were encountered: