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
Space preservation attribute not added to XLF file #38679
Comments
I guess this would be a sensible attribute to include... let me just check it won't cause any problems. |
Whitespace can be relevant in extracted XLIFF translation files and some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if the is no indication to tell it not to. This commit adds the `xml:space="preserve"` attribute to the rendered `<source>` element to indicate that the whitespace in the source messages should be kept. Fixes angular#38679
Whitespace can be relevant in extracted XLIFF translation files and some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if the is no indication to tell it not to. This commit adds the `xml:space="preserve"` attribute to the rendered `<source>` element to indicate that the whitespace in the source messages should be kept. Fixes angular#38679
@ArtemAvramenko - did you consider trying to set the configuration of OmegaT? I see that there is a whitespace handling configuration in the "7.6 File Filters" section - https://omegat.sourceforge.io/manual-standard/en/windows.and.dialogs.html#dialogs.preferences. |
For now I run powershell script after resource extracting:
|
Adding |
Yeah, I think it might need to be behind a flag, since I am concerned that many XLIFF readers might not handle the xml namespaced attribute. It looks like XLIFF is trying to agree a specification for this but it has not made it standard yet. |
Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes angular#38679
Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes angular#38679
Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes angular#38679
Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes angular#38679
Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes angular#38679
…38737) Whitespace can be relevant in extracted XLIFF translation files. Some i18n tools - e.g. CAT tool (OmegaT) - will reformat the file to collapse whitespace if there is no indication to tell it not to. This commit adds the ability to specify "format options" that are passed to the translation file serializer. The XLIFF 1.2 and 2.0 seralizers have been updated to accept `{"xml:space":"preserve"}` format option which will by added to the `<file>` element in the serialized translation file during extraction. Fixes #38679 PR Close #38737
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
Affected Package
The issue is caused by package @angular/localize^10.1.0-rc.0Description
In ts code I use i18n:
Then I call
localize-extract
and get xlf file withoutxml:space="preserve"
attribute:When I add translation in CAT tool (OmegaT), line break is gone.
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: