/[schmitzm]/trunk/src/skrueger/i8n/Translation.java
ViewVC logotype

Diff of /trunk/src/skrueger/i8n/Translation.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

branches/1.0-gt2-2.6/src/skrueger/i8n/Translation.java revision 482 by alfonx, Tue Oct 20 13:51:11 2009 UTC branches/2.0-RC1/src/skrueger/i8n/Translation.java revision 604 by alfonx, Wed Dec 9 14:15:53 2009 UTC
# Line 61  public class Translation extends HashMap Line 61  public class Translation extends HashMap
61          public static final String LOCALECHANGE_PROPERTY = "localechange";          public static final String LOCALECHANGE_PROPERTY = "localechange";
62          public static final String NO_TRANSLATION = "NO TRANSLATION";          public static final String NO_TRANSLATION = "NO TRANSLATION";
63          public static final String DEFAULT_KEY = "default";          public static final String DEFAULT_KEY = "default";
64          static final Logger log = Logger.getLogger(Translation.class);          static final Logger LOGGER = Logger.getLogger(Translation.class);
65          static String activeLang = Locale.getDefault().getLanguage();          static String activeLang = Locale.getDefault().getLanguage();
66    
67          static protected List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();          static protected List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
# Line 143  public class Translation extends HashMap Line 143  public class Translation extends HashMap
143    
144                  fireLocaleChangeEvents();                  fireLocaleChangeEvents();
145    
146                  log.info("skrueger.i8n.Translation switched ActiveLang to " + newLang);                  LOGGER.info("skrueger.i8n.Translation switched ActiveLang to " + newLang);
147          }          }
148    
149          /**          /**
# Line 228  public class Translation extends HashMap Line 228  public class Translation extends HashMap
228                                  eatUp = eatUp.substring(eatUp.indexOf("}") + 1);                                  eatUp = eatUp.substring(eatUp.indexOf("}") + 1);
229                          }                          }
230                  } catch (Exception e) {                  } catch (Exception e) {
231                          log.warn("Error while reading the oneLineCode '" + oneLineCoded                          LOGGER.warn("Error while reading the oneLineCode '" + oneLineCoded
232                                          + "'", e);                                          + "'", e);
233                          log.warn("Translation will be empty!");                          LOGGER.warn("Translation will be empty!");
234                  }                  }
235          }          }
236    
# Line 312  public class Translation extends HashMap Line 312  public class Translation extends HashMap
312           * reference as long as you need the listener.           * reference as long as you need the listener.
313           */           */
314          public void addTranslationChangeListener(ActionListener actionListener) {          public void addTranslationChangeListener(ActionListener actionListener) {
315                  actionListeners.add(actionListener);                  if (actionListeners.add(actionListener)) {
316                            LOGGER.debug("registering a new translationChangeActionListener in the WeakHashSet");
317                    }
318          }          }
319    
320          /**          /**

Legend:
Removed from v.482  
changed lines
  Added in v.604

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26