I write a jira issue about this problem 
https://issues.apache.org/jira/browse/TAP5-2551 
<https://issues.apache.org/jira/browse/TAP5-2551> some weeks ago.

For my experience, the locale de_DE is the locale of your JVM. As I wrote, "so 
the main bug is in the default locale who returns ThreadLocaleImpl meanwhile 
LocalizationSetter is not called.” 

I have to set ThreadLocale manually (threadLocale.setLocale(new Locale("es"));) 
as a fast fix because my webapps were down in some pages (for the 
loading-mask). I have to put this code on my PageRenderLinkTransformer (I use 
it for SEO):

        public PageRenderRequestParameters decodePageRenderRequest(final 
Request request){

                ...
                threadLocale.setLocale(new Locale("es"));
                ...
        }

I hope the Tapestry Team fix the problem in a near future :)

> El 27/6/2016, a las 16:35, D.R. <d.re...@googlemail.com> escribió:
> 
> Hi,
> 
> i want my app in german, so in my appmodule i put
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "de");
> 
> 1.
> On my index page the html tag is rendered as:
> <html data-debug-enabled="true" data-locale="de" 
> xmlns="http://www.w3.org/1999/xhtml";>
> or with productionmode==true:
> <html data-locale="de" xmlns="http://www.w3.org/1999/xhtml";>
> everything is fine here, just want to mention, that a
> src="/modules.gz/t5/core/messages/de.js" is referenced...
> 
> 2.
> But on some pages the locale includes also the country code, even if my 
> browser locale is english:
> <html data-debug-enabled="true" data-locale="de_DE" 
> xmlns="http://www.w3.org/1999/xhtml";>
> or with productionmode==true:
> <html data-locale="de_DE" xmlns="http://www.w3.org/1999/xhtml";>
> here i see an error in the browser console, that this file can not be 
> retrieved:
> require.js:1910 GET http://localhost:8080/modules.gz/t5/core/messages/de_DE.js
> or with productionmode==true:
> core.js:1912 GET http://localhost:8080/modules.gz/t5/core/messages/de_DE.js
> If the ENABLE_PAGELOADING_MASK is set to true, i will never see the page 
> completely loaded, only the pageloader overlay :-(
> 
> I feel like the data-locale attribute is involved and causes the request for 
> the .js file.
> goolge around i found only that:
> http://tapestry.apache.org/current/coffeescript/messages.html
> 
> I tried to reproduce in a blank t5.4.1 skeleton project, but i am not able to 
> produce a page with data-locale="de_DE"
> 
> Is my assumption right, that this data-locale causes the request for the .js 
> file?
> 
> The data-locale is set here:
> org.apache.tapestry5.internal.services.javascript.ConfigureHTMLElementFilter.renderMarkup(MarkupWriter,
>  MarkupRenderer)
> by threadLocale.getLocale()
> 
> What causes the threadlocale to be sometimes only "de" and sometimes "de_DE" 
> with a resulting de_DE.js request error?
> 
> How can i deal with that problem? Any hints are very welcome.
> 
> 
> Kind regards
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

Reply via email to