From af2127f3ad5ac89c7a2d283846ab715fcd09716d Mon Sep 17 00:00:00 2001 From: allo Date: Sat, 4 Feb 2006 18:08:01 +0000 Subject: [PATCH] allow multiple #File: Sektions for one File in translations. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1534 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- ChangeLog | 2 ++ source/de/anomic/data/translator.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45d3664d8..c12fd77af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,8 @@ version 0.43svn * UPDATED: New Searchstyle * FIXED: notifier.gif works even when only DATA is writable (allo) * FIXED: Translations work with readonly htroot now. (allo) + * ADDED: Log for unused Translationstrings & Support for multiple + #File: Sektions for the same file (Allo) version 0.40 (8/21/2005): * The Server now provides the virtuel Header IS_ADMIN (Alexander Schier) diff --git a/source/de/anomic/data/translator.java b/source/de/anomic/data/translator.java index 7bae53820..19e4dbe2f 100644 --- a/source/de/anomic/data/translator.java +++ b/source/de/anomic/data/translator.java @@ -116,7 +116,7 @@ public class translator { }else{ //Invalid line } }else if(line.startsWith("#File: ")){ - if(forFile != ""){ + if(!forFile.equals("")){ lists.put(forFile, translationList); } if(line.charAt(6)==' '){ @@ -124,7 +124,11 @@ public class translator { }else{ forFile=line.substring(6); } - translationList=new Hashtable(); + if(lists.containsKey(forFile)){ + translationList=(Hashtable) lists.get(forFile); + }else{ + translationList=new Hashtable(); + } } } lists.put(forFile, translationList);