From: ueno Date: Tue, 27 May 2008 06:47:25 +0000 (+0000) Subject: * riece-menu.el (riece-menu-items): Define with defcustom; use X-Git-Tag: riece-5_0_0~22 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc84a8c76950580bda2a23cd08a37b55ffa0ba3c;p=elisp%2Friece.git * riece-menu.el (riece-menu-items): Define with defcustom; use riece-mcat to translate menu labels. (riece-menu-requires): Depend on riece-mcat. (riece-menu-insinuate): Re-evaluate riece-menu-items. * riece-url.el (riece-url-command-mode-hook): Translate "Open URL...". --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20c79ff..e8df213 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2008-05-27 Daiki Ueno + * riece-menu.el (riece-menu-items): Define with defcustom; use + riece-mcat to translate menu labels. + (riece-menu-requires): Depend on riece-mcat. + (riece-menu-insinuate): Re-evaluate riece-menu-items. + + * riece-url.el (riece-url-command-mode-hook): Translate "Open URL...". + +2008-05-27 Daiki Ueno + * riece-display.el (riece-update-status-indicators): Don't update riece-user-indicator if riece-real-nickname is not fixed. diff --git a/lisp/riece-mcat-japanese.el b/lisp/riece-mcat-japanese.el index 42375ae..3fd8020 100644 --- a/lisp/riece-mcat-japanese.el +++ b/lisp/riece-mcat-japanese.el @@ -76,9 +76,13 @@ ("CTCP VERSION for %s (%s) = %s" . "%s (%s) の CTCP VERSION = %s") ("CTCP VERSION from %s (%s) to %s" . "%s (%s) が %s に CTCP VERSION") ("Can't find completion for \"%s\"" . "\"%s\" に対する補完が見つかりません") + ("Change Nickname" . "ニックネームを変更") + ("Change Window Layout..." . "ウィンドウレイアウトを変更...") ("Change layout: " . "変更後のレイアウト: ") ("Change mode for channel/user: " . "モードを変更するチャンネルまたはユーザ: ") ("Channel/User: " . "チャンネルまたはユーザ: ") + ("Channels" . "チャンネル一覧") + ("Close Server" . "サーバとの接続を閉じる") ("Close server: " . "接続を閉じるサーバ: ") ("Command to execute on \"%s\":" . "\"%s\" で実行するコマンド: ") ("Connecting to %s..." . "%s に接続しています...") @@ -88,23 +92,33 @@ ("Connecting to IRC server...done" . "IRC サーバに接続しています...完了") ("Connecting to IRC server...failed: %S" . "IRC サーバに接続しています...失敗: %S") ("Created on %s\n" . "%s に作成されました\n") + ("Display Channel Buffer" . "チャンネルバッファの表示") + ("Display Channel List Buffer" . "チャンネル一覧バッファの表示") + ("Display User List Buffer" . "ユーザ一覧バッファの表示") ("End of buffer" . "バッファの終端です") ("Erroneous nickname \"%s\". Choose a new one: " . "不正なニックネーム \"%s\"。新しいニックネーム: ") ("File: " . "ファイル: ") ("Finger user: " . "身元を調べるユーザ: ") + ("Freeze Channel Buffer" . "チャンネルバッファのフリーズ") + ("Freeze Channel Buffer Until Next Message" . "メッセージが来るまでチャンネルバッファをフリーズ") + ("Invite User" . "ユーザを招待する") ("Invite user: " . "招待するユーザ: ") ("Inviting %s\n" . "%s を招待しています\n") ("Inviting %s to %s" . "%s を %s に招待しています") + ("Join Channel" . "チャンネルに参加する") ("Join channel/user (default %s): " . "参加するチャンネルまたはユーザ (既定値 %s): ") ("Join channel/user: " . "参加するチャンネルまたはユーザ: ") ("Key for %s: " . "%s のキー: ") ("Key for %s: Quit" . "%s のキー: 中止") + ("Kick User" . "ユーザを蹴り出す") ("Kick user: " . "蹴り出すユーザ: ") ("LIST pattern: " . "LIST のパターン: ") + ("List Channel" . "チャンネルを調べる") ("Logging in to %s..." . "%s にログインしています...") ("Logging in to %s...done" . "%s にログインしています...完了") ("Logging in to IRC server..." . "IRC サーバにログインしています...") ("Logging in to IRC server...done" . "IRC サーバにログインしています...完了") + ("Mark As Away" . "離席状態にする") ("Message to user: " . "ユーザへのメッセージ: ") ("Message: " . "メッセージ") ("Mode (? for help)" . "モード (ヘルプは ?)") @@ -113,6 +127,7 @@ ("Mode on %s by %s: %s" . "%s のモードが %s により設定されました: %s") ("Mode: " . "モード: ") ("NAMES pattern: " . "NAMES のパターン: ") + ("Next Channel" . "次のチャンネル") ("Nickname \"%s\" already in use. Choose a new one: " . "ニックネーム \"%s\" は既に使用されています。新しいニックネーム: ") ("No changes made. Save anyway? " . "変更がありませんが、保存しますか? ") ("No channel" . "チャンネルなし") @@ -121,13 +136,19 @@ ("No text to send" . "送信するテキストがありません") ("None" . "なし") ("Online: " . "オンライン: ") + ("Open Server" . "サーバに接続") + ("Open URL..." . "URL を開く...") + ("Open URL: " . "開く URL: ") ("Open server: " . "接続するサーバ: ") + ("Part Channel" . "チャンネルから離脱する") ("Part from channel/user (default %s): " . "離脱するチャンネルまたはユーザ (既定値 %s): ") ("Password for %s: " . "%s のパスワード: ") ("Password for %s: Quit" . "%s のパスワード: 中止") ("Password incorrect from %s." . "%s のパスワードが不正です。") ("Password: " . "パスワード: ") ("Password: Quit" . "パスワード: 中止") + ("Previous Channel" . "前のチャンネル") + ("Quit IRC" . "IRC をやめる") ("Really quit IRC? " . "本当に IRC をやめますか? ") ("Really want to query LIST without argument? " . "本当に引数なしの LIST を発行しますか? ") ("Really want to query NAMES without argument? " . "本当に引数なしの NAMES を発行しますか? ") @@ -146,11 +167,16 @@ ("Sending QUIT..." . "QUIT を送信しています...") ("Sending QUIT...done" . "QUIT を送信しています...完了") ("Server: " . "サーバ: ") + ("Servers" . "サーバ一覧") ("Set +o for users" . "+o するユーザ") ("Set +v for users" . "+v するユーザ") + ("Set Channel Topic" . "チャンネルのトピック") ("Set topic: " . "新しいトピック: ") + ("Submit Bug Report" . "バグを報告") + ("Switch To Channel" . "チャンネルを移動") ("Switch to channel/user: " . "移動先のチャンネルまたはユーザ: ") ("Switch to number: " . "移動先の番号: ") + ("Toggle..." . "トグル...") ("Topic by %s: %s\n" . "%s によるトピック設定: %s\n") ("Topic for %s: %s" . "%s のトピック: ") ("Topic on %s by %s: %s" . "%s のトピックが %s により設定されました: %s") @@ -161,6 +187,7 @@ ("Unset +o for users" . "-o するユーザ") ("Unset +v for users" . "-v するユーザ") ("User: " . "ユーザ: ") + ("Version" . "バージョン") ("WHO pattern: " . "WHO のパターン: ") ("[Available modes: " . "[使用可能なモード: ") ("days" . "日") diff --git a/lisp/riece-menu.el b/lisp/riece-menu.el index 4368f16..0763d55 100644 --- a/lisp/riece-menu.el +++ b/lisp/riece-menu.el @@ -1,4 +1,4 @@ -;;; riece-menu.el --- setup Riece's command menus +;;; riece-menu.el --- setup menus ;; Copyright (C) 1998-2003 Daiki Ueno ;; Author: Daiki Ueno @@ -33,40 +33,54 @@ (require 'riece-identity) (require 'riece-layout) (require 'riece-server) - -(defvar riece-menu-items - `("Riece" - ["Version" riece-version t] - ["Submit Bug Report" riece-submit-bug-report t] - "----" - ("Change Window Layout..." :filter riece-menu-create-layouts-menu) - ["Toggle Freeze Channel Buffer" - riece-command-toggle-freeze t] - ["Toggle Freeze Channel Buffer Until Next Message" - riece-command-toggle-own-freeze t] - ["Toggle Display Channel Buffer" - riece-command-toggle-channel-buffer-mode t] - ["Toggle Display Channel List Buffer" - riece-command-toggle-channel-list-buffer-mode t] - ["Toggle Display User List Buffer" - riece-command-toggle-user-list-buffer-mode t] - "----" - ["Join Channel" riece-command-join t] - ["Change Nickname" riece-command-change-nickname t] - ["Mark As Away" riece-command-toggle-away t] - ["Quit IRC" riece-command-quit t] - "----" - ["Part Channel" riece-command-part riece-current-channel] - ["Set Channel Topic" riece-command-topic riece-current-channel] - ["Kick User" riece-command-kick riece-current-channel] - ["Invite User" riece-command-invite riece-current-channel] - "----" - ["Next Channel" riece-command-next-channel riece-current-channels] - ["Previous Channel" riece-command-previous-channel riece-current-channels] - "----" - ("Channels" :filter riece-menu-create-channels-menu) - ("Servers" :filter riece-menu-create-servers-menu)) - "Menu used in command mode.") +(require 'riece-mcat) + +(defcustom riece-menu-items + (list + "Riece" + (vector (riece-mcat "Next Channel") 'riece-command-next-channel + 'riece-current-channels) + (vector (riece-mcat "Previous Channel") 'riece-command-previous-channel + 'riece-current-channels) + "----" + (list (riece-mcat "Channels") + :filter 'riece-menu-create-channels-menu) + (list (riece-mcat "Servers") + :filter 'riece-menu-create-servers-menu) + "----" + (list (riece-mcat "Change Window Layout...") + :filter 'riece-menu-create-layouts-menu) + (list (riece-mcat "Toggle...") + (vector (riece-mcat "Freeze Channel Buffer") + 'riece-command-toggle-freeze t) + (vector (riece-mcat "Freeze Channel Buffer Until Next Message") + 'riece-command-toggle-own-freeze t) + (vector (riece-mcat "Display Channel Buffer") + 'riece-command-toggle-channel-buffer-mode t) + (vector (riece-mcat "Display Channel List Buffer") + 'riece-command-toggle-channel-list-buffer-mode t) + (vector (riece-mcat "Display User List Buffer") + 'riece-command-toggle-user-list-buffer-mode t)) + "----" + (vector (riece-mcat "Join Channel") 'riece-command-join t) + (vector (riece-mcat "Part Channel") 'riece-command-part + 'riece-current-channel) + (vector (riece-mcat "Set Channel Topic") 'riece-command-topic + 'riece-current-channel) + (vector (riece-mcat "Kick User") 'riece-command-kick + 'riece-current-channel) + (vector (riece-mcat "Invite User") 'riece-command-invite + 'riece-current-channel) + "----" + (vector (riece-mcat "Version") 'riece-version t) + (vector (riece-mcat "Submit Bug Report") 'riece-submit-bug-report t) + "----" + (vector (riece-mcat "Mark As Away") 'riece-command-toggle-away t) + (vector (riece-mcat "Change Nickname") 'riece-command-change-nickname t) + (vector (riece-mcat "Quit IRC") 'riece-command-quit t)) + "Menu used in command mode." + :type 'sexp + :group 'riece-options) (defconst riece-menu-description "Setup Riece's command menus.") @@ -80,11 +94,11 @@ (defun riece-menu-create-channels-menu (menu) (mapcar (lambda (channel) (list (riece-format-identity channel) - (vector "Switch To Channel" + (vector (riece-mcat "Switch To Channel") (list 'riece-command-switch-to-channel channel) t) - (vector "Part Channel" + (vector (riece-mcat "Part Channel") (list 'riece-command-part channel) t) - (vector "List Channel" + (vector (riece-mcat "List Channel") (list 'riece-command-list (riece-identity-prefix channel)) t))) riece-current-channels)) @@ -92,10 +106,10 @@ (defun riece-menu-create-servers-menu (menu) (mapcar (lambda (entry) (list (car entry) - (vector "Open Server" + (vector (riece-mcat "Open Server") (list 'riece-command-open-server (car entry)) (not (riece-server-opened (car entry)))) - (vector "Close Server" + (vector (riece-mcat "Close Server") (list 'riece-command-close-server (car entry)) (riece-server-opened (car entry))))) riece-server-alist)) @@ -110,7 +124,12 @@ riece-menu-items) (easy-menu-add riece-menu)) +(defun riece-menu-requires () + (if (memq 'riece-mcat riece-addons) + '(riece-mcat))) + (defun riece-menu-insinuate () + (custom-reevaluate-setting 'riece-menu-items) (if riece-command-buffer (with-current-buffer riece-command-buffer (riece-menu-command-mode-hook))) diff --git a/lisp/riece-url.el b/lisp/riece-url.el index 1c2f4dd..34a9aca 100644 --- a/lisp/riece-url.el +++ b/lisp/riece-url.el @@ -105,7 +105,8 @@ This maps a string \"Bug#12345\" to a URL (defun riece-command-browse-url (&optional url) (interactive - (list (completing-read "Open URL: " (mapcar #'list riece-urls)))) + (list (completing-read (riece-mcat "Open URL: ") + (mapcar #'list riece-urls)))) (browse-url url)) (defun riece-url-create-menu (menu) @@ -124,7 +125,7 @@ This maps a string \"Bug#12345\" to a URL (defun riece-url-command-mode-hook () (easy-menu-add-item nil (list (car riece-menu-items)) - '("Open URL..." :filter riece-url-create-menu))) + (list (riece-mcat "Open URL...") :filter 'riece-url-create-menu))) (defun riece-url-insinuate () (add-hook 'riece-after-insert-functions 'riece-url-scan-region) @@ -136,7 +137,7 @@ This maps a string \"Bug#12345\" to a URL (defun riece-url-uninstall () (easy-menu-remove-item nil (list (car riece-menu-items)) - "Open URL...") + (riece-mcat "Open URL...")) (remove-hook 'riece-after-insert-functions 'riece-url-scan-region) (remove-hook 'riece-command-mode-hook 'riece-url-command-mode-hook))