-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix L10n: messages-compiled.json are not compiled automatically by vite #114
base: master
Are you sure you want to change the base?
Conversation
import { messages as ru } from './locales/ru/messages-compiled.json'; | ||
import { messages as sv } from './locales/sv/messages-compiled.json'; | ||
import { messages as uk } from './locales/uk/messages-compiled.json'; | ||
import { messages as ar } from './locales/ar/messages.json?lingui'; |
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.
Is it possible to keep the 'messages.compiled.json' (preferably with .
instead of -
) instead of the ?lingui
query? I think that would be safer, avoiding confusion, and might also work better with the installed version of the app.
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.
It doesn't seem possible, in the source code it searches for .po
or ?lingui
. And there isn't a way to change that.
https://github.com/lingui/js-lingui/blob/0f6661799acfb62c4d169cacc8f6867278263f0e/packages/vite-plugin/src/index.ts#L11
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
messages-compiled.json
@lingui/vite-plugin
added?lingui
to message.json imports for compilation when running vite@lingui/vite-plugin
toe2/electron.vite.cofig.ts