Changeset 636:1c091100f74b
- Timestamp:
- 10/02/09 16:59:55 (4 years ago)
- Author:
- tgambet
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@637
- Message:
-
default language properties moved in a separate variable
- Location:
- src/org/w3c/unicorn
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r633
|
r636
|
|
| 1 | | // $Id: Framework.java,v 1.17 2009-10-02 16:52:10 tgambet Exp $ |
| | 1 | // $Id: Framework.java,v 1.18 2009-10-02 16:59:55 tgambet Exp $ |
| 2 | 2 | // Author: Damien LEROY & Thomas GAMBET. |
| 3 | 3 | // (c) COPYRIGHT MIT, ERCIM ant Keio, 2006. |
| … |
… |
|
| 427 | 427 | logger.debug("> Found language (default): " + defaultProps.getProperty("lang") + " - " + defaultProps.getProperty("language")); |
| 428 | 428 | defaultProps.put("complete", "true"); |
| 429 | | LanguageAction.addLanguageProperties(defaultProps); |
| | 429 | LanguageAction.setDefaultProperties(defaultProps); |
| 430 | 430 | languageProperties.put(Property.get("DEFAULT_LANGUAGE"), defaultProps); |
| 431 | 431 | } catch (IllegalArgumentException e) { |
-
|
r632
|
r636
|
|
| 27 | 27 | |
| 28 | 28 | private static TreeMap<String, Properties> languageProperties; |
| | 29 | |
| | 30 | private static Properties defaultProperties; |
| 29 | 31 | |
| 30 | 32 | /** |
| … |
… |
|
| 55 | 57 | |
| 56 | 58 | |
| 57 | | languages.put(defaultLang, languageProperties.get(defaultLang).getProperty("language")); |
| | 59 | languages.put(defaultLang, defaultProperties.getProperty("language")); |
| 58 | 60 | velocityContext.put("languages", languages); |
| | 61 | languageProperties.remove(defaultLang); |
| 59 | 62 | velocityContext.put("languageProps", languageProperties); |
| 60 | | velocityContext.put("defaultProps", languageProperties.get(defaultLang)); |
| | 63 | velocityContext.put("defaultProps", defaultProperties); |
| 61 | 64 | |
| 62 | 65 | PrintWriter writer = resp.getWriter(); |
| … |
… |
|
| 86 | 89 | } |
| 87 | 90 | |
| | 91 | public static Properties getDefaultProperties() { |
| | 92 | return defaultProperties; |
| | 93 | } |
| | 94 | |
| | 95 | public static void setDefaultProperties(Properties defaultProperties) { |
| | 96 | LanguageAction.defaultProperties = defaultProperties; |
| | 97 | } |
| | 98 | |
| | 99 | |
| | 100 | |
| 88 | 101 | } |