[kune-commits] r1571 - trunk/src/main/java/cc/kune/core/server/manager/impl

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Oct 24 17:49:26 CEST 2011


Author: vjrj_
Date: 2011-10-24 17:49:25 +0200 (Mon, 24 Oct 2011)
New Revision: 1571

Modified:
   trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
Log:
Minor modification

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java	2011-10-24 15:16:58 UTC (rev 1570)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java	2011-10-24 15:49:25 UTC (rev 1571)
@@ -43,7 +43,6 @@
 public class I18nTranslationManagerDefault extends DefaultManager<I18nTranslation, Long> implements
     I18nTranslationManager {
 
-  private I18nLanguage defLang;
   private final I18nTranslationFinder finder;
   private final ConcurrentHashMap<String, HashMap<String, String>> langCache;
   private final I18nLanguageManager languageManager;
@@ -58,10 +57,7 @@
   }
 
   private I18nLanguage defLang() {
-    if (defLang == null) {
-      defLang = languageManager.findByCode(I18nTranslation.DEFAULT_LANG);
-    }
-    return defLang;
+    return languageManager.findByCode(I18nTranslation.DEFAULT_LANG);
   }
 
   private I18nLanguage getLanguage(final String languageId) {
@@ -122,7 +118,7 @@
     } else {
       // new key, add to language and default language and let
       // untranslated
-      if (finder.findCount(defLang().getCode(), text) == 0) {
+      if (finder.findCount(defLang().getCode(), escapedText) == 0) {
         final I18nTranslation newTranslation = new I18nTranslation("", null,
             I18nTranslation.DEF_PLUR_INDEX, "", I18nTranslation.UNTRANSLATED_VALUE, escapedText,
             I18nTranslation.DEF_NAMESPACE, defLang(), null, noteForTranslators);




More information about the kune-commits mailing list