vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
864 stars 58 forks source link

Translations are not refreshed without full server restart #2554

Open Legioth opened 2 weeks ago

Legioth commented 2 weeks ago

Describe the bug

Changes to translation files are not picked up by a regular redeploy but only after the server is restarted.

Expected-behavior

Expected that I can update translations while developing without having to constantly restart the server.

Reproduction

  1. Download a "Hello World Project" with Hilla / React from start.vaadin.com
  2. Import into an IDE (I used VS Code) an launch Application.java
  3. Enable the Hilla I18n feature flag (I did it through Copilot) and restart the server
  4. Add vaadin-i18n/translations_en.properties containing a single line: greeting = Hello in English.
  5. Add await i18n.configure({language: "en"}); to @layout.tsx
  6. Change the button label in @index.tsx to {translate("greeting")}
  7. Observe that the translation is used
  8. Change the translation file to greeting = Hello in English2
  9. Observe that the server redeployed and that the page is reloaded in the browser, but the button text keeps using the old translation.
  10. Restart the server. Observe that the new translation is now used.

System Info

Vaadin 24.4.3