Author: nextgens
Date: 2007-04-22 14:26:45 +0000 (Sun, 22 Apr 2007)
New Revision: 12864

Modified:
   trunk/freenet/src/freenet/l10n/L10n.java
Log:
L10n: handle missformated l10n files wisely

Modified: trunk/freenet/src/freenet/l10n/L10n.java
===================================================================
--- trunk/freenet/src/freenet/l10n/L10n.java    2007-04-22 14:06:15 UTC (rev 
12863)
+++ trunk/freenet/src/freenet/l10n/L10n.java    2007-04-22 14:26:45 UTC (rev 
12864)
@@ -61,6 +61,10 @@
                        Logger.error(this, "IOError while accessing the file!" 
+ e.getMessage(), e);
                }
                currentTranslation = loadTranslation(selectedLanguage);
+               if(currentTranslation == null) {
+                       Logger.error(this, "The translation file for " + 
selectedLanguage + " is invalid. The node will load an empty template.");
+                       currentTranslation = new SimpleFieldSet(false);
+               }
        }

        /**


Reply via email to