;;; Code:
(defconst riece-mcat-japanese-alist
- '(("%S: switch to %s; down-mouse-3: more options" . "%S: %s \e$B$K0\F0\e(B; down-mouse-3: \e$B$=$NB>$N%*%W%7%g%s\e(B")
+ '(("%2d: %s %s (%d bytes)\n" . "%2d: %s %s (%d \e$B%P%$%H\e(B)\n")
+ ("%S: switch to %s; down-mouse-3: more options" . "%S: %s \e$B$K0\F0\e(B; down-mouse-3: \e$B$=$NB>$N%*%W%7%g%s\e(B")
("%d users on %s: " . "%d \e$B?M$,\e(B %s \e$B$K$$$^$9\e(B: ")
("%d users: " . "%d \e$B?M\e(B: ")
("%s (%s) has joined %s" . "%s (%s) \e$B$,\e(B %s \e$B$K;22C$7$^$7$?\e(B")
("Created on %s\n" . "%s \e$B$K:n@.$5$l$^$7$?\e(B\n")
("End of buffer" . "\e$B%P%C%U%!$N=*C<$G$9\e(B")
("Erroneous nickname \"%s\". Choose a new one: " . "\e$BIT@5$J%K%C%/%M!<%`\e(B \"%s\"\e$B!#?7$7$$%K%C%/%M!<%`\e(B: ")
+ ("File: " . "\e$B%U%!%$%k\e(B: ")
("Finger user: " . "\e$B?H85$rD4$Y$k%f!<%6\e(B: ")
("Invite user: " . "\e$B>7BT$9$k%f!<%6\e(B: ")
("Inviting %s\n" . "%s \e$B$r>7BT$7$F$$$^$9\e(B\n")
("Really want to query LIST without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B LIST \e$B$rH/9T$7$^$9$+\e(B? ")
("Really want to query NAMES without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B NAMES \e$B$rH/9T$7$^$9$+\e(B? ")
("Really want to query WHO without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B WHO \e$B$rH/9T$7$^$9$+\e(B? ")
+ ("Receiving %s from %s...(%s/%s)" . "%s \e$B$r\e(B %s \e$B$+$i<u?.Cf\e(B...(%s/%s)")
+ ("Receiving %s from %s...done" . "%s \e$B$r\e(B %s \e$B$+$i<u?.Cf\e(B...\e$B40N;\e(B")
("Recent messages of the day:\n" . "\e$B:G6a$N%a%C%;!<%8\e(B (\e$B:#F|Cf\e(B):\n")
("Recent messages up to %d lines:\n" . "\e$B:G6a$N%a%C%;!<%8\e(B (%d \e$B9T$^$G\e(B):\n")
+ ("Save as (default %s) " . "\e$BJ]B8@h\e(B (\e$B4{DjCM\e(B %s) ")
+ ("Sending %s...(%s/%d)" . "%s \e$B$rAw?.Cf\e(B...(%s/%d)")
+ ("Sending %s...done" . "%s \e$B$rAw?.Cf\e(B...\e$B40N;\e(B")
("Sending QUIT to \"%s\"..." . "\"%s\" \e$B$K\e(B QUIT \e$B$rAw?.$7$F$$$^$9\e(B...")
("Sending QUIT to \"%s\"...done" . "\"%s\" \e$B$K\e(B QUIT \e$B$rAw?.$7$F$$$^$9\e(B...\e$B40N;\e(B")
("Sending QUIT..." . "QUIT \e$B$rAw?.$7$F$$$^$9\e(B...")
("Topic on %s by %s: %s" . "%s \e$B$N%H%T%C%/$,\e(B %s \e$B$K$h$j@_Dj$5$l$^$7$?\e(B: %s")
("Topic: " . "\e$B%H%T%C%/\e(B: ")
("Type \\[describe-mode] for help" . "\e$B%X%k%W$r8+$k$K$O\e(B \\[describe-mode]")
+ ("Type \\[riece-command-dcc-receive] to receive" . "\e$B<u?.$9$k$K$O\e(B \\[riece-command-dcc-receive]")
("Type \\[riece-command-join] to join the channel" . "\e$B%A%c%s%M%k$K;22C$9$k$K$O\e(B \\[riece-command-join]")
("Unset +o for users" . "-o \e$B$9$k%f!<%6\e(B")
("Unset +v for users" . "-v \e$B$9$k%f!<%6\e(B")
+ ("User: " . "\e$B%f!<%6\e(B: ")
("WHO pattern: " . "WHO \e$B$N%Q%?!<%s\e(B: ")
("[Available modes: " . "[\e$B;HMQ2DG=$J%b!<%I\e(B: ")
("days" . "\e$BF|\e(B")
(require 'riece-identity)
(require 'riece-ctcp) ;for riece-ctcp-additional-clientinfo
(require 'riece-ruby)
+(require 'riece-mcat)
(defgroup riece-rdcc nil
"DCC written in Ruby."
(riece-ruby-set-output-handler name #'riece-rdcc-output-handler-2))
(defun riece-rdcc-output-handler-2 (name output time)
- (message "Sending %s...(%s/%d)"
+ (message (riece-mcat "Sending %s...(%s/%d)")
(riece-ruby-property name 'riece-rdcc-request-file)
(string-to-number output)
(riece-ruby-property name 'riece-rdcc-request-size)))
(defun riece-rdcc-exit-handler (name)
- (message "Sending %s...done"
+ (message (riece-mcat "Sending %s...done")
(riece-ruby-property name 'riece-rdcc-request-file)))
(defun riece-command-dcc-send (user file)
(interactive
(let ((completion-ignore-case t))
(list (riece-completing-read-identity
- "User: "
+ (riece-mcat "User: ")
(riece-get-users-on-server (riece-current-server-name)))
- (expand-file-name (read-file-name "File: ")))))
+ (expand-file-name (read-file-name (riece-mcat "File: "))))))
(let ((name (riece-ruby-execute
(riece-ruby-substitute-variables
riece-rdcc-send-program
(logand (lsh riece-rdcc-received-size -16) 255)
(logand (lsh riece-rdcc-received-size -8) 255)
(logand riece-rdcc-received-size 255)))
- (message "Receiving %s from %s...(%s/%s)"
+ (message (riece-mcat "Receiving %s from %s...(%s/%s)")
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user
(riece-rdcc-format-size riece-rdcc-received-size)
(set-buffer (process-buffer process))
(unless (= riece-rdcc-received-size riece-rdcc-request-size)
(error "Premature end of file"))
- (message "Receiving %s from %s...done"
+ (message (riece-mcat "Receiving %s from %s...done")
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user)
(condition-case nil
(let ((requests riece-rdcc-requests)
(index 1))
(while requests
- (princ (format "%2d: %s %s (%d bytes)\n"
+ (princ (format (riece-mcat "%2d: %s %s (%d bytes)\n")
index
(car (car requests))
(nth 1 (car requests))
(list request
(expand-file-name
(read-file-name
- (concat "Save as (default "
- (file-name-nondirectory default-name) ") ")
+ (format (riece-mcat "Save as (default %s) ")
+ (file-name-nondirectory default-name))
(file-name-directory default-name)
default-name))))))
(let* ((temp-file (expand-file-name
(with-current-buffer (window-buffer (selected-window))
(substitute-command-keys
(format
- "Type \\[riece-command-dcc-receive] to receive"
+ (riece-mcat
+ "Type \\[riece-command-dcc-receive] to receive")
user))))
(riece-insert-change buffer (format "DCC SEND from %s: %s (%s)\n"
user file