-
Notifications
You must be signed in to change notification settings - Fork 9.6k
report(flow): i18n formatter #13190
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
report(flow): i18n formatter #13190
Conversation
|
We need rollup brfs to inline the fs stuff (existing brfs plugin doesnt work for esm). You could do what build-viewer does to work around this for now. |
We already include the localized strings in the flow report. If we inline the file we'll just be adding the again. |
|
Oh, I meant just inlining the list of "CANONICAL_LOCALES", which flow report doesn't necessarily need anyhow, so you could also just not (there is an explicit check at runtime for whether If you shim cc @brendankenny on whether or not splitting up |
brendankenny
left a comment
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! Exciting to get message formatting in a report.
Bundled output look ok?
Ya locales are included, but only once. |
Imports
_formatMessageinto the flow report.format.jsdoesn't work in ESM because of shit like__dirnameandfs. Luckily, the functions we need don't use any of that, so splitting them out into a separate file (message.js) works just fine. I'm not married to that name though. Other option would be to cut__dirnameandfsout using rollup.If these changes seem sane to everyone, I'll go ahead an finish translating the rest of the strings + test cases.