-
Notifications
You must be signed in to change notification settings - Fork 168
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
Hotswap of translations does not work using Hotswap Agent plugin #20118
Comments
|
Allows translations to be reloaded in development mode For #20118
* Clears resource bundle cache on translation resource redeployment * Fires a HMR event to the browser when translations are reloaded Limitation: Only supports DefaultI18NHandler where the paths are known. If you have a custom I18N handler, you might need a custom HMR supporting HotswapListener. For #20118 Requires vaadin/hilla#2795 to fully fix the issue
FYI: Tried to patch 24.5.0.beta5 with TranslationFileRequestHandler. Did not work for Flow. Maybe patching will not work... |
The latest version of #20142 is supposed to fix it for Flow |
Side note: |
* fix: HMR for translation files * Clears resource bundle cache on translation resource redeployment * Fires a HMR event to the browser when translations are reloaded Limitation: Only supports DefaultI18NHandler where the paths are known. If you have a custom I18N handler, you might need a custom HMR supporting HotswapListener. For #20118 Requires vaadin/hilla#2795 to fully fix the issue * format * trigger Flow UIs refresh * flow support * detect correct refresh stragety per UI --------- Co-authored-by: Marco Collovati <[email protected]>
* fix: HMR for translation files * Clears resource bundle cache on translation resource redeployment * Fires a HMR event to the browser when translations are reloaded Limitation: Only supports DefaultI18NHandler where the paths are known. If you have a custom I18N handler, you might need a custom HMR supporting HotswapListener. For #20118 Requires vaadin/hilla#2795 to fully fix the issue * format * trigger Flow UIs refresh * flow support * detect correct refresh stragety per UI --------- Co-authored-by: Marco Collovati <[email protected]>
* fix: HMR for translation files * Clears resource bundle cache on translation resource redeployment * Fires a HMR event to the browser when translations are reloaded Limitation: Only supports DefaultI18NHandler where the paths are known. If you have a custom I18N handler, you might need a custom HMR supporting HotswapListener. For #20118 Requires vaadin/hilla#2795 to fully fix the issue * format * trigger Flow UIs refresh * flow support * detect correct refresh stragety per UI --------- Co-authored-by: Artur <[email protected]> Co-authored-by: Marco Collovati <[email protected]>
Waits for vaadin/hilla#2795. |
Description of the bug
Using hotswapagent 2.0.1 with watchResources=src/main/resources/vaadin-i18n. Seems to work, but UI/Vaadin does not load/refresh translations. Need a full restart.
HOTSWAP AGENT: 11:10:14.384 INFO (org.hotswap.agent.plugin.spring.reload.SpringBeanReload) - try to add changed property 'file:/D:/vaadin/src/main/resources/vaadin-i18n/translations_no.properties' into org.springframework.beans.factory.support.DefaultListableBeanFactory@17273273
Expected behavior
Should show new translation text on hotswap
Minimal reproducible example
H1 heading1 = new H1(translate("h1.element-1.text"));
h1.element-1.text=Hello
Versions
Hilla: 24.5.0.beta4
Flow: 24.5.0.beta3
Vaadin: 24.5.0.beta4
Copilot: 24.5.0.beta3
Frontend Hotswap: Enabled, using Vite
OS: amd64 Windows 11 10.0
Java: JetBrains s.r.o. 21.0.3
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Java Hotswap: false
IDE Plugin: ☑ 1.9.9
https://github.com/HotswapProjects/HotswapAgent/releases/tag/RELEASE-2.0.1
The text was updated successfully, but these errors were encountered: