feat(apollo-react): add i18n support for canvas components [MST-8210]#436
Draft
david-rios-uipath wants to merge 2 commits intomainfrom
Draft
feat(apollo-react): add i18n support for canvas components [MST-8210]#436david-rios-uipath wants to merge 2 commits intomainfrom
david-rios-uipath wants to merge 2 commits intomainfrom
Conversation
Dependency License Review
License distribution
Excluded packages
|
73c084e to
b6f1b06
Compare
5 tasks
cc16cbf to
8ad5e85
Compare
Collaborator
CalinaCristian
left a comment
There was a problem hiding this comment.
Can you validate ap-chat (in web packages) still works properly? I think I chose cjs vs esm for some issues that were caused there.. if you run dev mode and switch language, does it actually switch?
720c6ba to
abdda60
Compare
fe4c2c3 to
b6e0981
Compare
Contributor
Author
|
It seems to be working as expected when run from web-packages after some changes to the locale copy script: Screen.Recording.2026-04-01.at.10.45.52.PM.mov |
4e1b22b to
6ddd8ee
Compare
43462ed to
2ff16b3
Compare
6ddd8ee to
3572178
Compare
2ff16b3 to
9871736
Compare
3572178 to
fcfccbe
Compare
fcfccbe to
8a517e5
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
module.exports) to ESM (export const messages) for better compatibility w/ StorybookCJS → ESM locale migration
Lingui's default
compileNamespaceiscjs, which outputsmodule.exports = {...}. This caused two problems:.jsfiles as ESM, so CJS locale files failed withdoes not provide an export named 'default'locale-registry.tsused ESMimportsyntax with@ts-expect-errorsuppressions to work around the CJS/ESM mismatchSetting
compileNamespace: 'es'inlingui.config.tsfixes both issues:.mjswith properexport const messages = ...locale-registry.tsuses clean typed named imports — no@ts-expect-errorneededlingui-locale.d.tstype declaration for.mjsimportslingui-cjs-to-esmVite workaround plugin from Storybook**/locales/*.mjsto.gitignore(compiled output, same as the old.jsfiles)Storybook Lingui support
@vitejs/plugin-reactwith@lingui/babel-plugin-lingui-macroto Storybook's Vite config (scoped toapollo-react/src/only)lingui.config.tsre-export so the Babel plugin can find the config from any workspace cwdTest plan
pnpm i18n:compile && pnpm testinpackages/apollo-react— verify locale compilation and tests passpnpm storybook) — verify sticky note stories render without locale errors🤖 Generated with Claude Code