SV: SV: [fusion-users] problem with localization of fusion, i think i found a bug...

Måns Beckman mans.beckman at manandmachine.se
Mon Apr 20 07:23:37 EDT 2009


I have filed a ticket for the issue. 
Another thing that I was wondering about was if we actually use any parts of the OpenLayers translation files? When we are using setCode, it will actually check if there is an OpenLayers translation file, and it seems unnecessary to translate OpenLayers into a local language if we don't use the translation. 

Cheers
Måns

-----Ursprungligt meddelande-----
Från: Mike Adair [mailto:madair at dmsolutions.ca] 
Skickat: den 17 april 2009 16:20
Till: Måns Beckman
Kopia: fusion-users at lists.osgeo.org
Ämne: Re: SV: [fusion-users] problem with localization of fusion, i think i found a bug...

Yes it looks like Fusion is stripping off the regional part of the 
locale around line 1075 of fusion.js.  Can you enter a ticket for this 
please on the Fusion trac system please? http://trac.osgeo.org/fusion/

Mike

Måns Beckman wrote:
> Ok, so here is the problem. We are always sending two letter lang codes to Open Layers, that works great for some languages, but not others. For example to recognize Swedish open layers wants the code sv-SE. We will need to fix this in some way. 
>
> Cheers
> Måns
> 	
> -----Ursprungligt meddelande-----
> Från: fusion-users-bounces at lists.osgeo.org [mailto:fusion-users-bounces at lists.osgeo.org] För Måns Beckman
> Skickat: den 17 april 2009 12:07
> Till: fusion-users at lists.osgeo.org
> Ämne: [fusion-users] problem with localization of fusion,i think i found a bug...
>
> Hi, 
>
> Ok, I'm still no coder, but I found something that isn't working as it should. I was trying to localize fusion in MGE2010 and it wouldn't read my localization, so I did some code digging and found something strange. 
>
> In this snippet from fusion.js something isn't working as it should.
>
>         initializeLocale: function(locale) {
>           OpenLayers.Lang.setCode(locale ? locale : window._FusionLocale);
>           this.locale = OpenLayers.Lang.code;
>
> To see what's happening in a simple way I modified it like this.
>
>         initializeLocale: function(locale) {
> alert(window._FusionLocale);
> alert(locale?locale:window._FusionLocale)
> OpenLayers.Lang.setCode(locale?locale:window._FusionLocale);this.locale=OpenLayers.Lang.code;
> alert(OpenLayers.Lang.code)
>
> And the result I got was in my case where I'm using a Swedish browser "sv", so window._FusionLocale is correct, "sv", so locale?locale:window._FusionLocale is reporting what I want, but then I get "en", so by some reason OpenLayers.Lang.code is reporting "en".
>
> Anyone who can explain why, and what I need to do to get it to work? (I can think of some quick and dirty ways to fix it, but clean code is nicer.)
>
> Cheers
> Måns
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.287 / Virus Database: 270.11.58/2061 - Release Date: 04/16/09 16:38:00
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>   

-- 
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   madair at dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.287 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 20:04:00


More information about the fusion-users mailing list