Skip to content

Error when parsing xlf2 file for translation #7278

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

Closed
alkuma opened this issue Aug 4, 2017 · 5 comments
Closed

Error when parsing xlf2 file for translation #7278

alkuma opened this issue Aug 4, 2017 · 5 comments
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken

Comments

@alkuma
Copy link

alkuma commented Aug 4, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

angular-cli: 1.0.0-beta.28.3
node: 6.9.1
os: linux x64

Repro steps.

Created the xlf2 file for the project using the command
ng-xi18n --i18nFormat=xlf2 --outFile=app/locale/messages.xliff2.xlf
Next, performed the translation to create app/locale/messages.ts-TH.xliff2.xlf to create translation
created i18n-providers.ts (attached)
i18n-providers.ts.txt

modified main.ts (attached) to get translation providers before bootstrap.
Upon running the application (via chrome) application fails to boot with the following error in console log
main.ts.txt

The log given by the failure.

console.log.txt

Desired functionality.

There seems to be some issue with how the xlf2 file is being parsed. This is a bug that needs to be fixed. If any workaround is possible, please suggest.

Mention any other details that might be useful.

Instructions followed were from:
https://angular.io/guide/i18n
https://stackoverflow.com/a/43369141/41284 - used rxjs instead of systemjs
locale value is hardcoded to ts-TH in the index.html to simulate this issue
also noticed a similar issue #6418 but raising this since the way we simulated the issue was slightly different so it could be a different root cause

@alkuma
Copy link
Author

alkuma commented Aug 4, 2017

If anyone could point to the code that parses the xlf2 file I could attempt to submit a patch myself

@Brocco Brocco added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken labels Aug 18, 2017
@Brocco
Copy link
Contributor

Brocco commented Aug 18, 2017

The first thing I would suggest is to update your version of the CLI. The latest version as of today is 1.3.1 which is much more up to date than the beta you are currently using. Please report back after updating.

@ocombe
Copy link
Contributor

ocombe commented Aug 18, 2017

can you give us the content of the file "messages.xliff2.xlf" ? I suspect that there is a missing closing tag or quote in your translations

@hansl hansl unassigned ocombe Feb 6, 2018
@alan-agius4
Copy link
Collaborator

Closing as no further feedback was provided.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken
Projects
None yet
Development

No branches or pull requests

4 participants