-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(developer): serialize KMXPlus (back) into XML 🗼 #12969
base: epic/ldml-editor
Are you sure you want to change the base?
feat(developer): serialize KMXPlus (back) into XML 🗼 #12969
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
- workaround transform issue by adding bypass (_) fields in the KMXPlus structs Fixes: #12784
@@ -409,6 +409,8 @@ export class TranTransform { | |||
to: StrsItem; | |||
mapFrom: StrsItem; // var name | |||
mapTo: StrsItem; // var name | |||
_from?: string; // for serialization | |||
_to?: string; // for serialization |
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.
Will these cause any maintenance confusion with from
and to
?
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.
I'm using the same pattern as in kmx-plus-builder where we have
id: BUILDER_STR_REF; // str with original key id
_id: string; // original key id, for sorting
I will add clearer documentation on the property.
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.
I think I'm clear on this file and everything after it... just not so clear on the changes before and what their role is - all the new underscore-prefixed entries.
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.
I will clarify.
// element string array | ||
items: ElementString; | ||
// like items, but with unprocessed marker strings | ||
rawItems: string[]; |
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.
I was going to add an underscore here ( as with _from
etc) but realized it was unused.
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 as a starting point
* and are populated by the tran compiler. | ||
* | ||
* - TODO-LDML-EDITOR: Comments, whitespace, etc. are not preserved by this | ||
* approach. Updates to the XML parsing will support this, see #10622. |
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.
#10622 (comment) I think the goals I outlined here cover what we need for ldml-editor?
This does mean that we need to be able to round-trip transforms with a 'release build'
Note: Does not yet handle transforms (which are excluded from the e2e test)._from
,_to
which override the calculated output value.Fixes: #12874
@keymanapp-test-bot skip