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

ng extract-i18n fails if the source file does not exist #34

Closed
strout opened this issue Jun 15, 2022 · 1 comment · Fixed by #35
Closed

ng extract-i18n fails if the source file does not exist #34

strout opened this issue Jun 15, 2022 · 1 comment · Fixed by #35
Assignees
Labels
bug Something isn't working

Comments

@strout
Copy link
Contributor

strout commented Jun 15, 2022

Hi,

I have a project where the source file, messages.xlf, isn't checked into my repository. After switching to ng-extract-i18n-merge v2 and building in a fresh checkout, I get:

$ ng extract-i18n
Running ng-extract-i18n-merge for project client-app
running "extract-i18n" ...
An unhandled exception occurred: ENOENT: no such file or directory, open 'src/locale/messages.xlf'

This worked when I tried it with an earlier version, maybe v1.3. It looks like it broke with #27 -- it looks like it needs to catch the missing file exception and fall back to the extract-i18n-generated file as the "original" source.

As a workaround I've had to change the builder back to @angular-devkit/build-angular:extract-i18n, generate the source xlf file, check it in, then switch back.

@daniel-sc
Copy link
Owner

@strout Thanks for reporting this and doing the analysis!

I'll probably fix this next week - but you'd be very welcome to provide a PR to speed things up ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants