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
fix(localize): enable whitespace preservation marker in XLIFF files #38737
fix(localize): enable whitespace preservation marker in XLIFF files #38737
Conversation
f0cd233
to
583537d
Compare
583537d
to
efa9690
Compare
efa9690
to
bed91d1
Compare
bed91d1
to
dbd95b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @petebacondarwin 👍
(just left a couple minor comments)
packages/localize/src/tools/src/extract/translation_files/format_options.ts
Outdated
Show resolved
Hide resolved
packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts
Outdated
Show resolved
Hide resolved
packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts
Outdated
Show resolved
Hide resolved
packages/localize/src/tools/src/extract/translation_files/xliff2_translation_serializer.ts
Outdated
Show resolved
Hide resolved
335cd7d
to
5bb1617
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Failure is due to size change on master. |
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
5bb1617
to
219dc80
Compare
…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. |
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 willby added to the
<file>
element in the serialized translation file duringextraction.
Fixes #38679