# SOME DESCRIPTIVE TITLE. # This file is put in the public domain. # # Translators: # Anthony Fok , 2001 # Dalin , 2003 # Kevin Peng , 2000 # whyme , 2012 # Rongjun Mu , 2003 # Rongjun Mu , 2004 # Sarah Smith , 2003 # Walte , 2003 # Zong Yaotang , 2002 msgid "" msgstr "" "Project-Id-Version: HexChat\n" "Report-Msgid-Bugs-To: www.hexchat.org\n" "POT-Creation-Date: 2013-09-08 01:16-0400\n" "PO-Revision-Date: 2013-09-08 05:21+0000\n" "Last-Translator: TingPing \n" "Language-Team: Chinese (Taiwan) (http://www.transifex.com/projects/p/hexchat/language/zh_TW/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: zh_TW\n" "Plural-Forms: nplurals=1; plural=0;\n" #: src/common/cfgfiles.c:797 msgid "I'm busy" msgstr "我很忙" #: src/common/cfgfiles.c:828 msgid "Leaving" msgstr "暫離" #: src/common/dcc.c:72 msgid "Waiting" msgstr "等待" #: src/common/dcc.c:73 msgid "Active" msgstr "活躍" #: src/common/dcc.c:74 msgid "Failed" msgstr "失敗" #: src/common/dcc.c:75 msgid "Done" msgstr "完成" #: src/common/dcc.c:76 src/fe-gtk/menu.c:943 msgid "Connect" msgstr "連接" #: src/common/dcc.c:77 msgid "Aborted" msgstr "中止" #: src/common/dcc.c:1888 src/common/outbound.c:2518 #, c-format msgid "Cannot access %s\n" msgstr "無法存取 %s\n" #: src/common/dcc.c:1889 src/common/text.c:1339 src/common/text.c:1382 #: src/common/text.c:1393 src/common/text.c:1400 src/common/text.c:1413 #: src/common/text.c:1430 src/common/text.c:1535 src/common/util.c:368 msgid "Error" msgstr "錯誤" #: src/common/dcc.c:2367 #, c-format msgid "%s is offering \"%s\". Do you want to accept?" msgstr "%s 正在提供 \"%s\"。您要接收碼?" #: src/common/dcc.c:2584 msgid "No active DCCs\n" msgstr "沒有活躍的 DCC\n" #: src/common/hexchat.c:860 msgid "_Open Dialog Window" msgstr "" #: src/common/hexchat.c:861 msgid "_Send a File" msgstr "_傳送檔案" #: src/common/hexchat.c:862 msgid "_User Info (WhoIs)" msgstr "_使用者資訊 (Whois)" #: src/common/hexchat.c:863 msgid "_Add to Friends List" msgstr "" #: src/common/hexchat.c:864 msgid "_Ignore" msgstr "" #: src/common/hexchat.c:865 msgid "O_perator Actions" msgstr "" #: src/common/hexchat.c:867 msgid "Give Ops" msgstr "給 Op 權限" #: src/common/hexchat.c:868 msgid "Take Ops" msgstr "取消 Op 權限" #: src/common/hexchat.c:869 msgid "Give Voice" msgstr "給發言權" #: src/common/hexchat.c:870 msgid "Take Voice" msgstr "取消發言權" #: src/common/hexchat.c:872 msgid "Kick/Ban" msgstr "踢出/封禁" #: src/common/hexchat.c:873 src/common/hexchat.c:910 msgid "Kick" msgstr "踢出" #: src/common/hexchat.c:874 src/common/hexchat.c:875 src/common/hexchat.c:876 #: src/common/hexchat.c:877 src/common/hexchat.c:878 src/common/hexchat.c:909 #: src/fe-gtk/banlist.c:50 msgid "Ban" msgstr "封禁" #: src/common/hexchat.c:879 src/common/hexchat.c:880 src/common/hexchat.c:881 #: src/common/hexchat.c:882 msgid "KickBan" msgstr "踢出並封禁" #: src/common/hexchat.c:892 msgid "Leave Channel" msgstr "離開聊天室" #: src/common/hexchat.c:893 msgid "Join Channel..." msgstr "加入聊天室..." #: src/common/hexchat.c:894 src/fe-gtk/menu.c:1377 msgid "Enter Channel to Join:" msgstr "輸入要加入的聊天室:" #: src/common/hexchat.c:895 msgid "Server Links" msgstr "伺服器清單" #: src/common/hexchat.c:896 msgid "Ping Server" msgstr "ping 伺服器" #: src/common/hexchat.c:897 msgid "Hide Version" msgstr "隱藏版本資訊" #: src/common/hexchat.c:907 msgid "Op" msgstr "給管理員權限" #: src/common/hexchat.c:908 msgid "DeOp" msgstr "取消管理員權限" #: src/common/hexchat.c:911 msgid "bye" msgstr "道別" #: src/common/hexchat.c:912 #, c-format msgid "Enter reason to kick %s:" msgstr "輸入踢出 %s 的原因:" #: src/common/hexchat.c:913 msgid "Sendfile" msgstr "發送檔案" #: src/common/hexchat.c:914 msgid "Dialog" msgstr "對話" #: src/common/hexchat.c:923 msgid "WhoIs" msgstr "WhoIs" #: src/common/hexchat.c:924 msgid "Send" msgstr "發送" #: src/common/hexchat.c:925 msgid "Chat" msgstr "聊天" #: src/common/hexchat.c:926 src/fe-gtk/banlist.c:847 src/fe-gtk/dccgui.c:886 #: src/fe-gtk/ignoregui.c:385 src/fe-gtk/urlgrab.c:212 msgid "Clear" msgstr "清除" #: src/common/hexchat.c:927 msgid "Ping" msgstr "Ping" #: src/common/hexchat.c:1120 msgid "" "* Running IRC as root is stupid! You should\n" " create a User Account and use that to login.\n" msgstr "* 最好不要以 root 身分執行 IRC!您應該\n 建立一般使用者帳號來登入。\n" #: src/common/ignore.c:126 src/common/ignore.c:130 src/common/ignore.c:134 #: src/common/ignore.c:138 src/common/ignore.c:142 src/common/ignore.c:146 #: src/common/ignore.c:150 msgid "YES " msgstr "是 " #: src/common/ignore.c:128 src/common/ignore.c:132 src/common/ignore.c:136 #: src/common/ignore.c:140 src/common/ignore.c:144 src/common/ignore.c:148 #: src/common/ignore.c:152 msgid "NO " msgstr "否 " #: src/common/ignore.c:383 #, c-format msgid "You are being CTCP flooded from %s, ignoring %s\n" msgstr "您正受到來自 %s 的 CTCP flood 攻擊,忽略 %s\n" #: src/common/ignore.c:408 #, c-format msgid "You are being MSG flooded from %s, setting gui_autoopen_dialog OFF.\n" msgstr "" #: src/common/notify.c:555 #, c-format msgid " %-20s online\n" msgstr " %-20s 在線\n" #: src/common/notify.c:557 #, c-format msgid " %-20s offline\n" msgstr " %-20s 離線\n" #: src/common/outbound.c:72 msgid "No channel joined. Try /join #\n" msgstr "沒有加入任何聊天室。請嘗試 /join #\n" #: src/common/outbound.c:78 msgid "Not connected. Try /server []\n" msgstr "還未連接伺服器。請嘗試 /server []\n" #: src/common/outbound.c:281 #, c-format msgid "Server %s already exists on network %s.\n" msgstr "" #: src/common/outbound.c:287 #, c-format msgid "Added server %s to network %s.\n" msgstr "" #: src/common/outbound.c:372 #, c-format msgid "Already marked away: %s\n" msgstr "" #: src/common/outbound.c:410 msgid "Already marked back.\n" msgstr "" #: src/common/outbound.c:1790 msgid "I need /bin/sh to run!\n" msgstr "使用 /bin/sh 才能執行本程式!\n" #: src/common/outbound.c:2181 msgid "Commands Available:" msgstr "可用命令:" #: src/common/outbound.c:2195 msgid "User defined commands:" msgstr "使用者自訂命令:" #: src/common/outbound.c:2211 msgid "Plugin defined commands:" msgstr "使用者自訂命令:" #: src/common/outbound.c:2222 msgid "Type /HELP for more information, or /HELP -l" msgstr "請鍵入 /HELP 或者 /HELP -l 以獲取更多資訊" #: src/common/outbound.c:2306 #, c-format msgid "Unknown arg '%s' ignored." msgstr "忽略未知引數「%s」。" #: src/common/outbound.c:3007 src/common/outbound.c:3037 msgid "Quiet is not supported by this server." msgstr "" #: src/common/outbound.c:3488 src/common/outbound.c:3522 msgid "No such plugin found.\n" msgstr "找不到該外掛程式。\n" #: src/common/outbound.c:3493 src/fe-gtk/plugingui.c:204 msgid "That plugin is refusing to unload.\n" msgstr "無法卸載該外掛程式。\n" #: src/common/outbound.c:3804 msgid "ADDBUTTON , adds a button under the user-list" msgstr "ADDBUTTON ,在使用者清單下添加一個按鈕" #: src/common/outbound.c:3805 msgid "" "ADDSERVER , adds a new network with a new " "server to the network list" msgstr "" #: src/common/outbound.c:3807 msgid "ALLCHAN , sends a command to all channels you're in" msgstr "ALLCHAN ,向您所在的所有聊天室發送命令" #: src/common/outbound.c:3809 msgid "ALLCHANL , sends a command to all channels on the current server" msgstr "" #: src/common/outbound.c:3811 msgid "ALLSERV , sends a command to all servers you're in" msgstr "ALLSERV ,向您所在的所有伺服器發送命令" #: src/common/outbound.c:3812 msgid "AWAY [], sets you away" msgstr "AWAY [],設定您為暫離狀態" #: src/common/outbound.c:3813 msgid "BACK, sets you back (not away)" msgstr "" #: src/common/outbound.c:3815 msgid "" "BAN [], bans everyone matching the mask from the current " "channel. If they are already on the channel this doesn't kick them (needs " "chanop)" msgstr "BAN [],禁止所有符合 mask 的使用者進入目前的聊天室。如果他們已在該聊天室,這個命令不會把他們踢出去(需要有 chanop 身分)" #: src/common/outbound.c:3816 msgid "CHANOPT [-quiet] []" msgstr "" #: src/common/outbound.c:3817 msgid "" "CHARSET [], get or set the encoding used for the current " "connection" msgstr "" #: src/common/outbound.c:3818 msgid "" "CLEAR [ALL|HISTORY|[-]], Clears the current text window or command " "history" msgstr "" #: src/common/outbound.c:3819 msgid "CLOSE [-m], Closes the current window/tab or all queries" msgstr "" #: src/common/outbound.c:3822 msgid "COUNTRY [-s] , finds a country code, eg: au = australia" msgstr "COUNTRY [-s] ,查看國家代碼對應的國家名,比如:tw = 臺灣" #: src/common/outbound.c:3824 msgid "" "CTCP , send the CTCP message to nick, common messages are " "VERSION and USERINFO" msgstr "CTCP ,給暱稱為 者發送 CTCP 訊息,常用訊息是 VERSION 和 USERINFO" #: src/common/outbound.c:3826 msgid "" "CYCLE [], parts the current or given channel and immediately " "rejoins" msgstr "" #: src/common/outbound.c:3828 msgid "" "\n" "DCC GET - accept an offered file\n" "DCC SEND [-maxcps=#] [file] - send a file to someone\n" "DCC PSEND [-maxcps=#] [file] - send a file using passive mode\n" "DCC LIST - show DCC list\n" "DCC CHAT - offer DCC CHAT to someone\n" "DCC PCHAT - offer DCC CHAT using passive mode\n" "DCC CLOSE example:\n" " /dcc close send johnsmith file.tar.gz" msgstr "\nDCC GET - 接收暱稱為 者發送給您的檔案\nDCC SEND [-maxcps=#] [file] - 發送檔案給某人\nDCC PSEND [-maxcps=#] [file] - 使用被動模式發送檔案給某人\nDCC LIST - 顯示 DCC 清單\nDCC CHAT - 與某人密談\nDCC PCHAT - 使用被動模式與某人密談\nDCC CLOSE 例如:\n /dcc close send johnsmith file.tar.gz" #: src/common/outbound.c:3840 msgid "" "DEHOP , removes chanhalf-op status from the nick on the current " "channel (needs chanop)" msgstr "DEHOP ,取消目前聊天室內暱稱為 者的 chanhalf-op 身分(需要有 chanop 身分)" #: src/common/outbound.c:3842 msgid "DELBUTTON , deletes a button from under the user-list" msgstr "DELBUTTON ,刪除使用者清單下的一個按鈕" #: src/common/outbound.c:3844 msgid "" "DEOP , removes chanop status from the nick on the current channel " "(needs chanop)" msgstr "DEOP ,取消暱稱為 者在本聊天室的 chanop 身分(需要有 chanop 身分)" #: src/common/outbound.c:3846 msgid "" "DEVOICE , removes voice status from the nick on the current channel " "(needs chanop)" msgstr "DEVOICE ,取消暱稱為 者在本聊天室的發言權(需要有 chanop 身分)" #: src/common/outbound.c:3847 msgid "DISCON, Disconnects from server" msgstr "DISCON,切斷和伺服器的連接" #: src/common/outbound.c:3848 msgid "DNS , Finds a users IP number" msgstr "DNS , 查詢某位使用者的 IP 位址" #: src/common/outbound.c:3849 msgid "ECHO , Prints text locally" msgstr "ECHO ,只在本地顯示文字" #: src/common/outbound.c:3852 msgid "" "EXEC [-o] , runs the command. If -o flag is used then output is " "sent to current channel, else is printed to current text box" msgstr "EXEC [-o] ,執行命令。如果使用了 -o 選項則輸出到目前聊天室,否則輸出到目前文字框" #: src/common/outbound.c:3854 msgid "EXECCONT, sends the process SIGCONT" msgstr "EXECCONT,向行程發送 SIGCONT 信號" #: src/common/outbound.c:3857 msgid "" "EXECKILL [-9], kills a running exec in the current session. If -9 is given " "the process is SIGKILL'ed" msgstr "EXECKILL [-9],砍掉目前會話中的某執行行程。如果使用 -9 選項,則用 SIGKILL 砍掉該行程" #: src/common/outbound.c:3859 msgid "EXECSTOP, sends the process SIGSTOP" msgstr "EXECSTOP,向行程發送 SIGSTOP 信號" #: src/common/outbound.c:3860 msgid "EXECWRITE, sends data to the processes stdin" msgstr "EXECWRITE,把資料發送給行程的標準輸入" #: src/common/outbound.c:3864 msgid "EXPORTCONF, exports HexChat settings" msgstr "" #: src/common/outbound.c:3867 msgid "FLUSHQ, flushes the current server's send queue" msgstr "FLUSHQ,排空目前伺服器的發送佇列" #: src/common/outbound.c:3869 msgid "GATE [], proxies through a host, port defaults to 23" msgstr "GATE [],經由某主機來代理,預設輸出入埠為 23" #: src/common/outbound.c:3873 msgid "GHOST [password], Kills a ghosted nickname" msgstr "" #: src/common/outbound.c:3878 msgid "HOP , gives chanhalf-op status to the nick (needs chanop)" msgstr "HOP ,給暱稱為 者以 chanhalf-op 身分 (需要有 chanop 身分)" #: src/common/outbound.c:3879 msgid "ID , identifies yourself to nickserv" msgstr "ID ,向暱稱伺服器表明您自己的身分" #: src/common/outbound.c:3881 msgid "" "IGNORE \n" " mask - host mask to ignore, eg: *!*@*.aol.com\n" " types - types of data to ignore, one or all of:\n" " PRIV, CHAN, NOTI, CTCP, DCC, INVI, ALL\n" " options - NOSAVE, QUIET" msgstr "IGNORE \n mask - 欲忽略的主機遮罩,比如 *!*@*.aol.com\n types - 欲忽略資料的類型,以下選項之一或全部:\n PRIV,CHAN,NOTI,CTCP,INVI,ALL\n options - NOSAVE, QUIET" #: src/common/outbound.c:3888 msgid "" "INVITE [], invites someone to a channel, by default the " "current channel (needs chanop)" msgstr "INVITE [],邀請暱稱為 者加入聊天室,預設為目前聊天室(需要有 chanop 身分)" #: src/common/outbound.c:3889 msgid "JOIN , joins the channel" msgstr "JOIN ,加入聊天室" #: src/common/outbound.c:3891 msgid "KICK , kicks the nick from the current channel (needs chanop)" msgstr "KICK ,把暱稱為 者踢出目前聊天室(需要有 chanop 身分)" #: src/common/outbound.c:3893 msgid "" "KICKBAN , bans then kicks the nick from the current channel (needs " "chanop)" msgstr "KICKBAN ,把暱稱為 者踢出目前聊天室,並禁止他再進入(需要有 chanop 身分)" #: src/common/outbound.c:3896 msgid "LAGCHECK, forces a new lag check" msgstr "LAGCHECK,強制進行新的延遲檢查" #: src/common/outbound.c:3898 msgid "" "LASTLOG [-h] [-m] [-r] [--] , searches for a string in the buffer\n" " Use -h to highlight the found string(s)\n" " Use -m to match case\n" " Use -r when string is a Regular Expression\n" " Use -- (double hyphen) to end options when searching for, say, the string '-r'" msgstr "" #: src/common/outbound.c:3904 msgid "LOAD [-e] , loads a plugin or script" msgstr "LOAD [-e] ,載入外掛程式或命令稿" #: src/common/outbound.c:3907 msgid "" "MDEHOP, Mass deop's all chanhalf-ops in the current channel (needs chanop)" msgstr "MDEHOP,取消目前聊天室中所有 chanhalf-op 的權限 (需要有 chanop 身分)" #: src/common/outbound.c:3909 msgid "MDEOP, Mass deop's all chanops in the current channel (needs chanop)" msgstr "MDEOP,取消目前聊天室中所有 chanop 的權限 (需要有 chanop 身分)" #: src/common/outbound.c:3911 msgid "" "ME , sends the action to the current channel (actions are written in" " the 3rd person, like /me jumps)" msgstr "ME ,向目前聊天室中發送一個動作 (動作使用第三人稱陳述,例如 /me jumps)" #: src/common/outbound.c:3915 msgid "" "MKICK, Mass kicks everyone except you in the current channel (needs chanop)" msgstr "MKICK,踢出目前聊天室中除您自己之外的所有使用者 (需要有 chanop 身分)" #: src/common/outbound.c:3918 msgid "MOP, Mass op's all users in the current channel (needs chanop)" msgstr "MOP,給本聊天室中所有使用者 chanop 身分(需要有 chanop 身分)" #: src/common/outbound.c:3919 msgid "" "MSG , sends a private message, message \".\" to send to last" " nick or prefix with \"=\" for dcc chat" msgstr "" #: src/common/outbound.c:3922 msgid "NAMES, Lists the nicks on the current channel" msgstr "NAMES,列出目前聊天室的所有使用者暱稱" #: src/common/outbound.c:3924 msgid "NCTCP , Sends a CTCP notice" msgstr "NCTCP ,給暱稱為 者發送一則 CTCP 通知" #: src/common/outbound.c:3925 msgid "NEWSERVER [-noconnect] []" msgstr "NEWSERVER [-noconnect] []" #: src/common/outbound.c:3926 msgid "NICK , sets your nick" msgstr "NICK ,設定您的暱稱" #: src/common/outbound.c:3929 msgid "NOTICE , sends a notice" msgstr "" #: src/common/outbound.c:3931 msgid "" "NOTIFY [-n network1[,network2,...]] [], displays your notify list or " "adds someone to it" msgstr "" #: src/common/outbound.c:3933 msgid "OP , gives chanop status to the nick (needs chanop)" msgstr "OP ,給予暱稱為 者 chanop 身分 (需要有 chanop 身分)" #: src/common/outbound.c:3935 msgid "" "PART [] [], leaves the channel, by default the current one" msgstr "PART [] [],離開聊天室,預設為目前的聊天室" #: src/common/outbound.c:3937 msgid "PING , CTCP pings nick or channel" msgstr "PING ,CTCP ping 某位使用者或聊天室" #: src/common/outbound.c:3939 msgid "QUERY [-nofocus] , opens up a new privmsg window to someone" msgstr "" #: src/common/outbound.c:3941 msgid "" "QUIET [], quiet everyone matching the mask in the current " "channel if supported by the server." msgstr "" #: src/common/outbound.c:3943 msgid "QUIT [], disconnects from the current server" msgstr "QUIT [],切斷與目前伺服器的連接" #: src/common/outbound.c:3945 msgid "QUOTE , sends the text in raw form to the server" msgstr "QUOTE ,向伺服器發送原始格式的文字" #: src/common/outbound.c:3948 msgid "" "RECONNECT [-ssl] [] [] [], Can be called just as " "/RECONNECT to reconnect to the current server or with /RECONNECT ALL to " "reconnect to all the open servers" msgstr "RECONNECT [-ssl] [] [] [],可用 /RECONNECT 重新連接目前伺服器或用 /RECONNECT ALL 重新連接所有伺服器" #: src/common/outbound.c:3951 msgid "" "RECONNECT [] [] [], Can be called just as /RECONNECT " "to reconnect to the current server or with /RECONNECT ALL to reconnect to " "all the open servers" msgstr "RECONNECT [] [] [],可用 /RECONNECT 重新連接目前伺服器或用 /RECONNECT ALL 重新連接所有伺服器" #: src/common/outbound.c:3953 msgid "" "RECV , send raw data to HexChat, as if it was received from the IRC " "server" msgstr "" #: src/common/outbound.c:3954 msgid "RELOAD , reloads a plugin or script" msgstr "" #: src/common/outbound.c:3956 msgid "SAY , sends the text to the object in the current window" msgstr "SAY ,向目前視窗中的對象發送文字" #: src/common/outbound.c:3957 msgid "SEND []" msgstr "SEND []" #: src/common/outbound.c:3960 msgid "SERVCHAN [-ssl] , connects and joins a channel" msgstr "SERVCHAN [-ssl] ,連接伺服器並加入某聊天室" #: src/common/outbound.c:3963 msgid "SERVCHAN , connects and joins a channel" msgstr "SERVCHAN ,連接伺服器並加入某聊天室" #: src/common/outbound.c:3967 msgid "" "SERVER [-ssl] [] [], connects to a server, the " "default port is 6667 for normal connections, and 6697 for ssl connections" msgstr "" #: src/common/outbound.c:3970 msgid "" "SERVER [] [], connects to a server, the default port
use strict;
use warnings;
use Xchat ();
use File::Spec ();
use File::Basename qw(fileparse);

