Changeset 253:a864f504ae7e

Show
Ignore:
Timestamp:
09/02/09 10:39:15 (4 years ago)
Author:
tgambet
Branch:
default
convert_revision:
svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@254
Message:

cleaned

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/org/w3c/unicorn/Framework.java

    r244 r253  
    1 // $Id: Framework.java,v 1.7 2009-09-01 16:00:24 jean-gui Exp $ 
     1// $Id: Framework.java,v 1.8 2009-09-02 10:39:15 tgambet Exp $ 
    22// Author: Damien LEROY. 
    33// (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. 
     
    440440                        if (langFile.equals(defaultLanguageFile)) 
    441441                                continue; 
    442                          
    443442                        try { 
    444443                                Properties props = Language.load(langFile); 
     
    454453                                logger.error("Unable to read language file. " + langFile + ". This file will be skiped."); 
    455454                        } 
    456                          
    457                 } 
    458                  
    459                 /*for (File langFile : languageFiles) { 
    460                         if (langFile == defaultLanguageFile) 
    461                                 continue; 
    462  
    463                         String localeString = langFile.getName().split("\\.")[0]; 
    464                         if (!Language.isISOLanguageCode(localeString)) 
    465                                 logger.warn("Invalid language file: " + langFile.getName() + "" + 
    466                                                 ". \"" + localeString + "\" is not a valid locale."); 
    467                         else { 
    468                                 try { 
    469                                         FileInputStream fis = new FileInputStream(langFile); 
    470                                         InputStreamReader isr = new InputStreamReader(fis, "UTF-8"); 
    471                                         Properties props = new Properties(); 
    472                                         props.load(isr); 
    473                                         props.put("lang", localeString); 
    474                                         //props.put("tasklist", mapOfTask); 
    475                                         //Language.complete(props); 
    476                                         languageProperties.put(localeString, props); 
    477                                         String s; 
    478                                         if (localeString.equals(Property.get("DEFAULT_LANGUAGE"))) 
    479                                                 s = " (default)"; 
    480                                         else 
    481                                                 s = ""; 
    482                                         logger.debug("> Added language"+s+": " + localeString + " - " + props.getProperty("language")); 
    483                                 } catch (FileNotFoundException e) { 
    484                                         // Should not happen 
    485                                         logger.error(e.getMessage(), e); 
    486                                 } catch (UnsupportedEncodingException e) { 
    487                                         // Should not happen 
    488                                         logger.error(e.getMessage(), e); 
    489                                 } catch (IOException e) { 
    490                                         if (!localeString.equals(Property.get("DEFAULT_LANGUAGE"))) { 
    491                                                 logger.error("Unable to read language file. " + langFile + ". This file will be skiped."); 
    492                                                 continue; 
    493                                         } 
    494                                         else { 
    495                                                 throw new InitializationFailedException("Unable to read default language file. " + langFile); 
    496                                         } 
    497                                 } 
    498                         } 
    499                 }*/ 
     455                } 
    500456                 
    501457                if (languageProperties.size() == 0) {