Skip to content
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

18-transform-to-and-from-angularlocalize #31

Merged
merged 18 commits into from
Mar 9, 2023

Conversation

VladislavsPerkanuks
Copy link
Contributor

No description provided.

Comment on lines +97 to +98
assert.Equal(t, tt.expected.Language, result.Language)
assert.ElementsMatch(t, tt.expected.Messages, result.Messages)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed random test failing, due to result.Messages order could be different than in tt.expected.Messages, which cause assert.Equal() to fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In golang, the key order in the map is indeterministic.

Copy link
Contributor Author

@VladislavsPerkanuks VladislavsPerkanuks Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not a map, it is []model.Message.

assert.Equal({msg1, msg2}, {msg2, msg1}) // = false

assert.ElementsMatch({msg1, msg2}, {msg2, msg1}) // = true

Copy link
Contributor

@janishorsts janishorsts Mar 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but under the hood, it uses maps in the flow, doesn't it? In your implementation you are testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not catch that

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
Copy link
Contributor Author

@VladislavsPerkanuks VladislavsPerkanuks Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated file changed as a side effect of upgrading bufbuild
Integration tests passing

return nil, fmt.Errorf("marshal xliff12 struct to XLIFF 1.2 formatted XML: %w", err)
}

dataWithHeader := append([]byte(xml.Header), data...) // prepend generic XML header
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladislavsPerkanuks VladislavsPerkanuks merged commit 6fc6c72 into main Mar 9, 2023
@VladislavsPerkanuks VladislavsPerkanuks deleted the 18-transform-to-and-from-angularlocalize branch March 9, 2023 09:57
DarjaLeonova added a commit that referenced this pull request Mar 13, 2023
* #19 Transform-to-and-from-POT

* #19 Transform-to-and-from-POT

* #19 Tidy

* #19 minor fixes

* #19 minor fixes

* #19 minor fixes

* #19 fixes

* #19 changed multiline msgdid and msgstr

* #19 modified ToPot function

* #19 fixes

* #19 modified multiline functionality

* #19 added error to lexer function

* #19 added quoted string support in lex function and made fixes

* #19 changed fully Lex function because of gocognit

* #19 changed PoTag -> poTag

* #19 changed identifiers to private

* #19 added comment multiline support

* #19 fixes

* #34 transform to and from XMB

* 17-transform-to-and-from-arb (#20)

* File-upload2 (#13)

* 21-download-file (#22)

* Instrument traces (OpenTelemetry) (#24)

* #27 Upgraded earthly to 0.7 (#28)

* #25 Added configuration from various sources (#29)

* 32-transform-to-and-from-xliff-2 (#33)

* 18-transform-to-and-from-angularlocalize (#31)

* Renamed table test fields for consistency (#38)

---------

Co-authored-by: Vladislavs Perkaņuks <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transform to and from @angular/localize
2 participants