;;; gnus-ofsetup.el --- Setup advisor for Offline reading for Mail/News.
;;;
-;;; $Id: gnus-ofsetup.el,v 1.1.2.19.4.5 1999-08-27 16:57:12 czkmt Exp $
+;;; $Id: gnus-ofsetup.el,v 1.1.2.19.4.6 1999-09-03 15:44:25 czkmt Exp $
;;;
;;; Copyright (C) 1998 Tatsuya Ichikawa
;;; Author: Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
(if (not (file-exists-p news-spool))
(make-directory news-spool t)))
(error
- (error
- "%s%s"
- "Making directories failed."
- "Set mail/news spool directories properly.")))))
+ (error (gnus-ofsetup-get-message 'prepare-miee-1))))))
(defvar gnus-ofsetup-update-setting-file
'((save-excursion
(let ((forms (symbol-value list)))
`(progn ,@forms))))
+(defvar gnus-offline-lang
+ (cond ((and (featurep 'meadow)
+ (string= current-language-environment "Japanese"))
+ "ja_complete")
+ ((and (boundp 'current-language-environment)
+ (string= current-language-environment "Japanese"))
+ "ja")
+ (t
+ "en"))
+ "This variable decides which language will be used for display.")
+
+(defvar gnus-ofsetup-resource-en
+ '((prepare-miee-1
+ . "Making directories failed. Set mail/news spool directories properly.")
+ (completing-read-symbol-1 . " (TAB to completion): ")
+ (setup-1 . "Method for offline News reading")
+ (setup-2 . "Agent directory: ")
+ (setup-3 . "Dialup program (give a null string if you do not use): ")
+ (setup-4 . "Dialup program options: ")
+ (setup-5 . "Hangup program (give a null string if you do not use): ")
+ (setup-6 . "Hangup program options: ")
+ (setup-7 . "Select MTA type for sending mail")
+ (setup-8 . "Use MIEE post/send message ")
+ (setup-9 . "News spool directory for sending: ")
+ (setup-10 . "Mail spool directory for sending: ")
+ (setup-11 . "How many e-mail address do you have: ")
+ (setup-12 . "Mail Account name : ")
+ (setup-13 . "Mail server : ")
+ (setup-14 . "Authentification Method (TAB to completion): ")
+ (setup-15 . "Do you use pop3.el to fetch mail? ")
+ (setup-16 . "movemail program name: ")
+ (setup-17 . "movemail options: ")
+ (setup-18 . "Do you save password information to newsrc file? ")
+ (param-news-method-1 . "News Method")
+ (param-news-method-2 . "Gnus Agent")
+ (param-news-method-3 . "nnspool")
+ (param-news-method-4 . "\
+Method to fetch news articles.")
+ (param-dialup-program-1 . "Dialup Program")
+ (param-dialup-program-2 . "Use program..")
+ (param-dialup-program-3 . "Don't auto-dial.")
+ (param-dialup-program-4 . "\
+Program which does dial.")
+ (param-dialup-program-arg-1 . "Dialup Program Arguments")
+ (param-dialup-program-arg-2 . "Argument")
+ (param-dialup-program-arg-3 . "\
+Program arguments of gnus-offline-dialup-program.")
+ (param-hangup-program-1 . "Hangup Program")
+ (param-hangup-program-2 . "Use program..")
+ (param-hangup-program-3 . "Don't auto-hangup.")
+ (param-hangup-program-4 . "\
+Program which does hangup.")
+ (param-hangup-program-arg-1 . "Hangup Program Arguments")
+ (param-hangup-program-arg-2 . "Argument")
+ (param-hangup-program-arg-3 . "\
+Program arguments of gnus-offline-hangup-program.")
+ (param-interval-1 . "Interval between Jobs")
+ (param-interval-2 . "\
+Interval time(minutes) to do online jobs.
+If set to 0 , timer call is disabled.")
+ (param-drafts-queue-type-1 . "Drafts Queue Type")
+ (param-drafts-queue-type-2 . "Gnus Draft for queuing.")
+ (param-drafts-queue-type-3 . "I prefer MIEE for queuing.")
+ (param-drafts-queue-type-4 . "\
+Type of queue used for draft messages.
+
+If the select method for news is nnspool, you must choose MIEE.
+MIEE is another library for offline messaging. It isn't part of
+Semi-gnus. If you want to know about MIEE, see README-offline.{en,ja}.")
+ (param-mail-spool-1 . "Mail Spool Directory for MIEE")
+ (param-news-spool-1 . "News Spool Directory for MIEE")
+ (param-MTA-type-1 . "MTA Type")
+ (param-MTA-type-2 . "Use smtp.el")
+ (param-MTA-type-3 . "Use sendmail")
+ (param-MTA-type-4 . "\
+Type of MTA used for sending mail.")
+ (param-save-passwd-1 . "Save Password in Startup File")
+ (param-save-passwd-2 . "OK, I'm sure it's safe.")
+ (param-save-passwd-3 . "No way, it's too dangerous!")
+ (param-save-passwd-4 . "\
+Whether you want your POP passwords written in .newsrc.eld or not.")
+ (param-mail-source-1 . "Mail Sources")
+ (param-mail-source-2 . "\
+Information of mail sources. Actually, a list of `Mail Source Specifiers'.
+
+The format of this variable is just the same as `mail-sources' (or
+`nnmail-spool-file' which seems obsolete).
+
+`Mail Source Specifiers' can take a lot of keywords. For example,
+if you want to use movemail instead of pop3.el which comes with
+Gnus, you can set a specifier using the kerword :program as shown
+below:
+
+ (pop :program \"movemail -pf po:%u %t %p\")
+
+If you want to know more about mail source specifiers and keywords,
+click the button below.")
+ (customize-1 . "Customize the Gnus Offline Parameters, and press ")
+ (customize-2 . "done")
+ (customize-3 . "Push me when done customizing.")
+ (customize-4 . "Parameters")
+ (customize-5 . "\
+These parameters will be saved in ~/.gnus-offline.el.
+
+Note: Touching these parameters may require Gnus or even Emacs to be
+restarted.")
+ (customize-6 . "Push me to learn more.")
+ (customize-done-1 . "(No changes need to be saved)")
+ (customize-done-2
+ . "Invalid parameters. Check the news method and drafts queue type.")))
+
+(defvar gnus-ofsetup-resource-ja
+ '((prepare-miee-1
+ . "\e$B%G%#%l%/%H%j$,:n$l$^$;$s!#%9%W!<%k$N@_Dj$r@5$7$/$7$F$/$@$5$$!#\e(B")
+ (completing-read-symbol-1 . "(TAB \e$B$GJd40$7$^$9\e(B): ")
+ (setup-1 . "\e$B%*%U%i%$%s$G%K%e!<%9$rFI$`J}K!$rA*$s$G$/$@$5$$\e(B ")
+ (setup-2 . "Gnus Agent \e$B$N%G%#%l%/%H%j\e(B: ")
+ (setup-3
+ . "\e$B%@%$%d%k@\B3%W%m%0%i%`L>\e(B (\e$B;H$o$J$$>l9g$O6uJ8;zNs$rJV$7$F2<$5$$\e(B): ")
+ (setup-4 . "\e$B%@%$%d%k@\B3%W%m%0%i%`$N0z?t\e(B: ")
+ (setup-5
+ . "\e$B%@%$%d%k@ZCG%W%m%0%i%`L>\e(B (\e$B;H$o$J$$>l9g$O6uJ8;zNs$rJV$7$F2<$5$$\e(B): ")
+ (setup-6 . "\e$B%@%$%d%k@ZCG%W%m%0%i%`$N0z?t\e(B: ")
+ (setup-7 . "\e$B%a!<%kAw?.$K;H$&\e(B MTA \e$B$rA*$s$G2<$5$$\e(B ")
+ (setup-8 . "\e$B%a%C%;!<%8$NAw?.$K\e(B MIEE \e$B$r;H$$$^$9$+\e(B? ")
+ (setup-9 . "\e$B%K%e!<%9$N%9%W!<%k%G%#%l%/%H%j\e(B: ")
+ (setup-10 . "\e$B%a!<%k$N%9%W!<%k%G%#%l%/%H%j\e(B: ")
+ (setup-11 . "\e$B%a!<%k%"%+%&%s%H$N?t$rEz$($F$/$@$5$$\e(B: ")
+ (setup-12 . "\e$B%a!<%k$N%"%+%&%s%HL>\e(B: ")
+ (setup-13 . "\e$B$=$N%"%+%&%s%H$N$"$k%a!<%k%5!<%PL>\e(B: ")
+ (setup-14 . "\e$B$=$N%5!<%P$G$NG'>ZJ}<0$O\e(B? (TAB \e$B$GJd40$7$^$9\e(B): ")
+ (setup-15 . "\e$B%a!<%k$N<u?.$K$O\e(B pop3.el \e$B$r;H$$$^$9$+\e(B? ")
+ (setup-16 . "movemail \e$B%W%m%0%i%`$NL>A0\e(B: ")
+ (setup-17 . "movemail \e$B%W%m%0%i%`$KEO$90z?t\e(B: ")
+ (setup-18 . "newsrc \e$B%U%!%$%k$K\e(B POP \e$B%Q%9%o!<%I$rJ]B8$7$^$9$+\e(B? ")
+
+ (param-news-method-4 . "\
+\e$B%K%e!<%95-;v$r<hF@$9$kJ}K!$G$9!#\e(B")
+ (param-dialup-program-4 . "\
+\e$B<+F0%@%$%d%k@\B3$K;H$&%W%m%0%i%`!#\e(B")
+ (param-dialup-program-arg-3 . "\
+\e$B%@%$%d%k@\B3%W%m%0%i%`$KEO$90z?t!#\e(B")
+ (param-hangup-program-4 . "\
+\e$B<+F0%@%$%d%k@ZCG$K;H$&%W%m%0%i%`!#\e(B")
+ (param-hangup-program-arg-3 . "\
+\e$B%@%$%d%k@ZCG%W%m%0%i%`$KEO$90z?t!#\e(B")
+ (param-interval-2 . "\
+\e$BAw<u?.%8%g%V$r9T$&4V3V!#J,C10L$G;XDj$7$^$9!#\e(B
+
+\e$B$3$l$r\e(B 0 \e$B$K@_Dj$9$k$H<+F0Aw<u?.5!G=$O%*%U$K$J$j$^$9!#\e(B")
+ (param-drafts-queue-type-4 . "\
+\e$B%I%i%U%H5-;v$rJ]B8$9$k%-%e!<$N<oN`$r;XDj$7$^$9!#\e(B
+
+\e$B%K%e!<%9$N9VFI<jCJ$,\e(B nnspool \e$B$N>l9g!"\e(BMIEE \e$B$r;XDj$9$kI,MW$,$"$j$^$9!#\e(B
+MIEE \e$B$O%*%U%i%$%s$G$N%a!<%k\e(B/\e$B%K%e!<%9Aw?.5!G=$rDs6!$9$k%i%$%V%i%j$G$9$,!"\e(B
+Semi-gnus \e$B$K$OIUB0$7$F$$$^$;$s!#\e(BMIEE \e$B$K$D$$$FCN$j$?$$>l9g$O\e(B
+README-offline.{en,ja} \e$B$r;2>H$7$F$/$@$5$$!#\e(B")
+ (param-MTA-type-4 . "\
+MTA \e$B$O%a!<%k$NAw?.$r<u$1;}$D%W%m%0%i%`$G$9!#$=$N<oN`$r;XDj$7$^$9!#\e(B")
+ (param-save-passwd-4 . "\
+POP \e$B%Q%9%o!<%I$r\e(B .newsrc.eld \e$B$KJ]B8$9$k$+H]$+$r;XDj$7$^$9!#\e(B")
+ (param-mail-source-2 . "\
+\e$B%a!<%k<hF@@h$d<hF@J}K!$r;XDj$7$^$9!#\e(B
+
+\e$B$3$N%*%W%7%g%s$N=q<0$O\e(B `mail-sources' \e$B$H$$$&JQ?t$HF1$8$G$"$j!"\e(B
+`mail source specifier' \e$B$H8F$P$l$k$b$N$N%j%9%H$H$7$F5-=R$7$^$9!#\e(B
+
+\e$B3F!9$N\e(B `mail source specifier' \e$B$K$O?'!9$J%-!<%o!<%I$r;XDj$9$k$3$H$,\e(B
+\e$B$G$-$^$9!#Nc$($P%a!<%k$N<hF@$K$O\e(B pop3.el \e$B$NBe$o$j$K30It%W%m%0%i%`\e(B
+(movemail \e$B$J$I\e(B) \e$B$r;H$$$?$$!"$H$$$&>l9g$K$O!"\e(B:program \e$B$r$$$&%-!<%o!<\e(B
+\e$B%I$r;XDj$7$F0J2<$NMM$K5-=R$7$^$9!#\e(B
+
+ (pop :program \"movemail -pf po:%u %t %p\")
+
+mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
+\e$BCN$j$?$$>l9g$O!"0J2<$N%\%?%s$r%/%j%C%/$7$F$/$@$5$$!#\e(B(Info \e$B$N3:Ev2U=j\e(B
+\e$B$X$N%j%s%/$K$J$C$F$$$^$9!#\e(B)" )
+
+ (customize-1
+ . "Gnus Offline \e$B$N%Q%i%a!<%?!#=*$o$C$?$i1&$N%\%?%s$r2!$7$F$/$@$5$$!#\e(B")
+ (customize-2 . "done")
+ (customize-3 . "\e$B@_Dj$7=*$o$C$?$i%\%/$r2!$7$F$M!#\e(B")
+ (customize-4 . "\e$B%Q%i%a!<%?\e(B")
+ (customize-5 . "\
+\e$B$3$l$i$N%Q%i%a!<%?$O\e(B ~/.gnus-offline.el \e$B$KJ]B8$5$l$^$9!#\e(B
+
+\e$BCm0U\e(B: \e$B$3$l$i$N%Q%i%a!<%?$NJQ99$O>l9g$K$h$C$F$O\e(B Gnus (\e$B$5$i$K>l9g$K\e(B
+\e$B$h$C$F$O\e(B Emacs) \e$B$N:F5/F0$rI,MW$H$9$k$3$H$,$"$j$^$9!#\e(B")
+ (customize-6 . "\e$B$b$C$HCN$j$?$$>l9g$O%\%/$r2!$7$F$M!#\e(B")
+ (customize-done-1 . "(\e$BJ]B8$9$Y$-JQ99$O$"$j$^$;$s\e(B)")
+ (customize-done-2
+ . "\e$B%K%e!<%99VFI<jCJ$H%I%i%U%H5-;v<h$j07$$<jCJ$N@_Dj$r8+D>$7$F$/$@$5$$!#\e(B")
+ ))
+
+(defvar gnus-ofsetup-resource-ja_complete
+ (append
+ gnus-ofsetup-resource-ja
+ '((param-news-method-1 . "\e$B%K%e!<%99VFIJ}K!\e(B")
+ (param-news-method-2 . "Gnus Agent")
+ (param-news-method-3 . "nnspool")
+ (param-dialup-program-1 . "\e$B%@%$%d%k@\B3%W%m%0%i%`\e(B")
+ (param-dialup-program-2 . "\e$B%W%m%0%i%`$r;H$&\e(B..")
+ (param-dialup-program-3 . "\e$B<+F0%@%$%d%k@\B3$O$7$J$$\e(B")
+ (param-dialup-program-arg-1 . "\e$B%@%$%d%k@\B3%W%m%0%i%`$N0z?t\e(B")
+ (param-dialup-program-arg-2 . "\e$B0z?t\e(B")
+ (param-hangup-program-1 . "\e$B%@%$%d%k@ZCG%W%m%0%i%`\e(B")
+ (param-hangup-program-2 . "\e$B%W%m%0%i%`$r;H$&\e(B..")
+ (param-hangup-program-3 . "\e$B<+F0%@%$%d%k@ZCG$O$7$J$$\e(B")
+ (param-hangup-program-arg-1 . "\e$B%@%$%d%k@ZCG%W%m%0%i%`$N0z?t\e(B")
+ (param-hangup-program-arg-2 . "\e$B0z?t\e(B")
+ (param-interval-1 . "\e$B<+F0Aw<u?.%8%g%V$N4V3V\e(B")
+ (param-drafts-queue-type-1 . "\e$B%I%i%U%H5-;v$rJ]B8$9$k%-%e!<$N<oN`\e(B")
+ (param-drafts-queue-type-2 . "Gnus Draft \e$B$N5!G=$rMxMQ$9$k\e(B")
+ (param-drafts-queue-type-3 . "MIEE \e$B$N5!G=$rMxMQ$9$k\e(B")
+ (param-mail-spool-1 . "MIEE \e$B$,;H$&%a!<%k$N%9%W!<%k%G%#%l%/%H%j\e(B")
+ (param-news-spool-1 . "MIEE \e$B$,;H$&%K%e!<%9$N%9%W!<%k%G%#%l%/%H%j\e(B")
+ (param-MTA-type-1 . "MTA \e$B$N<oN`\e(B")
+ (param-MTA-type-2 . "smtp.el \e$B$r;H$&\e(B")
+ (param-MTA-type-3 . "sendmail \e$B$r;H$&\e(B")
+ (param-save-passwd-1
+ . "\e$B%U%!%$%k$K\e(B POP \e$B%Q%9%o!<%I$rJ]B8$9$k\e(B")
+ (param-save-passwd-2 . "\e$B0BA4$J$N$GJ]B8$9$k\e(B")
+ (param-save-passwd-3 . "\e$B4m81$@$+$i$d$a$H$/\e(B")
+ (param-mail-source-1 . "\e$B%a!<%k<hF@@h$N>pJs\e(B"))))
+
+(defun gnus-ofsetup-get-message (symbol &optional lang)
+ (setq lang (or lang gnus-offline-lang))
+ (or
+ (cdr (assq symbol (symbol-value
+ (intern (format "gnus-ofsetup-resource-%s" lang)))))
+ (cdr (assq symbol gnus-ofsetup-resource-en))))
+
(defun gnus-ofsetup-completing-read-symbol (msg &rest syms)
(intern
- (completing-read (concat msg " (TAB to completion): ")
+ (completing-read (concat
+ msg
+ (gnus-ofsetup-get-message 'completing-read-symbol-1))
(mapcar
(lambda (sym)
(list (symbol-name sym)))
num-of-address i mail-source save-passwd)
(setq news-method
(gnus-ofsetup-completing-read-symbol
- "Method for offline News reading"
+ (gnus-ofsetup-get-message 'setup-1)
'nnagent 'nnspool))
;; Setting for gnus-agent.
(if (eq news-method 'nnagent)
(setq agent-directory
- (read-from-minibuffer "Agent directory: " "~/News/agent")))
+ (read-from-minibuffer
+ (gnus-ofsetup-get-message 'setup-2) "~/News/agent")))
(setq mail-method 'nnmail)
(setq dialup-program
(read-file-name
- "Dialup program (give a null string if you do not use): "
+ (gnus-ofsetup-get-message 'setup-3)
nil nil t))
(if (string-match "^[ \t]*$" dialup-program)
(setq dialup-program nil)
(setq dialup-program-arguments
(delete "" (split-string
- (read-from-minibuffer "Dialup program options: ")
+ (read-from-minibuffer
+ (gnus-ofsetup-get-message 'setup-4))
"[\t ]+"))))
(setq hangup-program
(read-file-name
- "Hangup program (give a null string if you do not use): "
+ (gnus-ofsetup-get-message 'setup-5)
nil nil t))
(if (string-match "^[ \t]*$" hangup-program)
(setq hangup-program nil)
(setq hangup-program-arguments
(delete "" (split-string
- (read-from-minibuffer "Hangup program options: ")
+ (read-from-minibuffer
+ (gnus-ofsetup-get-message 'setup-6))
"[\t ]+"))))
(setq MTA-type (gnus-ofsetup-completing-read-symbol
- "Select MTA type for sending mail"
+ (gnus-ofsetup-get-message 'setup-7)
'smtp 'sendmail))
(if (eq news-method 'nnspool)
(setq use-miee t)
- (setq use-miee (y-or-n-p "Use MIEE post/send message ")))
+ (setq use-miee (y-or-n-p (gnus-ofsetup-get-message 'setup-8))))
(if use-miee
(progn
;; Setting for MIEE.
(setq news-spool
(read-from-minibuffer
- "News spool directory for sending: "
+ (gnus-ofsetup-get-message 'setup-9)
"/usr/spool/news.out"))
(setq mail-spool
(read-from-minibuffer
- "Mail spool directory for sending: "
+ (gnus-ofsetup-get-message 'setup-10)
"/usr/spool/mail.out"))
(setq drafts-queue-type 'miee)
(gnus-ofsetup-prepare gnus-ofsetup-prepare-for-miee))
(setq drafts-queue-type 'agent))
;; Set E-Mail Address and pop3 movemail type.
(setq num-of-address
- (read-from-minibuffer "How many e-mail address do you have: "))
+ (read-from-minibuffer (gnus-ofsetup-get-message 'setup-11)))
(setq i (string-to-int num-of-address))
(while (> i 0)
- (let ((user (read-from-minibuffer "Mail Account name : "))
- (server (read-from-minibuffer "Mail server : "))
+ (let ((user (read-from-minibuffer (gnus-ofsetup-get-message 'setup-12)))
+ (server (read-from-minibuffer
+ (gnus-ofsetup-get-message 'setup-13)))
(auth (completing-read
- "Authentification Method (TAB to completion): "
+ (gnus-ofsetup-get-message 'setup-14)
'(("password") ("apop")) nil t nil))
- (islisp (y-or-n-p "Do you use pop3.el to fetch mail? "))
+ (islisp (y-or-n-p (gnus-ofsetup-get-message 'setup-15)))
source)
(if (not islisp)
- (let ((prog (read-file-name "movemail program name: "
+ (let ((prog (read-file-name (gnus-ofsetup-get-message 'setup-16)
exec-directory "movemail"))
- (args (read-from-minibuffer "movemail options: "
- "-pf")))
+ (args (read-from-minibuffer
+ (gnus-ofsetup-get-message 'setup-17)
+ "-pf")))
(setq source `(pop
:user ,user
:server ,server
source)))))
(setq i (1- i)))
(setq save-passwd
- (y-or-n-p "Do you save password information to newsrc file? "))
+ (y-or-n-p (gnus-ofsetup-get-message 'setup-18)))
;;
(gnus-ofsetup-prepare gnus-ofsetup-update-setting-file)))
(load gnus-offline-setting-file))
(defun gnus-ofsetup-find-parameters ()
"Return the each current value of gnus-offline parameters."
`((news-method
- (choice :tag "News Method" :value ,gnus-offline-news-fetch-method
- (const :tag "Gnus Agent" nnagent)
- (const :tag "nnspool" nnspool)) "\
-Method to fetch news articles.")
+ (choice :tag ,(gnus-ofsetup-get-message 'param-news-method-1)
+ :value ,gnus-offline-news-fetch-method
+ (const :tag ,(gnus-ofsetup-get-message 'param-news-method-2)
+ nnagent)
+ (const :tag ,(gnus-ofsetup-get-message 'param-news-method-3)
+ nnspool))
+ ,(gnus-ofsetup-get-message 'param-news-method-4))
(dialup-program
- (choice :tag "Dialup Program" :value ,gnus-offline-dialup-program
- (string :tag "Use Program..")
- (const :tag "Don't auto-dial." nil)) "\
-Program which does dial.")
+ (choice :tag ,(gnus-ofsetup-get-message 'param-dialup-program-1)
+ :value ,gnus-offline-dialup-program
+ (string :tag ,(gnus-ofsetup-get-message 'param-dialup-program-2))
+ (const :tag ,(gnus-ofsetup-get-message
+ 'param-dialup-program-3) nil))
+ ,(gnus-ofsetup-get-message 'param-dialup-program-4))
(dialup-program-arguments
- (repeat :tag "Dialup Program Arguments"
+ (repeat :tag ,(gnus-ofsetup-get-message 'param-dialup-program-arg-1)
:value ,gnus-offline-dialup-program-arguments
- (string :tag "Argument"))"\
-Program arguments of gnus-offline-dialup-program.")
+ (string :tag ,(gnus-ofsetup-get-message
+ 'param-dialup-program-arg-2)))
+ ,(gnus-ofsetup-get-message 'param-dialup-program-arg-3))
(hangup-program
- (choice :tag "Hangup Program" :value ,gnus-offline-hangup-program
- (string :tag "Use Program..")
- (const :tag "Don't auto-hangup." nil)) "\
-Program which does hangup.")
+ (choice :tag ,(gnus-ofsetup-get-message 'param-hangup-program-1)
+ :value ,gnus-offline-hangup-program
+ (string :tag ,(gnus-ofsetup-get-message 'param-hangup-program-2))
+ (const :tag ,(gnus-ofsetup-get-message 'param-hangup-program-3)
+ nil))
+ ,(gnus-ofsetup-get-message 'param-hangup-program-4))
(hangup-program-arguments
- (repeat :tag "Hangup Program Arguments"
+ (repeat :tag ,(gnus-ofsetup-get-message 'param-hangup-program-arg-1)
:value ,gnus-offline-hangup-program-arguments
- (string :tag "Argument")) "\
-Program arguments of gnus-offline-hangup-program.")
+ (string :tag ,(gnus-ofsetup-get-message
+ 'param-hangup-program-arg-2)))
+ ,(gnus-ofsetup-get-message 'param-hangup-program-arg-3))
(interval
- (integer :tag "Interval between Jobs"
- :value ,gnus-offline-interval-time) "\
-Interval time(minutes) to do online jobs.
-If set to 0 , timer call is disabled.")
+ (integer :tag ,(gnus-ofsetup-get-message 'param-interval-1)
+ :value ,gnus-offline-interval-time)
+ ,(gnus-ofsetup-get-message 'param-interval-2))
(drafts-queue-type
- (choice :tag "Drafts Queue Type" :value ,gnus-offline-drafts-queue-type
- (const :tag "Gnus Draft for queuing." agent)
- (const :tag "I prefer MIEE for queuing." miee)) "\
-Type of queue used for draft messages.
-
-If the select method for news is nnspool, you must choose MIEE.
-MIEE is another library for offline messaging. It isn't part of
-Semi-gnus. If you want to know about MIEE, see README-offline.{en,ja}.")
+ (choice :tag ,(gnus-ofsetup-get-message 'param-drafts-queue-type-1)
+ :value ,gnus-offline-drafts-queue-type
+ (const :tag ,(gnus-ofsetup-get-message 'param-drafts-queue-type-2)
+ agent)
+ (const :tag ,(gnus-ofsetup-get-message 'param-drafts-queue-type-3)
+ miee))
+ ,(gnus-ofsetup-get-message 'param-drafts-queue-type-4))
(mail-spool
- (directory :tag "Mail Spool Directory for MIEE"
+ (directory :tag ,(gnus-ofsetup-get-message 'param-mail-spool-1)
:value ,(cond ((and (boundp 'sendmail-to-spool-directory)
sendmail-to-spool-directory)
sendmail-to-spool-directory)
"/usr/spool/mail.out"))))
(news-spool
- (directory :tag "News Spool Directory for MIEE"
+ (directory :tag ,(gnus-ofsetup-get-message 'param-news-spool-1)
:value ,(cond ((and (boundp 'news-spool-request-post-directory)
news-spool-request-post-directory)
news-spool-request-post-directory)
"/usr/spool/news.out"))))
(MTA-type
- (choice :tag "MTA Type" :value ,gnus-offline-MTA-type
- (const :tag "Use smtp.el" smtp)
- (const :tag "Use sendmail" sendmail)) "\
-Type of MTA used for sending mail.")
+ (choice :tag ,(gnus-ofsetup-get-message 'param-MTA-type-1)
+ :value ,gnus-offline-MTA-type
+ (const :tag ,(gnus-ofsetup-get-message 'param-MTA-type-2) smtp)
+ (const :tag ,(gnus-ofsetup-get-message 'param-MTA-type-3)
+ sendmail))
+ ,(gnus-ofsetup-get-message 'param-MTA-type-4))
(save-passwd
- (choice :tag "Save Password in Startup File"
+ (choice :tag ,(gnus-ofsetup-get-message 'param-save-passwd-1)
:value ,(if (memq 'mail-source-password-cache gnus-variable-list)
t
nil)
- (const :tag "OK, I'm sure it's safe." t)
- (const :tag "No way, it's too dangerous!" nil)) "\
-Whether you want your POP passwords written in .newsrc.eld or not.")
+ (const :tag ,(gnus-ofsetup-get-message 'param-save-passwd-2) t)
+ (const :tag ,(gnus-ofsetup-get-message 'param-save-passwd-3) nil))
+ ,(gnus-ofsetup-get-message 'param-save-passwd-4))
(mail-source
- (sexp :tag "Mail Sources" :value ,gnus-offline-mail-source) "\
-Information of mail sources. Actually, a list of `Mail Source Specifiers'.
-
-The format of this variable is just the same as `mail-sources' (or
-`nnmail-spool-file' which seems obsolete).
-
-`Mail Source Specifiers' can take a lot of keywords. For example,
-if you want to use movemail instead of pop3.el which comes with
-Gnus, you can set a specifier using the kerword :program as shown
-below:
-
- (pop :program \"movemail -pf po:%u %t %p\")
-
-If you want to know more about mail source specifiers and keywords,
-click the button below.")))
+ (sexp :tag ,(gnus-ofsetup-get-message 'param-mail-source-1)
+ :value ,gnus-offline-mail-source)
+ ,(gnus-ofsetup-get-message 'param-mail-source-2))))
(defvar gnus-ofsetup-params)
(kill-buffer (gnus-get-buffer-create "*Gnus Offline Customize*"))
(switch-to-buffer (gnus-get-buffer-create "*Gnus Offline Customize*"))
(gnus-custom-mode)
- (widget-insert "Customize the Gnus Offline Parameters, and press ")
+ (widget-insert (gnus-ofsetup-get-message 'customize-1))
(widget-create 'push-button
- :tag "done"
- :help-echo "Push me when done customizing."
+ :tag (gnus-ofsetup-get-message 'customize-2)
+ :help-echo (gnus-ofsetup-get-message 'customize-3)
:action 'gnus-ofsetup-customize-done)
(widget-insert "\n\n")
(make-local-variable 'gnus-ofsetup-params)
(widget-create 'group
`(set :inline t
:greedy t
- :tag "Parameters"
+ :tag ,(gnus-ofsetup-get-message 'customize-4)
:format "%t:\n%h%v"
- :doc "\
-These parameters will be saved in ~/.gnus-offline.el.
-
-Note: Touching these parameters may require Gnus or even Emacs to be
-restarted."
+ :doc ,(gnus-ofsetup-get-message 'customize-5)
,@types)))
(widget-create 'info-link
- :help-echo "Push me to learn more."
+ :help-echo (gnus-ofsetup-get-message 'customize-6)
:tag "<Info> mail sources"
"(gnus)Mail Sources")
(save-passwd (and (memq 'mail-source-password-cache gnus-variable-list)
t)))
(if (null params)
- (gnus-message 4 "(No changes need to be saved)")
- (mapcar (lambda (el)
+ (gnus-message 4 (gnus-ofsetup-get-message 'customize-done-1))
+ (mapc #'(lambda (el)
(let ((sym (car el))
(val (cdr el)))
(set sym val)
(setq gnus-variable-list
(delq 'mail-source-password-cache
gnus-variable-list)))))))
- params)
+ params)
(if (and (eq news-method 'nnspool)
(not (eq drafts-queue-type 'miee)))
- (error
- "Invalid parameters. Check the news method and drafts queue type."))
+ (error (gnus-ofsetup-get-message 'customize-done-2)))
(if use-miee
(gnus-ofsetup-prepare gnus-ofsetup-prepare-for-miee))
(gnus-ofsetup-prepare gnus-ofsetup-update-setting-file)