Skip to content
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

L10n: messages-compiled.json are not compiled automatically by vite #112

Open
benbucksch opened this issue Jun 30, 2024 · 0 comments · May be fixed by #114
Open

L10n: messages-compiled.json are not compiled automatically by vite #112

benbucksch opened this issue Jun 30, 2024 · 0 comments · May be fixed by #114
Assignees

Comments

@benbucksch
Copy link
Collaborator

benbucksch commented Jun 30, 2024

Reproduction:

  • Check out source code. Source tree should be clean, without additional files.
  • cd app; yarn; yarn dev run
  • cd e2; yarn; yarn dev run

Actual result:

  • App fails to run
  • Error: File l10n/locales/en/messages-compiled.json (imported by app/l10n/l10n.ts) is missing.
  • Same for "de" etc. (not just "en")

Expected result:

  • The vite plugin lingui(), added in vite.config.js and configured by lingui.config.ts, automatically compiles the l10n/locales/*/messages.json files to l10n/locales/*/messages-compiled.json files.
  • The messages-compiled.json files are created in the temporary build directory, not in the source tree.

Implementation:

  • In git commit 9d9ad62 (on branch jeremy/ui-localize), we imported the .po files directly, and vite lingui plugin was automatically compiling them to the JSON files that the app UI uses.
  • Could we please do the same with the messages.json -> messages-compiled.json file compilation?

Impact:

Workaround (until fixed):

  • cd app; yarn run l10n:compile before yarn run dev - UPDATE: Workaround implemented in 256fd29. Please revert this commit, once this bug has been fixed properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants