-
Notifications
You must be signed in to change notification settings - Fork 91
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
create mock asts for message bundle component | Message Component #2793
create mock asts for message bundle component | Message Component #2793
Conversation
felixhaeberle
commented
May 15, 2024
- fix INLMC-88
|
@jldec It would be nice if you could have a look at the mock message format to verify if we are going in the right direction here and add a additional mock message Or better yet, do we have a real project (multiple messages in |
Thanks @felixhaeberle - src/stories/inlang-message-bundle.ts is showing typescript errors during build. I just added you to also review #2795 which should help create simple mocks more easily. I'm looking for suggestions for how to easliy mock messages with selectors and variants using a createMessage() function. Using v2 MessageBundlers with a test project is on the roadmap (MESDK-104), but we first have to be able to persist using the new v2 structure. |
@felixhaeberle |
@felixhaeberle - I merged a slightly simplified and corrected plural example message bundle ast with #2795 |
…create-mock-asts-for-message-bundle-component
@jldec you can start making the review. |
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.
changes needed for function annotations and clarification needed for "formal".
type: "expression", | ||
arg: { | ||
type: "variable", | ||
name: "formal: bool", |
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.
bool should be an annotation (function) as well right?
Do you know how this function would be defined ?
I could not find it in https://github.com/unicode-org/message-format-wg/blob/main/spec/registry.md
cc: @martin-lysk @LorisSigrist for clarification of how the "formal" selector is expected to work.
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.
This might also affect how the formal selectors are expressed in other parts of the AST.
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 did it like the plural. Can we make a separate discussion about it, so we can merge this PR.
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 @NilsJacobsen