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-common.el | |
| parent | f4639c9095c34caa60b4122e2cf4d6b1402508e3 (diff) | |
added message catalog support
Diffstat (limited to 'chess-common.el')
| -rw-r--r-- | chess-common.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chess-common.el b/chess-common.el index 66a4b99..f468dca 100644 --- a/chess-common.el +++ b/chess-common.el @@ -21,6 +21,13 @@ (put 'chess-with-temp-file 'lisp-indent-function 1) +(chess-message-catalog 'english + '((starting-engine . "Starting chess program '%s'...") + (starting-engine-done . "Starting chess program '%s'...done") + (could-not-find-engine . "Cannot find %s executable; check `%s'") + (draw-offer-declined . "Your draw offer was declined") + (illegal-move . "Illegal move"))) + (defun chess-common-handler (event &rest args) "Initialize the network chess engine." (cond @@ -28,12 +35,12 @@ (let* ((name (car args)) (path (intern (concat "chess-" name "-path"))) proc) - (message "Starting chess program '%s'..." name) + (chess-message 'starting-engine name) (unless (boundp path) - (error "Cannot find %s executable; check `%s'" name path)) + (chess-error 'could-not-find-engine name path)) (setq proc (start-process (concat "chess-" name) (current-buffer) (symbol-value path))) - (message "Starting chess program '%s'...done" name) + (chess-message 'starting-engine-done name) proc)) ((eq event 'ready) @@ -53,7 +60,7 @@ (chess-engine-send nil "resign\n")) ((eq event 'draw) - (message "Your draw offer was declined")) + (chess-message 'draw-offer-declined)) ((memq event '(resign abort)) (chess-engine-send nil "new\n") |
