Package: translate
Version: 0.6-4
Severity: wishlist
Tags: patch

I have so far never used a local dictionary in ~/.translate and I
doubt I ever will.  Still, translate clutters up my $HOME by making an
empty ~/.translate directory just in case I might decide to add a word
to the local directory later on.  What translate should do instead is
only create the directory when the user actually tries to insert a
word in the local dictionary.  The patch below does this.


diff -urN translate-0.6~/translate translate-0.6/translate
--- translate-0.6~/translate    2005-05-04 03:29:37.129447704 +0100
+++ translate-0.6/translate     2005-05-04 03:35:52.380400888 +0100
@@ -76,13 +76,6 @@
  fi
 }
 
-# If there is no $LOCDIR we should create one
-if [ ! -d $LOCDIR ] 
-  then
-    echo -n "creating private folder $LOCDIR... "
-    mkdir $LOCDIR && echo "OK."
-fi
-
 # Read configuration file, if any
 if [ -r $GLOBALCONF ]
 then 
@@ -177,6 +170,13 @@
     then # User is lazy
       exit 0
     else # We've got a new entry
+      # Make sure $LOCDIR exists
+      if [ ! -d $LOCDIR ]
+      then
+        echo -n "creating private folder $LOCDIR... "
+        mkdir $LOCDIR && echo "OK."
+      fi
+      # Add the word to the local dictionary
       if
          [ $INVERS = false ]
       then



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages translate depends on:
ii  trans-de-en                   1.3-5      A German-English translation dicti

-- no debconf information

-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to