From: ueno Date: Tue, 27 May 2008 09:14:18 +0000 (+0000) Subject: (riece-addon-modules): Translate add-on X-Git-Tag: riece-5_0_0~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf325a4a065eaaf33613a84756353e9b4a20821;p=elisp%2Friece.git (riece-addon-modules): Translate add-on description. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c26389..132e0d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-05-27 Daiki Ueno + * riece-addon-modules.el (riece-addon-modules): Translate add-on + description. + * riece-menu.el (riece-menu-items): Define with defcustom; use riece-mcat to translate menu labels; bind riece-command-configure-windows. diff --git a/lisp/riece-addon-modules.el b/lisp/riece-addon-modules.el index 103a8fb..017cc3a 100644 --- a/lisp/riece-addon-modules.el +++ b/lisp/riece-addon-modules.el @@ -1,40 +1,80 @@ +(require 'riece-mcat) + (defconst riece-addon-modules - '((riece-alias . "Define aliases for IRC names.") - (riece-async . "Connect to IRC server via async proxy.") - (riece-biff . "Be notified if messages arrives.") - (riece-button . "Display useful buttons in IRC buffers.") - (riece-ctcp . "CTCP (Client To Client Protocol) support.") - (riece-ctlseq . "Mark up control sequences in IRC buffers.") - (riece-doctor . "Pretend to be a psychotherapist.") - (riece-epg . "Encrypt/decrypt messages.") - (riece-eval-ruby . "Evaluate input string as a Ruby program.") - (riece-eval . "Evaluate an input string as an elisp form.") - (riece-foolproof . "Prevent miss-operation in the command buffer.") - (riece-google . "Search keywords by Google.") - (riece-guess . "Guess the next channel, using multiple methods.") - (riece-hangman . "Allow channel members to play the hangman game.") - (riece-highlight . "Highlight IRC buffers.") - (riece-history . "Manage history of channel shifting.") - (riece-icon . "Display icons in IRC buffers.") - (riece-ignore . "Ignore messages from some users.") - (riece-kakasi . "Convert Japanese to roman string by KAKASI.") - (riece-keepalive . "Keep an IRC connection.") - (riece-keyword . "Detect keywords in IRC buffers.") - (riece-log . "Save IRC logs.") - (riece-lsdb . "Help register nicknames in LSDB rolodex program.") - (riece-mcat . "Translate messages.") - (riece-menu . "Setup Riece's command menus.") - (riece-mini . "Use Riece only on the minibuffer.") - ;;(riece-ndcc . "DCC file sending protocol support (written in elisp.)") - (riece-rdcc . "DCC file sending protocol support (written in Ruby.)") - (riece-shrink-buffer . "Free old IRC messages to save memory usage.") - (riece-skk-kakutei . "Remove SKK's preedit mark before sending messages.") - (riece-toolbar . "Display toolbar icons.") - (riece-twitter . "Send your status to Twitter.") - (riece-unread . "Mark channels where new messages arrived.") - (riece-url . "Collect URL in IRC buffers.") - (riece-xface . "Display X-Face in IRC buffers.") - (riece-xfaceb . "Display X-Face & Colour Face images in IRC buffers \(BBDB\).") - (riece-yank . "Enter the element of kill-ring."))) + (list + (cons 'riece-alias + (riece-mcat "Define aliases for IRC names.")) + (cons 'riece-async + (riece-mcat "Connect to IRC server via async proxy.")) + (cons 'riece-biff + (riece-mcat "Be notified if messages arrives.")) + (cons 'riece-button + (riece-mcat "Display useful buttons in IRC buffers.")) + (cons 'riece-ctcp + (riece-mcat "CTCP (Client To Client Protocol) support.")) + (cons 'riece-ctlseq + (riece-mcat "Mark up control sequences in IRC buffers.")) + (cons 'riece-doctor + (riece-mcat "Pretend to be a psychotherapist.")) + (cons 'riece-epg + (riece-mcat "Encrypt/decrypt messages.")) + (cons 'riece-eval-ruby + (riece-mcat "Evaluate input string as a Ruby program.")) + (cons 'riece-eval + (riece-mcat "Evaluate an input string as an elisp form.")) + (cons 'riece-foolproof + (riece-mcat "Prevent miss-operation in the command buffer.")) + (cons 'riece-google + (riece-mcat "Search keywords by Google.")) + (cons 'riece-guess + (riece-mcat "Guess the next channel, using multiple methods.")) + (cons 'riece-hangman + (riece-mcat "Allow channel members to play the hangman game.")) + (cons 'riece-highlight + (riece-mcat "Highlight IRC buffers.")) + (cons 'riece-history + (riece-mcat "Manage history of channel shifting.")) + (cons 'riece-icon + (riece-mcat "Display icons in IRC buffers.")) + (cons 'riece-ignore + (riece-mcat "Ignore messages from some users.")) + (cons 'riece-kakasi + (riece-mcat "Convert Japanese to roman string by KAKASI.")) + (cons 'riece-keepalive + (riece-mcat "Keep an IRC connection.")) + (cons 'riece-keyword + (riece-mcat "Detect keywords in IRC buffers.")) + (cons 'riece-log + (riece-mcat "Save IRC logs.")) + (cons 'riece-lsdb + (riece-mcat "Help register nicknames in LSDB rolodex program.")) + (cons 'riece-mcat + (riece-mcat "Translate messages.")) + (cons 'riece-menu + (riece-mcat "Setup Riece's command menus.")) + (cons 'riece-mini + (riece-mcat "Use Riece only on the minibuffer.")) +;;; (cons 'riece-ndcc +;;; (riece-mcat "DCC file sending protocol support (written in elisp.)")) + (cons 'riece-rdcc + (riece-mcat "DCC file sending protocol support (written in Ruby.)")) + (cons 'riece-shrink-buffer + (riece-mcat "Free old IRC messages to save memory usage.")) + (cons 'riece-skk-kakutei + (riece-mcat "Remove SKK's preedit mark before sending messages.")) + (cons 'riece-toolbar + (riece-mcat "Display toolbar icons.")) + (cons 'riece-twitter + (riece-mcat "Send your status to Twitter.")) + (cons 'riece-unread + (riece-mcat "Mark channels where new messages arrived.")) + (cons 'riece-url + (riece-mcat "Collect URL in IRC buffers.")) + (cons 'riece-xface + (riece-mcat "Display X-Face in IRC buffers.")) + (cons 'riece-xfaceb + (riece-mcat "Display X-Face & Colour Face images in IRC buffers \(BBDB\).")) + (cons 'riece-yank + (riece-mcat "Enter the element of kill-ring.")))) (provide 'riece-addon-modules) \ No newline at end of file diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index 3fac57f..1402af9 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -335,7 +335,7 @@ All normal editing commands are turned off." (cons (cons (car (car pointer)) (if (and description (boundp description)) - (symbol-value description) + (riece-mcat (symbol-value description)) (riece-mcat "(no description)"))) module-description-alist) pointer (cdr pointer))) @@ -344,7 +344,8 @@ All normal editing commands are turned off." (unless (assq (car (car pointer)) module-description-alist) (setq module-description-alist - (cons (car pointer) module-description-alist))) + (cons (cons (car (car pointer)) (riece-mcat (cdr (car pointer)))) + module-description-alist))) (setq pointer (cdr pointer))) (erase-buffer) (riece-kill-all-overlays) diff --git a/lisp/riece-mcat-japanese.el b/lisp/riece-mcat-japanese.el index e1831db..63a32f7 100644 --- a/lisp/riece-mcat-japanese.el +++ b/lisp/riece-mcat-japanese.el @@ -62,10 +62,13 @@ ("Add-on %S is uninstalled" . "アドオン %S が除外されました") ("Add-on %S is unloaded" . "アドオン %S がアンロードされました") ("Add-on: " . "アドオン: ") + ("Allow channel members to play the hangman game." . "チャンネルの参加者がハングマンで遊べるようになります") ("Already registered" . "登録済みです") ("Away message: " . "離席のメッセージ: ") ("Ban pattern: " . "立入禁止パターン: ") + ("Be notified if messages arrives." . "メッセージが届くと通知されます") ("Beginning of buffer" . "バッファの先頭です") + ("CTCP (Client To Client Protocol) support." . "CTCP (Client To Client Protocol) 対応") ("CTCP CLIENTINFO for %s (%s) = %s" . "%s (%s) の CTCP CLIENTINFO = %s") ("CTCP CLIENTINFO from %s (%s) to %s" . "%s (%s) が %s に CTCP CLIENTINFO") ("CTCP PING for %s (%s) = %d sec" . "%s (%s) の CTCP PING = %d 秒") @@ -84,23 +87,43 @@ ("Channels" . "チャンネル一覧") ("Close Server" . "サーバとの接続を閉じる") ("Close server: " . "接続を閉じるサーバ: ") + ("Collect URL in IRC buffers." . "バッファに出てきた URL を集めます") ("Command to execute on \"%s\":" . "\"%s\" で実行するコマンド: ") + ("Connect to IRC server via async proxy." . "接続切れを防ぐために外部のプロセス (aproxy.rb) を介して IRC サーバに接続します") ("Connecting to %s..." . "%s に接続しています...") ("Connecting to %s...done" . "%s に接続しています...完了") ("Connecting to %s...failed: %S" . "%s に接続しています...失敗: %S") ("Connecting to IRC server..." . "IRC サーバに接続しています...") ("Connecting to IRC server...done" . "IRC サーバに接続しています...完了") ("Connecting to IRC server...failed: %S" . "IRC サーバに接続しています...失敗: %S") + ("Convert Japanese to roman string by KAKASI." . "KAKASI を用いて日本語をローマ字に変換します") ("Created on %s\n" . "%s に作成されました\n") + ("DCC file sending protocol support (written in Ruby.)" . "DCC ファイル転送 (Ruby による実装)") + ("Define aliases for IRC names." . "ニックネームやチャンネル名の別名定義") + ("Detect keywords in IRC buffers." . "バッファに出てきたキーワードの検出") ("Display Channel Buffer" . "チャンネルバッファの表示") ("Display Channel List Buffer" . "チャンネル一覧バッファの表示") ("Display User List Buffer" . "ユーザ一覧バッファの表示") + ("Display X-Face & Colour Face images in IRC buffers (BBDB)." . "X-Face や色付きの Face 画像を表示 (BBDB 利用)") + ("Display X-Face in IRC buffers." . "X-Face や色付き Face 画像を表示 (LSDB 利用)") + ("Display icons in IRC buffers." . "アイコンを表示") + ("Display toolbar icons." . "ツールバーのアイコンを表示") + ("Display useful buttons in IRC buffers." . "ボタンを表示") + ("Encrypt/decrypt messages." . "メッセージの暗号化・復号") ("End of buffer" . "バッファの終端です") + ("Enter the element of kill-ring." . "kill-ring から一行発言") ("Erroneous nickname \"%s\". Choose a new one: " . "不正なニックネーム \"%s\"。新しいニックネーム: ") + ("Evaluate an input string as an elisp form." . "入力行を Elisp の式として評価") + ("Evaluate input string as a Ruby program." . "入力行を Ruby の式として評価") ("File: " . "ファイル: ") ("Finger user: " . "身元を調べるユーザ: ") + ("Free old IRC messages to save memory usage." . "古いメッセージを消去してメモリ消費を減らす") ("Freeze Channel Buffer" . "チャンネルバッファのフリーズ") ("Freeze Channel Buffer Until Next Message" . "メッセージが来るまでチャンネルバッファをフリーズ") + ("Guess the next channel, using multiple methods." . "複数の方法で移動先のチャンネルを予測") + ("Help register nicknames in LSDB rolodex program." . "LSDB 住所録にニックネームを登録") + ("Highlight IRC buffers." . "バッファの色付け") + ("Ignore messages from some users." . "指定したユーザからのメッセージを無視") ("Invite User" . "ユーザを招待する") ("Invite user: " . "招待するユーザ: ") ("Inviting %s\n" . "%s を招待しています\n") @@ -108,6 +131,7 @@ ("Join Channel" . "チャンネルに参加する") ("Join channel/user (default %s): " . "参加するチャンネルまたはユーザ (既定値 %s): ") ("Join channel/user: " . "参加するチャンネルまたはユーザ: ") + ("Keep an IRC connection." . "接続を維持") ("Key for %s: " . "%s のキー: ") ("Key for %s: Quit" . "%s のキー: 中止") ("Kick User" . "ユーザを蹴り出す") @@ -119,7 +143,10 @@ ("Logging in to IRC server..." . "IRC サーバにログインしています...") ("Logging in to IRC server...done" . "IRC サーバにログインしています...完了") ("Manage Add-ons" . "アドオンの管理") + ("Manage history of channel shifting." . "チャンネル移動の履歴") ("Mark As Away" . "離席状態にする") + ("Mark channels where new messages arrived." . "新しいメッセージが届いたチャンネルをマーク") + ("Mark up control sequences in IRC buffers." . "コントロールシーケンスによる色付け") ("Message to user: " . "ユーザへのメッセージ: ") ("Message: " . "メッセージ") ("Mode (? for help)" . "モード (ヘルプは ?)") @@ -148,6 +175,8 @@ ("Password incorrect from %s." . "%s のパスワードが不正です。") ("Password: " . "パスワード: ") ("Password: Quit" . "パスワード: 中止") + ("Pretend to be a psychotherapist." . "心理療法士になりすます") + ("Prevent miss-operation in the command buffer." . "コマンドバッファでの誤操作を防ぐ") ("Previous Channel" . "前のチャンネル") ("Quit IRC" . "IRC をやめる") ("Really quit IRC? " . "本当に IRC をやめますか? ") @@ -159,9 +188,13 @@ ("Recent messages of the day:\n" . "最近のメッセージ (今日中):\n") ("Recent messages up to %d lines:\n" . "最近のメッセージ (%d 行まで):\n") ("Redraw Layout" . "画面の再描画") + ("Remove SKK's preedit mark before sending messages." . "SKK の変換前文字列を送らないようにする") + ("Save IRC logs." . "ログを保存") ("Save as (default %s) " . "保存先 (既定値 %s) ") ("Saving %s..." . "%s を保存しています...") ("Saving %s...done" . "%s を保存しています...完了") + ("Search keywords by Google." . "キーワードを Google で検索") + ("Send your status to Twitter." . "Twitter にステータス情報を送る") ("Sending %s...(%s/%d)" . "%s を送信中...(%s/%d)") ("Sending %s...done" . "%s を送信中...完了") ("Sending QUIT to \"%s\"..." . "\"%s\" に QUIT を送信しています...") @@ -174,6 +207,7 @@ ("Set +v for users" . "+v するユーザ") ("Set Channel Topic" . "チャンネルのトピック") ("Set topic: " . "新しいトピック: ") + ("Setup Riece's command menus." . "メニューバーの利用") ("Submit Bug Report" . "バグを報告") ("Switch To Channel" . "チャンネルを移動") ("Switch to channel/user: " . "移動先のチャンネルまたはユーザ: ") @@ -183,11 +217,13 @@ ("Topic for %s: %s" . "%s のトピック: ") ("Topic on %s by %s: %s" . "%s のトピックが %s により設定されました: %s") ("Topic: " . "トピック: ") + ("Translate messages." . "メッセージの翻訳") ("Type \\[describe-mode] for help" . "ヘルプを見るには \\[describe-mode]") ("Type \\[riece-command-dcc-receive] to receive" . "受信するには \\[riece-command-dcc-receive]") ("Type \\[riece-command-join] to join the channel" . "チャンネルに参加するには \\[riece-command-join]") ("Unset +o for users" . "-o するユーザ") ("Unset +v for users" . "-v するユーザ") + ("Use Riece only on the minibuffer." . "ミニバッファだけで Riece を使う") ("User: " . "ユーザ: ") ("Version" . "バージョン") ("WHO pattern: " . "WHO のパターン: ") diff --git a/lisp/riece-mcat.el b/lisp/riece-mcat.el index a2573cd..7f303a4 100644 --- a/lisp/riece-mcat.el +++ b/lisp/riece-mcat.el @@ -40,7 +40,9 @@ (defun riece-mcat-extract-from-form (form) (if (and form (listp form) (listp (cdr form))) - (if (eq (car form) 'riece-mcat) + (if (and (= (length form) 2) + (eq (car form) 'riece-mcat) + (stringp (car (cdr form)))) (cdr form) (delq nil (apply #'nconc (mapcar #'riece-mcat-extract-from-form form))))))