This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch feature/requirejs-less
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit f2894a40352e2d3899fcd9ada29f59e01860eb11
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Sun Jul 27 11:51:39 2025 -0300

    TAP5-2804: Fixing dynamic locale message imports
---
 tapestry-core/src/main/typescript/src/t5/core/messages-es-module.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/tapestry-core/src/main/typescript/src/t5/core/messages-es-module.ts 
b/tapestry-core/src/main/typescript/src/t5/core/messages-es-module.ts
index afd3d4d8a..8b77d441f 100644
--- a/tapestry-core/src/main/typescript/src/t5/core/messages-es-module.ts
+++ b/tapestry-core/src/main/typescript/src/t5/core/messages-es-module.ts
@@ -43,6 +43,10 @@ const locale = 
(document.documentElement.getAttribute("data-locale")) || "en";
 // @ts-ignore
 let messages: any = await import(`t5/core/messages/${locale}`);
 
+if (messages['default'] != null && typeof messages['default'] === 'object') {
+  messages = messages.default;
+}
+
 // Returns the application message catalog message for the given key. Returns
 // a placeholder if the key is not found.
 const get = function(key: string) {

Reply via email to