# if the last time you addressed someone was greater than this many minutes
# ago, ignore it
# this avoids having people you have talked to a long time ago coming up too
# early in the completion list
# Setting this to 0 will disable the check which is effectively the same as
# setting it to infinity
my $last_use_threshold = 10; # 10 minutes

# added to the front of a completion the same way as a suffix, only if
# the word is at the beginning of the line
my $prefix = '';

# ignore leading non-alphanumeric characters: -[\]^_`{|}
# Assuming you have the following nicks in a channel:
# [SomeNick] _SomeNick_ `SomeNick SomeNick SomeOtherNick
# when $ignore_leading_non_alnum is set to 0
#     s<tab> will cycle through SomeNick and SomeOtherNick
# when $ignore_leading_non_alnum is set to 1
#     s<tab> will cycle through [SomeNick] _SomeNick_ `SomeNick SomeNick
#     SomeOtherNick
my $ignore_leading_non_alnum = 0;

# enable path completion
my $path_completion = 1;
my $base_path = '';

# ignore the completion_amount setting and always cycle through nicks with tab
my $always_cycle = 0;

Xchat::register(
	"Tab Completion", "1.0500", "Alternative tab completion behavior"
);
Xchat::hook_print( "Key Press", \&complete );
Xchat::hook_print( "Close Context", \&close_context );
Xchat::hook_print( "Focus Tab", \&focus_tab );
Xchat::hook_print( "Part", \&clean_selected );
Xchat::hook_print( "Part with Reason", \&clean_selected );
Xchat::hook_command( "", \&track_selected );

