Open BernhardBehrendt opened 2 years ago
hey @BernhardBehrendt, do you know anyworkaround that we could use while we wait for the PR to be merged?
also: thanks for your work! i was happy to see that you have already created an issue and a PR for this :D
I use now the following workaround: Created a new folder parallel to my project and run:
npm install @angular/core@12
npm install @ngx-i18nsupport/ngx-i18nsupport
In the file you have to fix a bug: node_modules/@ngx-i18nsupport/ngx-i18nsupport/src/xliffmerge/xliff-merge.js:35
Replace i = 1
with i = 2
.
Then switch back to your actual Angular project.
There I created a xliffmerge.json
as written there https://github.com/martinroob/ngx-i18nsupport/tree/master/projects/xliffmerge
But I also merged the options from my angular.json into it.
Then I can run this to merge:
node ../other-installation/node_modules/@ngx-i18nsupport/ngx-i18nsupport/src/xliffmerge/main.js --profile xliffmerge.json
I hope this helps. Maybe someone has an easier fix.
I also got hit by this after upgrading to Angular 13.
@dhcode Thanks for the workaround, works for me, as well!
Does anyone know if there is an actively maintained fork of this or maybe some alternative tool? I was thinking that there must be something out there because the problem xliffmerge solves does not seem like a very exotic problem to have…
I have teh exatc same problema fter updating angular 12 -> 13, but didn't found any other plugins to do that feature of merging xlf files.
I have tried out angular-t9n for some time now, and it does support merging of xlf files! It is unfortunately not up-to-date, but does work well with Angular 13. Maybe this can be an alternative for you.
I have tried out angular-t9n for some time now, and it does support merging of xlf files! It is unfortunately not up-to-date, but does work well with Angular 13. Maybe this can be an alternative for you.
@fknet Thanks for the tip, I will give it a try (-:
I have tried out angular-t9n for some time now, and it does support merging of xlf files! It is unfortunately not up-to-date, but does work well with Angular 13. Maybe this can be an alternative for you.
For me it looks like a very different tool. I just want to have the simple merging of xliff, not a lot of stuff more. I already have tools for translations. It's really sad that this library isn't maintained anymore.
Hey we've ported back to Angular 12 and postponed the upgrade. Actually we could also imagine to extend this lib by our own as it's really a very good way to keep translations in sync within the angular-cli flow. As it's a paid project I've to wait, until my client raises up this translation issue in priority.
@martinroob Do you have any plans for this project in the future?
Same here
According to Martin's contributions, we have no update from him since November 2019 so I'm afraid that we have to move on up with a fork or a new tool
Hi guys, i got the same problem as you. I have try to update the lib but i'm stuck with this problem on the command line : SyntaxError: Cannot use import statement outside a module
I started with this PR but fixed 2-3 more problems because I was not able to compile the code on my machine (node 14.18.2
). I am able to compile ngx-i18nsupport
and ngx-i18nsupport-lib
. I did not attempt to compile tooling because I am not using it for my project.
To do this first change the version of the packages by the relative path because there is a dependency between the libs. Then I run yarn run buildall
(it didn't work with npm). The command crashes at the toolings level and to finish the build I do cd projects / xliffmerge && yarn run build
. The lib compiles successfully but I cannot run the xliffmerge
command from my terminal ... I'm getting stuck here
I think we will have to fork, the author seems to have disappeared and don't want to give any sign of life.
My code : https://github.com/filol/ngx-i18nsupport
@BernhardBehrendt @martinroob
Salut @filol thats great that you've started working on it and bringing things forward. Have you been lucky so far or can we support you maybe in the process? I've given up as it wasn't that easy afaik to integrate without npm environment and we had several other issues after upgrading to 13.x (mostly rxjs stuff).
Let me know if we can support you and I'll try to convince our client to focus on this topic asap.
+1 for a maintained fork or a native solution, merging xliff's is essential!
For anyone using XLIFF 2.0: I created some lighweight tooling to merge translations - see https://dev.to/danielsc/angular-i18n-update-workflow-25p6
(probably this could be I extended this for XLIFF 1.2 as well!)
I created a xliff merge tool that nicely integrates with Angular CLI and (probably) caters most needs of former users of this tooling: https://github.com/daniel-sc/ng-extract-i18n-merge Feedback welcome! :)
I can highly Daniel's project above. I replaced xliff merge with it in our rather complicated i18n workflow and it's working great. He made a few bug fixes and enhancements for me extremely quickly, too.
I created a xliff merge tool that nicely integrates with Angular CLI and (probably) caters most needs of former users of this tooling: https://github.com/daniel-sc/ng-extract-i18n-merge Feedback welcome! :)
Thank you Daniel! Successfully replaced 🎉😊
I created a xliff merge tool that nicely integrates with Angular CLI and (probably) caters most needs of former users of this tooling: https://github.com/daniel-sc/ng-extract-i18n-merge Feedback welcome! :)
Thank you @daniel-sc. This is exactly what I am looking for for the past 2 years or so. With angular 10, I was taking the work-around by using localize-extract multiple times (Once for libraries, then for 3rd parties), then xlf-merge to merge the messages, and then use @ngx-i18nsupport/tooling to merge into language files. All this is now just simplified with one command after upgrading to Angular 14.
I've actually tried to solve in Pull Request #196 which break actually on jasmine test part