-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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): ensure extracted messages are serialized in a consistent order #40192
fix(localize): ensure extracted messages are serialized in a consistent order #40192
Conversation
@AndrewKushnir / @clydin - this will change the ordering of extracted messages in serialized files. But I think that since the order was non-determinate via the CLI integration previously, then this is arguably not a breaking change. WDYT? |
20d4d19
to
d81d8e5
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.
Thanks for the fix @petebacondarwin 👍 Just left a few minor comments.
packages/localize/src/tools/src/extract/translation_files/utils.ts
Outdated
Show resolved
Hide resolved
packages/localize/src/tools/src/extract/translation_files/utils.ts
Outdated
Show resolved
Hide resolved
packages/localize/src/tools/src/extract/translation_files/xmb_translation_serializer.ts
Show resolved
Hide resolved
d81d8e5
to
84c6cc4
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.
Thanks for updates @petebacondarwin 👍
this will change the ordering of extracted messages in serialized files. But I think that since the order was non-determinate via the CLI integration previously, then this is arguably not a breaking change. WDYT?
Given that the order was not consistent before, I think this should not be a breaking change. One potentially breaking aspect is that we now use first duplicate message in JSON translation file (vs the last one), but since Ivy i18n extraction pipeline is not the default one and JSON format was not documented yet, I'd not consider this change as breaking.
…nt order The CLI integration can provide code files in a non-deterministic order, which led to the extracted translation files having messages in a non-consistent order between extractions. This commit fixes this by ensuring that serialized messages are ordered by their location. Fixes angular#39262
fec8674
to
8ee81c3
Compare
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. |
The CLI integration can provide code files in a non-deterministic
order, which led to the extracted translation files having
messages in a non-consistent order between extractions.
This commit fixes this by ensuring that serialized messages
are ordered by their location.
Fixes #39262