diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-13 11:13:33 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-13 11:13:33 +0000 |
| commit | 7e960384fa89c02c2fc2be1f61fe18645f8a13fe (patch) | |
| tree | 66d17d5fb9a7f73a3291e6261f1df2e12612eb2e /chess-ics.el | |
| parent | f4639c9095c34caa60b4122e2cf4d6b1402508e3 (diff) | |
added message catalog support
Diffstat (limited to 'chess-ics.el')
| -rw-r--r-- | chess-ics.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chess-ics.el b/chess-ics.el index 3df958c..2ca62a2 100644 --- a/chess-ics.el +++ b/chess-ics.el @@ -161,6 +161,12 @@ who is black." (funcall chess-engine-response-handler 'match (match-string 1))))))) +(chess-message-catalog 'english + '((ics-server-prompt . "Connect to chess server: ") + (ics-connecting . "Connecting to Internet Chess Server '%s'...") + (ics-connected . "Connecting to Internet Chess Server '%s'...done") + (challenge-whom . "Whom would you like challenge? "))) + (defun chess-ics-handler (event &rest args) (cond ((eq event 'initialize) @@ -169,20 +175,19 @@ who is black." (let ((server (if (= (length chess-ics-server-list) 1) (car chess-ics-server-list) - (assoc (completing-read "Connect to chess server: " + (assoc (completing-read (chess-string 'ics-server-prompt) chess-ics-server-list nil t (caar chess-ics-server-list)) chess-ics-server-list)))) - (message "Connecting to Internet Chess Server '%s'..." (car server)) + (chess-message 'ics-connecting (car server)) (let ((buf (apply 'make-comint "chess-ics" (if (nth 3 server) (cons (nth 4 server) (nth 5 server)) (list (cons (nth 0 server) (nth 1 server))))))) - (message "Connecting to Internet Chess Server '%s'...done" - (car server)) + (chess-message 'ics-connected (car server)) (display-buffer buf) (set-buffer buf) @@ -210,8 +215,9 @@ who is black." ((eq event 'match) (setq chess-engine-pending-offer 'match) - (chess-engine-send nil (format "match %s\n" - (read-string "Whom would you like challenge? ")))) + (chess-engine-send + nil (format "match %s\n" + (read-string (chess-string 'challenge-whom))))) ((eq event 'move) (unless chess-ics-ensure-ics12 |
