struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "info@flyingfischer.ch" <i...@flyingfischer.ch>
Subject Re: Struts 2.5.11: js based messages not showing up, when chanching default locale
Date Mon, 26 Jun 2017 18:23:07 GMT

> At the moment testing locally and not online:
>
> Browser send en-US,en;q=0.5 on default
> OS linux on german locale
> changing locale in application by ?request_locale=it
> in struts.properties: struts.custom.i18n.resources=global-messages
>
> properties files:
>
> global-messages_de.properties
> global-messages_en.properties
> global-messages_fr.properties
> global-messages_it.properties
> global-messages.properties
>
> The later being a duplicate of global-messages_en.properties, since the
> fallback to en for other languages never worked without it.
>
> Thanks for your feedback.
>
> Markus

I did some more tests:

Test 1: in action hardcoded messages:

jsmsg = new JSMessage("Show up!");

On default locale: message shows up.
Any other locale: No show up

=> Problem persists

Test 2: in JSP hardcoded message

<script type="text/javascript">
        notif({
               msg: "Show up!",
               type: "info",
               position: "center",
               opacity: 0.9,
               timeout: 5000,
               multiline: true,
               autohide: true,
               clickable: false
});
</script>

The show up works on all locales. => definitively not a JS issue.

Conclusion
There seems to be an EL problem while not on default locale? I suspect
the properties not to be replaced by the corresponding values.

<script type="text/javascript">
        notif({
               msg: "<s:property value="jsmsg.msg" escapeHtml="false" />",
               type: "<s:property value="jsmsg.type" />",
               position: "<s:property value="jsmsg.position" />",
               opacity: <s:property value="jsmsg.opacity" />,
               timeout: <s:property value="jsmsg.timeout" />,
               multiline: <s:property value="jsmsg.multiline" />,
               autohide: <s:property value="jsmsg.autohide" />,
               clickable: <s:property value="jsmsg.clickable" />
});
</script>

Could this be an approach to further debug the issue in 2.5.11?

Thanks!
Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message