-
Notifications
You must be signed in to change notification settings - Fork 12k
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-xi18n: Merge/Update Existing Translations File (XLIFF) #6552
Comments
Same question here) |
@napalm684 check this thread: |
@glebmachine Yep this is the exact item I found which don't get me wrong is an option but I kind of feel like this should be built into the Angular i18n tooling. I feel it doesn't make a ton of sense to offer tools to generate translation files under the guise they will never need maintained. Sure manual merging will work but I think we can do better overall. A plugin is certainly an option but shouldn't be necessary for such a basic requirement. Just my two cents. |
Agree)
|
We only generate the source file, not the translations. You should not have translations in your source file, you should load it into your translation editor and it will merge the existing translations using the ids. |
@ocombe What tool is it you speak of that merges an essentially empty xlf file into a "translated" xlf file you are maintaining for the build/bundling process. We had to use the xliff merge npm package to do this which seems very cumbersome at best. If there is a dedicated editor to look at that certainly could be an option although I will be honest I would much rather see the cli provide facilities to do this merge to the "translated" xlf file. In it's current state without the xliff merge tool it requires some less than friendly merge activities. |
I believe that editors such as OneSky and Crowdin have those kind of features. |
Vscode lol |
I found one attempt at automating updates to extracted i18n xlfs using gulp/cheerio: |
xliffmerge was originally inspired by a set of cheerio and grunt tooling. But I do not think it is a good idea to integrate tooling like gulp or grunt in a modern cli based angular project. |
I made my own tool especially because of this missing feature: |
@Brocco, do you have plan to work on merging issue? |
While I love @martinroob 's solution. I agree that this should be native. Once I have translated an xls into, let's say Greek, by next week (as we continuously work on our product), the english xfl will have new words. It would be nice to have those new untransalted words into the Greek xfl file. Regarding your comment here #6552 (comment) @ocombe, I would like to create an issue, you mention to create a feature request on the angular/angular repository, not angular-cli. Just curious of why if |
poedit does support .xliff files for translation. It also offers to update an existing translation from a new source, but only for .po format though. It would suit the need perfectly if only |
After trying @DavidOndrus tool, I ended using https://github.com/martinroob/ngx-i18nsupport to extract/update xliff files. It doesn't mess with |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.0.3
node: 7.7.3
os: win32 x64
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/platform-server: 4.1.3
@angular/router: 4.1.3
@angular/compiler-cli: 4.1.3
@ngtools/webpack: 1.3.3
Repro steps.
Update an html view with a new translate-able field and re-generate xlf file. None of
the translations are included if they were already done and marked target state as "translated".
No way to merge with an existing locale file either.
The log given by the failure.
No Failure
Desired functionality.
The ability to re-generate a translation file by adding the new items and preserving the items that are already translated.
Mention any other details that might be useful.
N/A
The text was updated successfully, but these errors were encountered: