[fusion-trac] #519: Fusion always ignores the regional extension of the specified language

Fusion trac_fusion at osgeo.org
Wed Feb 1 22:13:54 EST 2012


#519: Fusion always ignores the regional extension of the specified language
----------------------+-----------------------------------------------------
   Reporter:  wuma    |       Owner:  madair
       Type:  defect  |      Status:  new   
   Priority:  P2      |   Milestone:  Future
  Component:  Core    |     Version:  2.0   
   Severity:  Major   |    Keywords:        
External_id:          |       State:  New   
    Browser:  All     |          Os:  All   
----------------------+-----------------------------------------------------
 In line #1374 of fusion.js, I found the logic detecting the current
 language always ignores the regional extension and try to load the
 corresponding resource js files without reginal extension:

 {{{
 //determine the language to use and add resource bundles to be loaded to
 the core scripts
 var locale = navigator.language ?
                   navigator.language.substring(0,2):    //e.g. en-CA
 becomes just en
                   navigator.userLanguage.substring(0,2);//only use the
 prefix part for now,
 }}}

 line #1415:
 {{{
 if (locale != 'en') {
     coreScripts.push('lib/OpenLayers/Lang/'+locale+'.js');
     coreScripts.push('text/'+locale+'.json');
     }
 }}}

 Then for example if the specified language is cs-CZ, Fusion will always
 try to load cs.js from OpenLayers lib. While their is no cs.js. As a
 result, the strings from OpenLayers will be always English for Czech
 language.

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/519>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list