sub SHIFT() { 1 }
sub CTRL() { 4 }
sub ALT() { 8 }

sub TAB() { 0xFF09 }
sub LEFT_TAB() { 0xFE20 }

my %completions;
my %last_visit;
my %selected;
my %escape_map = (
	'[' => qr![\[{]!,
	'{' => qr![\[{]!,
	'}' => qr![\]}]!,
	']' => qr![\]}]!,
	'\\' => qr![\\\|]!,
	'|' => qr![\\\|]!,
	'.' => qr!\.!,
	'^' => qr!\^!,
	'$' => qr!\$!,
	'*' => qr!\*!,
	'+' => qr!\+!,
	'?' => qr!\?!,
	'(' => qr!\(!,
	')' => qr!\)!,
	'-' => qr!\-!,
);

my $escapes = join "", keys %escape_map;
$escapes = qr/[\Q$escapes\E]/;

# used to determine if a word is the start of a path
my $path_pattern = qr{^(?:~|/|[[:alpha:]]:\\)};

sub complete {
	my ($key, $modifiers) = @{$_[0]};
	# if $_[0][0] contains the value of the key pressed
	# $_[0][1] contains modifiers
	# the value for tab is 0xFF09
	# the value for shift-tab(Left Tab) is 0xFE20
	# we don't care about other keys

	# the key must be a tab and left tab
	return Xchat::EAT_NONE unless $key == TAB || $key == LEFT_TAB;

	# if it is a tab then it must not have any modifiers
	return Xchat::EAT_NONE if $key == TAB && $modifiers & (CTRL|ALT|SHIFT);

	# loop backwards for shift+tab/left tab
	my $delta = $modifiers & SHIFT ? -1 : 1;
	my $context = Xchat::get_context;
	$completions{$context} ||= {};
	
	my $completions = $completions{$context};
	$completions->{pos} ||= -1;

	my $suffix = Xchat::get_prefs( "completion_suffix" );
	$suffix =~ s/^\s+//;
	
	my $input = Xchat::get_info( "inputbox" );
	my $cursor_pos = Xchat::get_info( "state_cursor" );
	my $left = substr( $input, 0, $cursor_pos );
	my $right = substr( $input, $cursor_pos );
	my $length = length $left;

	# trim spaces from the end of $left to avoid grabbing the wrong word
	# this is mainly needed for completion at the very beginning where a space
	# is added after the completion
	$left =~ s/\s+$//;

	# always add one to the index because
	# 1) if a space is found we want the position after it
	# 2) if a space isn't found then we get back -1
	my $word_start = rindex( $left, " " ) + 1;
	my $word = substr( $left, $word_start );
	$left = substr( $left, 0, -length $word );

	if( $cursor_pos == $completions->{pos} ) {
		my $previous_word = $completions->{completed};
		my $new_left = $input;
		substr( $new_left, $cursor_pos ) = "";

		if( $previous_word and $new_left =~ s/(\Q$previous_word\E)$// ) {
			$word = $1;
			$word_start = length( $new_left );
			$left = $new_left;
		}
	}

	my $command_char = Xchat::get_prefs( "input_command_char" );
	# ignore commands
	if( ($word !~ m{^[${command_char}]})
		or ( $word =~ m{^[${command_char}]} and $word_start != 0 ) ) {

		if( $cursor_pos == length $input # end of input box
			# not a valid nick char
			&& $input =~ /(?<![\x41-\x5A\x61-\x7A\x30-\x39\x5B-\x60\x7B-\x7D-])$/
			&& $cursor_pos != $completions->{pos} # not continuing a completion
			&& $word !~ m{^(?:[&#/~]|[[:alpha:]]:\\)}  # not a channel or path
		) {
			# check for path completion
			unless( $path_completion and $word =~ $path_pattern ) {
				$word_start = $cursor_pos;
				$left = $input;
				$length = length $length;
				$right = "";
				$word = "";
			}
		}

		if( $word_start == 0 && $prefix && $word =~ /^\Q$prefix/ ) {
			$word =~ s/^\Q$prefix//;
		}

		my $completed; # this is going to be the "completed" word

		# for parital completions and channel names so a : isn't added
		#$completions->{skip_suffix} = ($word =~ /^[&#]/) ? 1 : 0;
		
		# continuing from a previous completion
		if(
			exists $completions->{matches} && @{$completions->{matches}}
			&& $cursor_pos == $completions->{pos}
			&& $word =~ /^\Q$completions->{matches}[$completions->{index}]/
		) {
			$completions->{index} += $delta;

			if( $completions->{index} < 0 ) {
				$completions->{index} += @{$completions->{matches}};
			} else {
				$completions->{index} %= @{$completions->{matches}};
			}

		} else {

			if( $word =~ /^[&#]/ ) {
			# channel name completion
				$completions->{matches} = [ matching_channels( $word ) ];
				$completions->{skip_suffix} = 0;
			} elsif( $path_completion and $word =~ $path_pattern ) {
			# file name completion
				$completions->{matches} = [ matching_files( $word ) ];
				$completions->{skip_suffix} = 1;
			} else {
			# nick completion
				# fix $word so { equals [, ] equals }, \ equals |
				# and escape regex metacharacters
				$word =~ s/($escapes)/$escape_map{$1}/g;

				$completions->{matches} = [ matching_nicks( $word ) ];
				$completions->{skip_suffix} = 0;
			}
			$completions->{index} = 0;

		}
		$completed = $completions->{matches}[ $completions->{index} ];
		$completions->{completed} = $completed;

		my $completion_amount = Xchat::get_prefs( "completion_amount" );
		
		# don't cycle if the number of possible completions is greater than
		# completion_amount
		if(
			!$always_cycle && (
			@{$completions->{matches}} > $completion_amount
			&& @{$completions->{matches}} != 1 )
		) {
			# don't print if we tabbed in the beginning and the list of possible
			# completions includes all nicks in the channel
			my $context_type = Xchat::context_info->{type};
			if( $context_type != 2 # not a channel
				or @{$completions->{matches}} < Xchat::get_list("users")
			) {
				Xchat::print( join " ", @{$completions->{matches}}, "\n" );
			}
			
			$completed = lcs( $completions->{matches} );
			$completions->{skip_suffix} = 1;
		}
		
		if( $completed ) {
			
			if( $word_start == 0 && !$completions->{skip_suffix} ) {
				# at the start of the line append completion suffix
				Xchat::command( "settext $prefix$completed$suffix$right");
				$completions->{pos} = length( "$prefix$completed$suffix" );
			} else {
				Xchat::command( "settext $left$completed$right" );
				$completions->{pos} = length( "$left$completed" );
			}
			
			Xchat::command( "setcursor $completions->{pos}" );
		}

=begin
# debugging stuff
		local $, = " ";
		my $input_length = length $input;
		Xchat::print [
			qq{input[$input]},
			qq{input_length[$input_length]},
			qq{cursor[$cursor_pos]},
			qq{start[$word_start]},
			qq{length[$length]},
			qq{left[$left]},
			qq{word[$word]}, qq{right[$right]},
			qq{completed[}. ($completed||""). qq{]},
			qq{pos[$completions->{pos}]},
		];
		use Data::Dumper;
		local $Data::Dumper::Indent = 0;
		Xchat::print Dumper $completions->{matches};
=cut

		return Xchat::EAT_ALL;
	} else {
		return Xchat::EAT_NONE;
	}
}


# all channels starting with $word
sub matching_channels {
	my $word = shift;

	# for use in compare_channels();
	our $current_chan;
	local $current_chan = Xchat::get_info( "channel" );

	my $conn_id = Xchat::get_info( "id" );
	$word =~ s/^[&#]+//;

	return
		map {	$_->[1]->{channel} }
		sort compare_channels map {
			my $chan = $_->{channel};
			$chan =~ s/^[#&]+//;

			# comparisons will be done based only on the name
			# matching name, same connection, only channels
			$chan =~ /^$word/i && $_->{id} == $conn_id ?
			[ $chan, $_ ] :
			()
		} channels();
}

sub channels {
	return grep { $_->{type} == 2 } Xchat::get_list( "channels" );
}

sub compare_channels {
	# package variable, value set in matching_channels()
	our $current_chan;

	# turn off warnings generated from channels that have not yet been visited
	# since the script was loaded
	no warnings "uninitialized";

	# the current channel is always first, then ordered by most recently visited
	return
		$a->[1]{channel} eq $current_chan ? -1 :
		$b->[1]{channel} eq $current_chan ? 1 :
		$last_visit{ $b->[1]{context} } <=> $last_visit{ $a->[1]{context} }
		|| $a->[1]{channel} cmp $b->[1]{channel};

}

sub matching_nicks {
	my $word_re = shift;

	# for use in compare_nicks()
	our ($my_nick, $selections, $now);
	local $my_nick = Xchat::get_info( "nick" );
	local $selections = $selected{ Xchat::get_context() };
	local $now = time;

	my $pattern = $ignore_leading_non_alnum ?
		qr/^[\-\[\]^_`{|}\\]*$word_re/i : qr/^$word_re/i;
	return
		map { $_->{nick} }
		sort compare_nicks grep {
			$_->{nick} =~ $pattern;
		} Xchat::get_list( "users" )

}

sub max {
	return unless @_;
	my $max = shift;
	for(@_) {
		$max = $_ if $_ > $max;
	}
	return $max;
}

sub compare_times {
	# package variables set in matching_nicks()
	our $selections;
	our $now;
	
	for my $nick ( $a->{nick}, $b->{nick} ) {
		# turn off the warnings that get generated from users who have yet
		# to speak since the script was loaded
		no warnings "uninitialized";

		if( $last_use_threshold
			&& (( $now - $selections->{$nick}) > ($last_use_threshold * 60)) ) {
			delete $selections->{ $nick }
		}
	}
	my $a_time = $selections->{ $a->{nick} } || 0 ;
	my $b_time = $selections->{ $b->{nick} } || 0 ;
	
	if( $a_time || $b_time ) {
		return $b_time <=> $a_time;
	} elsif( !$a_time && !$b_time ) {
		return $b->{lasttalk} <=> $a->{lasttalk};
	}

}

sub compare_nicks {
	# more package variables, value set in matching_nicks()
	our $my_nick;

	# our own nick is always last, then ordered by the people we spoke to most
	# recently and the people who were speaking most recently
	return 
		$a->{nick} eq $my_nick ? 1 :
		$b->{nick} eq $my_nick ? -1 :
		compare_times()
		|| Xchat::nickcmp( $a->{nick}, $b->{nick} );

#		$selections->{ $b->{nick} } <=> $selections->{ $a->{nick} }
#		||	$b->{lasttalk} <=> $a->{lasttalk}

}

sub matching_files {
	my $word = shift;

	my ($file, $input_dir) = fileparse( $word );

	my $dir = expand_tilde( $input_dir );

	if( opendir my $dir_handle, $dir ) {
		my @files;

		if( $file ) {
			@files = grep {
				#Xchat::print( $_ );
				/^\Q$file/ } readdir $dir_handle;
		} else {
			@files = readdir $dir_handle;
		}

		return map {
			File::Spec->catfile( $input_dir, $_ );
		} sort
		grep { !/^[.]{1,2}$/ } @files;
	} else {
		return ();
	}
}

# Remove completion related data for tabs that are closed
sub close_context {
	my $context = Xchat::get_context;
	delete $completions{$context};
	delete $last_visit{$context};
	return Xchat::EAT_NONE;
}

# track visit times
sub focus_tab {
	$last_visit{Xchat::get_context()} = time();
	return Xchat::EAT_NONE;
}

# keep track of the last time a message was addressed to someone
# a message is considered addressed to someone if their nick is used followed
# by the completion suffix
sub track_selected {
	my $input = $_[1][0];
	return Xchat::EAT_NONE unless defined $input;

	my $suffix = Xchat::get_prefs( "completion_suffix" );
	for( grep defined, $input =~ /^(.+)\Q$suffix/, $_[0][0] ) {
		if( in_channel( $_ ) ) {
			$selected{Xchat::get_context()}{$_} = time();
			last;
		}
	}

	return Xchat::EAT_NONE;
}

# if a user is in the current channel
# user_info() can also be used instead of the loop
sub in_channel {
	my $target = shift;
	for my $nick ( nicks() ) {
		if( $nick eq $target ) {
			return 1;
		}
	}

	return 0;
}

# list of nicks in the current channel
sub nicks {
	return map { $_->{nick} } Xchat::get_list( "users" );
}

# remove people from the selected list when they leave the channel
sub clean_selected {
	delete $selected{ Xchat::get_context() }{$_[0][0]};
	return Xchat::EAT_NONE;
}

# Longest common substring
# Used for partial completion when using non-cycling completion
sub lcs {
	my @nicks = @{+shift};
	return "" if @nicks == 0;
	return $nicks[0] if @nicks == 1;

	my $substring = shift @nicks;

	while(@nicks) {
		$substring = common_string( $substring, shift @nicks );
	}
	
	return $substring;
}

sub common_string {
	my ($nick1, $nick2) = @_;
	my $index = 0;

	$index++ while(
		($index < length $nick1) && ($index < length $nick2) &&
			lc(substr( $nick1, $index, 1 )) eq lc(substr( $nick2, $index, 1 ))
	);
	
	
	return substr( $nick1, 0, $index );
}

sub expand_tilde {
	my $file = shift;

	$file =~ s/^~/home_dir()/e;
	return $file;
}

sub home_dir {
	return $base_path if $base_path;

	if ( $^O eq "MSWin32" ) {
		return $ENV{USERPROFILE};
	} else {
		return ((getpwuid($>))[7] ||  $ENV{HOME} || $ENV{LOGDIR});
	}
}
etup.c:219 msgid "Nick Completion" msgstr "暱稱自動補齊" #: src/fe-gtk/setup.c:220 msgid "Nick completion suffix:" msgstr "暱稱自動補齊後綴:" #: src/fe-gtk/setup.c:221 msgid "Nick completion sorted:" msgstr "" #: src/fe-gtk/setup.c:222 msgid "Nick completion amount:" msgstr "" #: src/fe-gtk/setup.c:222 msgid "Threshold of nicks to start listing instead of completing" msgstr "" #: src/fe-gtk/setup.c:222 msgid "nicks." msgstr "" #: src/fe-gtk/setup.c:225 msgid "Input Box Codes" msgstr "輸入框編碼" #: src/fe-gtk/setup.c:226 #, c-format msgid "Interpret %nnn as an ASCII value" msgstr "把 %nnn 解釋為 ASCII 值" #: src/fe-gtk/setup.c:227 msgid "Interpret %C, %B as Color, Bold etc" msgstr "轉換%C、%B為顏色、粗體等" #: src/fe-gtk/setup.c:236 msgid "Graphical" msgstr "" #: src/fe-gtk/setup.c:244 msgid "A-Z, Ops first" msgstr "A-Z, Op 最先" #: src/fe-gtk/setup.c:246 msgid "Z-A, Ops last" msgstr "Z-A, Op 最後" #: src/fe-gtk/setup.c:247 msgid "Z-A" msgstr "Z-A" #: src/fe-gtk/setup.c:248 msgid "Unsorted" msgstr "未排序" #: src/fe-gtk/setup.c:254 src/fe-gtk/setup.c:266 msgid "Left (Upper)" msgstr "" #: src/fe-gtk/setup.c:255 src/fe-gtk/setup.c:267 msgid "Left (Lower)" msgstr "" #: src/fe-gtk/setup.c:256 src/fe-gtk/setup.c:268 msgid "Right (Upper)" msgstr "" #: src/fe-gtk/setup.c:257 src/fe-gtk/setup.c:269 msgid "Right (Lower)" msgstr "" #: src/fe-gtk/setup.c:258 msgid "Top" msgstr "頂部" #: src/fe-gtk/setup.c:259 msgid "Bottom" msgstr "底部" #: src/fe-gtk/setup.c:260 msgid "Hidden" msgstr "隱藏" #: src/fe-gtk/setup.c:275 msgid "User List" msgstr "使用者清單" #: src/fe-gtk/setup.c:276 msgid "Show hostnames in user list" msgstr "在使用者清單中顯示主機名" #: src/fe-gtk/setup.c:278 msgid "Show icons for user modes" msgstr "" #: src/fe-gtk/setup.c:278 msgid "Use graphical icons instead of text symbols in the user list." msgstr "" #: src/fe-gtk/setup.c:279 msgid "Color nicknames in userlist" msgstr "" #: src/fe-gtk/setup.c:279 msgid "Will color nicknames the same as in chat." msgstr "" #: src/fe-gtk/setup.c:280 msgid "Show user count in channels" msgstr "" #: src/fe-gtk/setup.c:282 msgid "User list sorted by:" msgstr "使用者清單排列方式:" #: src/fe-gtk/setup.c:283 msgid "Show user list at:" msgstr "" #: src/fe-gtk/setup.c:285 msgid "Away Tracking" msgstr "" #: src/fe-gtk/setup.c:286 msgid "Track the Away status of users and mark them in a different color" msgstr "追蹤使用者的離開狀態並且以不同顏色標記它們" #: src/fe-gtk/setup.c:287 msgid "On channels smaller than:" msgstr "在小於此值的聊天室裡:" #: src/fe-gtk/setup.c:289 msgid "Action Upon Double Click" msgstr "雙擊時的動作" #: src/fe-gtk/setup.c:292 msgid "Extra Gadgets" msgstr "" #: src/fe-gtk/setup.c:293 msgid "Lag meter:" msgstr "" #: src/fe-gtk/setup.c:294 msgid "Throttle meter:" msgstr "" #: src/fe-gtk/setup.c:301 msgid "Windows" msgstr "視窗" #: src/fe-gtk/setup.c:302 src/fe-gtk/setup.c:324 msgid "Tabs" msgstr "分頁" #: src/fe-gtk/setup.c:309 msgid "Always" msgstr "總是" #: src/fe-gtk/setup.c:310 msgid "Only requested tabs" msgstr "只有請求的分頁" #: src/fe-gtk/setup.c:316 msgid "Automatic" msgstr "" #: src/fe-gtk/setup.c:317 msgid "In an extra tab" msgstr "" #: src/fe-gtk/setup.c:318 msgid "In the front tab" msgstr "" #: src/fe-gtk/setup.c:326 msgid "Tree" msgstr "" #: src/fe-gtk/setup.c:333 msgid "Switcher type:" msgstr "" #: src/fe-gtk/setup.c:334 msgid "Open an extra tab for server messages" msgstr "打開額外的分頁存放伺服器訊息" #: src/fe-gtk/setup.c:335 msgid "Open a new tab when you receive a private message" msgstr "" #: src/fe-gtk/setup.c:336 msgid "Sort tabs in alphabetical order" msgstr "按字母表順序排序分頁" #: src/fe-gtk/setup.c:337 msgid "Show icons in the channel tree" msgstr "" #: src/fe-gtk/setup.c:338 msgid "Show dotted lines in the channel tree" msgstr "" #: src/fe-gtk/setup.c:339 msgid "Smaller text" msgstr "" #: src/fe-gtk/setup.c:340 msgid "Focus new tabs:" msgstr "聚焦到新分頁:" #: src/fe-gtk/setup.c:341 msgid "Placement of notices:" msgstr "" #: src/fe-gtk/setup.c:342 msgid "Show channel switcher at:" msgstr "" #: src/fe-gtk/setup.c:343 msgid "Shorten tab labels to:" msgstr "縮短分頁標籤至:" #: src/fe-gtk/setup.c:343 msgid "letters." msgstr "字母。" #: src/fe-gtk/setup.c:345 msgid "Tabs or Windows" msgstr "分頁或視窗" #: src/fe-gtk/setup.c:346 msgid "Open channels in:" msgstr "打開聊天室於:" #: src/fe-gtk/setup.c:347 msgid "Open dialogs in:" msgstr "打開對話框於:" #: src/fe-gtk/setup.c:348 msgid "Open utilities in:" msgstr "打開工具於:" #: src/fe-gtk/setup.c:348 msgid "Open DCC, Ignore, Notify etc, in tabs or windows?" msgstr "打開 DCC、忽略、通知等動作,使用分頁還是視窗?" #: src/fe-gtk/setup.c:355 msgid "Messages" msgstr "" #: src/fe-gtk/setup.c:356 msgid "Scrollback" msgstr "" #: src/fe-gtk/setup.c:364 msgid "Ask for confirmation" msgstr "" #: src/fe-gtk/setup.c:365 msgid "Ask for download folder" msgstr "" #: src/fe-gtk/setup.c:366 msgid "Save without interaction" msgstr "" #: src/fe-gtk/setup.c:372 msgid "Files and Directories" msgstr "檔案和目錄" #: src/fe-gtk/setup.c:373 msgid "Auto accept file offers:" msgstr "自動接受所提供的檔案:" #: src/fe-gtk/setup.c:374 msgid "Download files to:" msgstr "把檔案下載到:" #: src/fe-gtk/setup.c:375 msgid "Move completed files to:" msgstr "移動完成下載的檔案到:" #: src/fe-gtk/setup.c:376 msgid "Save nick name in filenames" msgstr "把暱稱存入檔名" #: src/fe-gtk/setup.c:378 msgid "Auto Open DCC Windows" msgstr "自動打開 DDC 視窗" #: src/fe-gtk/setup.c:379 msgid "Send window" msgstr "發送視窗" #: src/fe-gtk/setup.c:380 msgid "Receive window" msgstr "接收視窗" #: src/fe-gtk/setup.c:381 msgid "Chat window" msgstr "聊天視窗" #: src/fe-gtk/setup.c:383 msgid "Maximum File Transfer Speeds (bytes per second)" msgstr "最大檔案傳輸速度(位元組每秒)" #: src/fe-gtk/setup.c:384 msgid "One upload:" msgstr "一次上傳" #: src/fe-gtk/setup.c:385 src/fe-gtk/setup.c:387 msgid "Maximum speed for one transfer" msgstr "一個傳送行程的最大速度" #: src/fe-gtk/setup.c:386 msgid "One download:" msgstr "一次下載:" #: src/fe-gtk/setup.c:388 msgid "All uploads combined:" msgstr "所有上傳:" #: src/fe-gtk/setup.c:389 src/fe-gtk/setup.c:391 msgid "Maximum speed for all files" msgstr "所有檔案的最大速度" #: src/fe-gtk/setup.c:390 msgid "All downloads combined:" msgstr "所有下載" #: src/fe-gtk/setup.c:418 src/fe-gtk/setup.c:461 src/fe-gtk/setup.c:1851 msgid "Alerts" msgstr "警報" #: src/fe-gtk/setup.c:422 src/fe-gtk/setup.c:464 msgid "Show tray balloons on:" msgstr "" #: src/fe-gtk/setup.c:424 msgid "Blink tray icon on:" msgstr "" #: src/fe-gtk/setup.c:425 src/fe-gtk/setup.c:465 msgid "Blink task bar on:" msgstr "" #: src/fe-gtk/setup.c:427 src/fe-gtk/setup.c:429 src/fe-gtk/setup.c:466 msgid "Make a beep sound on:" msgstr "" #: src/fe-gtk/setup.c:427 msgid "" "Play the \"Instant Message Notification\" system sound upon the selected " "events" msgstr "" #: src/fe-gtk/setup.c:429 msgid "" "Play \"message-new-instant\" from the freedesktop.org sound theme upon the " "selected events" msgstr "" #: src/fe-gtk/setup.c:432 src/fe-gtk/setup.c:468 msgid "Omit alerts when marked as being away" msgstr "" #: src/fe-gtk/setup.c:433 src/fe-gtk/setup.c:469 msgid "Omit alerts while the window is focused" msgstr "" #: src/fe-gtk/setup.c:435 msgid "Tray Behavior" msgstr "" #: src/fe-gtk/setup.c:437 src/fe-gtk/setup.c:439 msgid "Enable system tray icon" msgstr "" #: src/fe-gtk/setup.c:441 msgid "Minimize to tray" msgstr "" #: src/fe-gtk/setup.c:442 msgid "Close to tray" msgstr "" #: src/fe-gtk/setup.c:443 msgid "Automatically mark away/back" msgstr "" #: src/fe-gtk/setup.c:443 msgid "Automatically change status when hiding to tray." msgstr "" #: src/fe-gtk/setup.c:445 msgid "Only show tray balloons when hidden or iconified" msgstr "" #: src/fe-gtk/setup.c:448 src/fe-gtk/setup.c:471 msgid "Highlighted Messages" msgstr "" #: src/fe-gtk/setup.c:449 src/fe-gtk/setup.c:472 msgid "" "Highlighted messages are ones where your nickname is mentioned, but also:" msgstr "" #: src/fe-gtk/setup.c:451 src/fe-gtk/setup.c:474 msgid "Extra words to highlight:" msgstr "" #: src/fe-gtk/setup.c:452 src/fe-gtk/setup.c:475 msgid "Nick names not to highlight:" msgstr "" #: src/fe-gtk/setup.c:453 src/fe-gtk/setup.c:476 msgid "Nick names to always highlight:" msgstr "" #: src/fe-gtk/setup.c:454 src/fe-gtk/setup.c:477 msgid "" "Separate multiple words with commas.\n" "Wildcards are accepted." msgstr "" #: src/fe-gtk/setup.c:484 msgid "Default Messages" msgstr "預設訊息" #: src/fe-gtk/setup.c:485 msgid "Quit:" msgstr "離開:" #: src/fe-gtk/setup.c:486 msgid "Leave channel:" msgstr "離開聊天室:" #: src/fe-gtk/setup.c:487 msgid "Away:" msgstr "離開:" #: src/fe-gtk/setup.c:489 msgid "Away" msgstr "離開" #: src/fe-gtk/setup.c:490 msgid "Show away once" msgstr "只顯示暫離一次" #: src/fe-gtk/setup.c:490 msgid "Show identical away messages only once." msgstr "" #: src/fe-gtk/setup.c:491 msgid "Automatically unmark away" msgstr "自動取消暫離狀態" #: src/fe-gtk/setup.c:491 msgid "Unmark yourself as away before sending messages." msgstr "" #: src/fe-gtk/setup.c:493 src/fe-gtk/setup.c:525 msgid "Miscellaneous" msgstr "" #: src/fe-gtk/setup.c:494 msgid "Display MODEs in raw form" msgstr "使用原始格式顯示模式" #: src/fe-gtk/setup.c:495 msgid "WHOIS on notify" msgstr "" #: src/fe-gtk/setup.c:495 msgid "Sends a /WHOIS when a user comes online in your notify list." msgstr "" #: src/fe-gtk/setup.c:496 msgid "Hide join and part messages" msgstr "隱藏加入/離開訊息" #: src/fe-gtk/setup.c:496 msgid "Hide channel join/part messages by default." msgstr "" #: src/fe-gtk/setup.c:503 msgid "*!*@*.host" msgstr "" #: src/fe-gtk/setup.c:504 msgid "*!*@domain" msgstr "" #: src/fe-gtk/setup.c:505 msgid "*!*user@*.host" msgstr "" #: src/fe-gtk/setup.c:506 msgid "*!*user@domain" msgstr "" #: src/fe-gtk/setup.c:512 msgid "Auto Copy Behavior" msgstr "" #: src/fe-gtk/setup.c:513 msgid "Automatically copy selected text" msgstr "" #: src/fe-gtk/setup.c:514 msgid "" "Copy selected text to clipboard when left mouse button is released. " "Otherwise, CONTROL-SHIFT-C will copy the selected text to the clipboard." msgstr "" #: src/fe-gtk/setup.c:517 msgid "Automatically include time stamps" msgstr "" #: src/fe-gtk/setup.c:518 msgid "" "Automatically include time stamps in copied lines of text. Otherwise, " "include time stamps if the SHIFT key is held down while selecting." msgstr "" #: src/fe-gtk/setup.c:520 msgid "Automatically include color information" msgstr "" #: src/fe-gtk/setup.c:521 msgid "" "Automatically include color information in copied lines of text. Otherwise," " include color information if the CONTROL key is held down while selecting." msgstr "" #: src/fe-gtk/setup.c:526 msgid "Real name:" msgstr "" #: src/fe-gtk/setup.c:528 msgid "Alternative fonts:" msgstr "" #: src/fe-gtk/setup.c:528 msgid "Separate multiple entries with commas without spaces before or after." msgstr "" #: src/fe-gtk/setup.c:530 msgid "Display lists in compact mode" msgstr "" #: src/fe-gtk/setup.c:530 msgid "Use less spacing between user list/channel tree rows." msgstr "" #: src/fe-gtk/setup.c:531 msgid "Use server time if supported" msgstr "" #: src/fe-gtk/setup.c:531 msgid "" "Display timestamps obtained from server if it supports the time-server " "extension." msgstr "" #: src/fe-gtk/setup.c:532 msgid "Automatically reconnect to servers on disconnect" msgstr "" #: src/fe-gtk/setup.c:533 msgid "Auto reconnect delay:" msgstr "自動重連間隔:" #: src/fe-gtk/setup.c:534 msgid "Auto join delay:" msgstr "" #: src/fe-gtk/setup.c:535 msgid "Ban Type:" msgstr "" #: src/fe-gtk/setup.c:535 msgid "" "Attempt to use this banmask when banning or quieting. (requires " "irc_who_join)" msgstr "" #: src/fe-gtk/setup.c:542 src/fe-gtk/setup.c:1853 msgid "Logging" msgstr "日誌" #: src/fe-gtk/setup.c:543 msgid "Display scrollback from previous session" msgstr "" #: src/fe-gtk/setup.c:544 msgid "Scrollback lines:" msgstr "回滾列數:" #: src/fe-gtk/setup.c:545 msgid "Enable logging of conversations to disk" msgstr "" #: src/fe-gtk/setup.c:546 msgid "Log filename:" msgstr "記錄檔案名稱:" #: src/fe-gtk/setup.c:547 #, c-format msgid "%s=Server %c=Channel %n=Network." msgstr "%s=伺服器 %c=聊天室 %n=網路。" #: src/fe-gtk/setup.c:550 msgid "Insert timestamps in logs" msgstr "在日誌中加入時間戳記" #: src/fe-gtk/setup.c:551 msgid "Log timestamp format:" msgstr "日誌時間戳記格式:" #: src/fe-gtk/setup.c:558 msgid "URLs" msgstr "URL" #: src/fe-gtk/setup.c:559 msgid "Enable logging of URLs to disk" msgstr "" #: src/fe-gtk/setup.c:560 msgid "Enable URL grabber" msgstr "" #: src/fe-gtk/setup.c:561 msgid "Maximum number of URLs to grab:" msgstr "" #: src/fe-gtk/setup.c:568 msgid "(Disabled)" msgstr "(停用)" #: src/fe-gtk/setup.c:569 msgid "Wingate" msgstr "Wingate" #: src/fe-gtk/setup.c:570 msgid "Socks4" msgstr "Socks4" #: src/fe-gtk/setup.c:571 msgid "Socks5" msgstr "Socks5" #: src/fe-gtk/setup.c:572 msgid "HTTP" msgstr "HTTP" #: src/fe-gtk/setup.c:574 msgid "MS Proxy (ISA)" msgstr "MS Proxy (ISA)" #: src/fe-gtk/setup.c:577 msgid "Auto" msgstr "自動" #: src/fe-gtk/setup.c:584 msgid "All Connections" msgstr "所有的連接" #: src/fe-gtk/setup.c:585 msgid "IRC Server Only" msgstr "僅列出 IRC 伺服器" #: src/fe-gtk/setup.c:586 msgid "DCC Get Only" msgstr "僅使用 DCC Get" #: src/fe-gtk/setup.c:592 msgid "Your Address" msgstr "您的位址" #: src/fe-gtk/setup.c:593 msgid "Bind to:" msgstr "綁定於:" #: src/fe-gtk/setup.c:594 msgid "Only useful for computers with multiple addresses." msgstr "只對有多個位址的電腦有用。" #: src/fe-gtk/setup.c:596 msgid "File Transfers" msgstr "" #: src/fe-gtk/setup.c:597 msgid "Get my address from the IRC server" msgstr "從 IRC 伺服器獲取我的位址" #: src/fe-gtk/setup.c:598 msgid "" "Asks the IRC server for your real address. Use this if you have a " "192.168.*.* address!" msgstr "向 IRC 伺服器查詢您的真實位址。如果您具有 192.168.*.* 這樣的位址時,請使用此命令。" #: src/fe-gtk/setup.c:599 msgid "DCC IP address:" msgstr "DCC IP 位址:" #: src/fe-gtk/setup.c:600 msgid "Claim you are at this address when offering files." msgstr "發送檔案時聲稱您是這個位址。" #: src/fe-gtk/setup.c:601 msgid "First DCC send port:" msgstr "第一個 DCC 檔案發送輸出入埠:" #: src/fe-gtk/setup.c:602 msgid "Last DCC send port:" msgstr "最後一個 DCC 檔案傳送輸出入埠:" #: src/fe-gtk/setup.c:603 msgid "!Leave ports at zero for full range." msgstr "!輸出入埠保留為 0 表示允許所有範圍。" #: src/fe-gtk/setup.c:605 msgid "Proxy Server" msgstr "代理伺服器" #: src/fe-gtk/setup.c:606 msgid "Hostname:" msgstr "主機名:" #: src/fe-gtk/setup.c:607 msgid "Port:" msgstr "輸出入埠:" #: src/fe-gtk/setup.c:608 msgid "Type:" msgstr "類型:" #: src/fe-gtk/setup.c:609 msgid "Use proxy for:" msgstr "使用代理伺服器於:" #: src/fe-gtk/setup.c:611 msgid "Proxy Authentication" msgstr "代理伺服器驗證" #: src/fe-gtk/setup.c:613 msgid "Use Authentication (MS Proxy, HTTP or Socks5 only)" msgstr "使用驗證(MS Proxy、HTTP 或僅有 Socks5)" #: src/fe-gtk/setup.c:615 msgid "Use Authentication (HTTP or Socks5 only)" msgstr "使用驗證(HTTP 或僅有 Socks5)" #: src/fe-gtk/setup.c:617 msgid "Username:" msgstr "使用者名:" #: src/fe-gtk/setup.c:1073 msgid "Select an Image File" msgstr "選擇一個圖像檔案" #: src/fe-gtk/setup.c:1109 msgid "Select Download Folder" msgstr "選擇下載文件夾" #: src/fe-gtk/setup.c:1118 msgid "Select font" msgstr "選擇字型" #: src/fe-gtk/setup.c:1218 msgid "Browse..." msgstr "瀏覽..." #: src/fe-gtk/setup.c:1357 msgid "Mark identified users with:" msgstr "標記驗證過的使用者為:" #: src/fe-gtk/setup.c:1359 msgid "Mark not-identified users with:" msgstr "標記未驗證過的使用者為:" #: src/fe-gtk/setup.c:1366 msgid "Open Data Folder" msgstr "" #: src/fe-gtk/setup.c:1420 msgid "Select color" msgstr "選擇顏色" #: src/fe-gtk/setup.c:1500 msgid "Text Colors" msgstr "文字顏色" #: src/fe-gtk/setup.c:1502 msgid "mIRC colors:" msgstr "mIRC 顏色:" #: src/fe-gtk/setup.c:1510 msgid "Local colors:" msgstr "本地的顏色:" #: src/fe-gtk/setup.c:1518 src/fe-gtk/setup.c:1523 msgid "Foreground:" msgstr "前景:" #: src/fe-gtk/setup.c:1519 src/fe-gtk/setup.c:1524 msgid "Background:" msgstr "背景:" #: src/fe-gtk/setup.c:1521 msgid "Selected Text" msgstr "" #: src/fe-gtk/setup.c:1526 msgid "Interface Colors" msgstr "介面顏色" #: src/fe-gtk/setup.c:1528 msgid "New data:" msgstr "新資料:" #: src/fe-gtk/setup.c:1529 msgid "Marker line:" msgstr "標記線:" #: src/fe-gtk/setup.c:1530 msgid "New message:" msgstr "新訊息:" #: src/fe-gtk/setup.c:1531 msgid "Away user:" msgstr "離開的使用者:" #: src/fe-gtk/setup.c:1532 msgid "Highlight:" msgstr "高亮度顯示:" #: src/fe-gtk/setup.c:1534 msgid "Spell checker:" msgstr "拼字檢查:" #: src/fe-gtk/setup.c:1537 msgid "Color Stripping" msgstr "" #: src/fe-gtk/setup.c:1634 src/fe-gtk/textgui.c:379 msgid "Event" msgstr "事件" #: src/fe-gtk/setup.c:1640 msgid "Sound file" msgstr "音效檔案" #: src/fe-gtk/setup.c:1684 msgid "Select a sound file" msgstr "選擇聲音檔案" #: src/fe-gtk/setup.c:1769 msgid "Sound file:" msgstr "音效檔案:" #: src/fe-gtk/setup.c:1784 msgid "_Browse..." msgstr "瀏覽(_B)..." #: src/fe-gtk/setup.c:1795 msgid "_Play" msgstr "播放(_P)" #: src/fe-gtk/setup.c:1842 msgid "Interface" msgstr "介面" #: src/fe-gtk/setup.c:1843 msgid "Appearance" msgstr "外觀" #: src/fe-gtk/setup.c:1844 msgid "Input box" msgstr "輸入框" #: src/fe-gtk/setup.c:1845 msgid "User list" msgstr "使用者清單" #: src/fe-gtk/setup.c:1846 msgid "Channel switcher" msgstr "" #: src/fe-gtk/setup.c:1847 msgid "Colors" msgstr "顏色" #: src/fe-gtk/setup.c:1849 msgid "Chatting" msgstr "聊天" #: src/fe-gtk/setup.c:1852 msgid "Sounds" msgstr "" #: src/fe-gtk/setup.c:1854 msgid "Advanced" msgstr "進階" #: src/fe-gtk/setup.c:1857 msgid "Network setup" msgstr "網路設定" #: src/fe-gtk/setup.c:1858 msgid "File transfers" msgstr "檔案傳輸" #: src/fe-gtk/setup.c:1978 msgid "Categories" msgstr "類別" #: src/fe-gtk/setup.c:2191 msgid "" "You cannot place the tree on the top or bottom!\n" "Please change to the Tabs layout in the View menu first." msgstr "" #: src/fe-gtk/setup.c:2218 msgid "Invalid time stamp format! See the strftime MSDN article for details." msgstr "" #: src/fe-gtk/setup.c:2224 msgid "The Real name option cannot be left blank. Falling back to \"realname\"." msgstr "" #: src/fe-gtk/setup.c:2231 msgid "Some settings were changed that require a restart to take full effect." msgstr "有些設定需要重新啟動 xchat 才會生效。" #: src/fe-gtk/setup.c:2239 msgid "" "*WARNING*\n" "Auto accepting DCC to your home directory\n" "can be dangerous and is exploitable. Eg:\n" "Someone could send you a .bash_profile" msgstr "*警告*\n自動接收 DCC 到您的主目錄中是危險之舉,\n且有被盜用的可能性。例如:\n某人可能會給您發送一份 .bash_profile 檔案" #: src/fe-gtk/setup.c:2271 msgid ": Preferences" msgstr ": 偏好設定" #: src/fe-gtk/sexy-spell-entry.c:463 msgid "(no suggestions)" msgstr "" #: src/fe-gtk/sexy-spell-entry.c:477 msgid "More..." msgstr "更多..." #: src/fe-gtk/sexy-spell-entry.c:546 #, c-format msgid "Add \"%s\" to Dictionary" msgstr "" #: src/fe-gtk/sexy-spell-entry.c:588 msgid "Ignore All" msgstr "全部忽略" #: src/fe-gtk/sexy-spell-entry.c:623 msgid "Spelling Suggestions" msgstr "拼字建議" #: src/fe-gtk/sexy-spell-entry.c:1046 #, c-format msgid "enchant error for language: %s" msgstr "" #: src/fe-gtk/textgui.c:170 msgid "There was an error parsing the string" msgstr "解析字串時出錯" #: src/fe-gtk/textgui.c:178 #, c-format msgid "This signal is only passed %d args, $%d is invalid" msgstr "該信號只接受 %d 個引數,$%d 無效" #: src/fe-gtk/textgui.c:294 src/fe-gtk/textgui.c:317 msgid "Print Texts File" msgstr "列印文字檔案" #: src/fe-gtk/textgui.c:362 msgid "Edit Events" msgstr "編輯事件" #: src/fe-gtk/textgui.c:413 msgid "$ Number" msgstr "$ 數字" #: src/fe-gtk/textgui.c:430 msgid "Load From..." msgstr "從...載入" #: src/fe-gtk/textgui.c:431 msgid "Test All" msgstr "測試全部" #: src/fe-gtk/urlgrab.c:198 msgid ": URL Grabber" msgstr ": URL 擷取程式" #: src/fe-gtk/urlgrab.c:212 msgid "Clear list" msgstr "清空清單" #: src/fe-gtk/urlgrab.c:214 msgid "Copy selected URL" msgstr "複製選取的 URL" #: src/fe-gtk/urlgrab.c:214 msgid "Copy" msgstr "複製" #: src/fe-gtk/urlgrab.c:216 msgid "Save list to a file" msgstr "儲存清單到檔案" #: src/fe-gtk/userlistgui.c:108 #, c-format msgid "%d ops, %d total" msgstr "%d 個管理員,共 %d 人"