diff --git a/LICENCE b/LICENCE index 7c49ceb3b..7e5ac2585 100644 --- a/LICENCE +++ b/LICENCE @@ -1,25 +1,14 @@ PuTTY is copyright 1997-2017 Simon Tatham. -Portions copyright Robert de Bath, Joris van Rantwijk, Delian +部分版权属于 Robert de Bath, Joris van Rantwijk, Delian Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A. -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation files -(the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +这里以此方式许可任何人可以免费得到该软件拷贝以及附属文档文件 (""软件""),并可任意处理该软件,包括无限制的使用、复制、修改、合并、出版、分发、转让、授权和/或出售软件的权利,并允许购买该软件的人这样做,只要遵从以下条件: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +以上的版权说明和许可说明应被包含在该软件任何部分的所有拷贝中。 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +该软件是作为 "AS IS" 提供,没有任何保证、表示或暗示,包括但不限于适销性、适用性和不侵权。在任何情况下作者不对任何声明、损坏或其他责任负责,无论是发生在合同行为、侵权或其它任何来自软件的、与软件相关或无关的以及软件的使用。 + +PuTTY 中文版的版权属于 2003-2017 李峰,保留所有权利。 diff --git a/cmdgen.c b/cmdgen.c index 9d9d011ab..ab9f39ba5 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -137,13 +137,13 @@ void showversion(void) void usage(int standalone) { fprintf(standalone ? stderr : stdout, - "Usage: puttygen ( keyfile | -t type [ -b bits ] )\n" - " [ -C comment ] [ -P ] [ -q ]\n" - " [ -o output-keyfile ] [ -O type | -l | -L" + "用法: puttygen ( 密钥文件 | -t 类型 [ -b 位数 ] )\n" + " [ -C 注释 ] [ -P ] [ -q ]\n" + " [ -o 输出密钥文件 ] [ -O 类型 | -l | -L" " | -p ]\n"); if (standalone) fprintf(stderr, - "Use \"puttygen --help\" for more detail.\n"); + "使用 \"puttygen --help\" 了解更多帮助。\n"); } void help(void) @@ -152,34 +152,34 @@ void help(void) * Help message is an extended version of the usage message. So * start with that, plus a version heading. */ - printf("PuTTYgen: key generator and converter for the PuTTY tools\n" + printf("PuTTYgen: PuTTY 密钥生成与转换工具\n" "%s\n", ver); usage(FALSE); - printf(" -t specify key type when generating (ed25519, ecdsa, rsa, " + printf(" -t 指定生成的密钥类型 (ed25519, ecdsa, rsa, " "dsa, rsa1)\n" - " -b specify number of bits when generating key\n" - " -C change or specify key comment\n" - " -P change key passphrase\n" - " -q quiet: do not display progress bar\n" - " -O specify output type:\n" - " private output PuTTY private key format\n" - " private-openssh export OpenSSH private key\n" - " private-openssh-new export OpenSSH private key " - "(force new format)\n" - " private-sshcom export ssh.com private key\n" - " public RFC 4716 / ssh.com public key\n" - " public-openssh OpenSSH public key\n" - " fingerprint output the key fingerprint\n" - " -o specify output file\n" - " -l equivalent to `-O fingerprint'\n" - " -L equivalent to `-O public-openssh'\n" - " -p equivalent to `-O public'\n" - " --old-passphrase file\n" - " specify file containing old key passphrase\n" - " --new-passphrase file\n" - " specify file containing new key passphrase\n" - " --random-device device\n" - " specify device to read entropy from (e.g. /dev/urandom)\n" + " -b 指定生成密钥的位数\n" + " -C 修改或指定密钥注释\n" + " -P 修改密钥密码\n" + " -q 静默: 不显示进度条\n" + " -O 指定输出类型:\n" + " private 输出 PuTTY 私钥格式\n" + " private-openssh 导出 OpenSSH 私钥格式\n" + " private-openssh-new 导出 OpenSSH 私钥格式 " + "(强制新格式)\n" + " private-sshcom 导出 ssh.com 私钥格式\n" + " public RFC 4716 / ssh.com 公钥\n" + " public-openssh OpenSSH 公钥\n" + " fingerprint 输出密钥指纹\n" + " -o 指定输出文件\n" + " -l 等价于 `-O fingerprint'\n" + " -L 等价于 `-O public-openssh'\n" + " -p 等价于 `-O public'\n" + " --old-passphrase 文件\n" + " 指定包含旧密钥密码的文件\n" + " --new-passphrase 文件\n" + " 指定包含新密钥密码的文件\n" + " --random-device 设备\n" + " 指定用于读取熵的设备 (例如:/dev/urandom)\n" ); } diff --git a/config.c b/config.c index 220c1aa8f..5a4dd863e 100644 --- a/config.c +++ b/config.c @@ -10,10 +10,10 @@ #include "dialog.h" #include "storage.h" -#define PRINTER_DISABLED_STRING "None (printing disabled)" +#define PRINTER_DISABLED_STRING "无 (禁止打印)" -#define HOST_BOX_TITLE "Host Name (or IP address)" -#define PORT_BOX_TITLE "Port" +#define HOST_BOX_TITLE "主机名称(或 IP 地址)(N)" +#define PORT_BOX_TITLE "端口(P)" void conf_radiobutton_handler(union control *ctrl, void *dlg, void *data, int event) @@ -170,7 +170,7 @@ static void config_host_handler(union control *ctrl, void *dlg, * This label text is carefully chosen to contain an n, * since that's the shortcut for the host name control. */ - dlg_label_change(ctrl, dlg, "Serial line"); + dlg_label_change(ctrl, dlg, "串行口(N)"); dlg_editbox_set(ctrl, dlg, conf_get_str(conf, CONF_serline)); } else { dlg_label_change(ctrl, dlg, HOST_BOX_TITLE); @@ -203,7 +203,7 @@ static void config_port_handler(union control *ctrl, void *dlg, * This label text is carefully chosen to contain a p, * since that's the shortcut for the port control. */ - dlg_label_change(ctrl, dlg, "Speed"); + dlg_label_change(ctrl, dlg, "速度(P)"); sprintf(buf, "%d", conf_get_int(conf, CONF_serspeed)); } else { dlg_label_change(ctrl, dlg, PORT_BOX_TITLE); @@ -357,13 +357,13 @@ static void cipherlist_handler(union control *ctrl, void *dlg, int i; static const struct { const char *s; int c; } ciphers[] = { - { "ChaCha20 (SSH-2 only)", CIPHER_CHACHA20 }, + { "ChaCha20 (只限 SSH-2)", CIPHER_CHACHA20 }, { "3DES", CIPHER_3DES }, { "Blowfish", CIPHER_BLOWFISH }, { "DES", CIPHER_DES }, - { "AES (SSH-2 only)", CIPHER_AES }, - { "Arcfour (SSH-2 only)", CIPHER_ARCFOUR }, - { "-- warn below here --", CIPHER_WARN } + { "AES (只限 SSH-2)", CIPHER_AES }, + { "Arcfour (只限 SSH-2)", CIPHER_ARCFOUR }, + { "-- 下面为警告选项 --", CIPHER_WARN } }; /* Set up the "selected ciphers" box. */ @@ -435,7 +435,7 @@ static void kexlist_handler(union control *ctrl, void *dlg, { "Diffie-Hellman group exchange", KEX_DHGEX }, { "RSA-based key exchange", KEX_RSA }, { "ECDH key exchange", KEX_ECDH }, - { "-- warn below here --", KEX_WARN } + { "-- 下面为警告选项 --", KEX_WARN } }; /* Set up the "kex preference" box. */ @@ -478,7 +478,7 @@ static void hklist_handler(union control *ctrl, void *dlg, { "ECDSA", HK_ECDSA }, { "DSA", HK_DSA }, { "RSA", HK_RSA }, - { "-- warn below here --", HK_WARN } + { "-- 下面为警告选项 --", HK_WARN } }; /* Set up the "host key preference" box. */ @@ -583,9 +583,9 @@ static void sshbug_handler(union control *ctrl, void *dlg, int oldconf = conf_get_int(conf, ctrl->listbox.context.i); dlg_update_start(ctrl, dlg); dlg_listbox_clear(ctrl, dlg); - dlg_listbox_addwithid(ctrl, dlg, "Auto", AUTO); - dlg_listbox_addwithid(ctrl, dlg, "Off", FORCE_OFF); - dlg_listbox_addwithid(ctrl, dlg, "On", FORCE_ON); + dlg_listbox_addwithid(ctrl, dlg, "自动", AUTO); + dlg_listbox_addwithid(ctrl, dlg, "关", FORCE_OFF); + dlg_listbox_addwithid(ctrl, dlg, "开", FORCE_ON); switch (oldconf) { case AUTO: dlg_listbox_select(ctrl, dlg, 0); break; case FORCE_OFF: dlg_listbox_select(ctrl, dlg, 1); break; @@ -632,7 +632,7 @@ static int load_selected_session(struct sessionsaver_data *ssd, dlg_beep(dlg); return 0; } - isdef = !strcmp(ssd->sesslist.sessions[i], "Default Settings"); + isdef = !strcmp(ssd->sesslist.sessions[i], "默认设置"); load_settings(ssd->sesslist.sessions[i], conf); sfree(ssd->savedsession); ssd->savedsession = dupstr(isdef ? "" : ssd->sesslist.sessions[i]); @@ -701,14 +701,14 @@ static void sessionsaver_handler(union control *ctrl, void *dlg, dlg_end(dlg, 1); /* it's all over, and succeeded */ } } else if (ctrl == ssd->savebutton) { - int isdef = !strcmp(ssd->savedsession, "Default Settings"); + int isdef = !strcmp(ssd->savedsession, "默认设置"); if (!ssd->savedsession[0]) { int i = dlg_listbox_index(ssd->listbox, dlg); if (i < 0) { dlg_beep(dlg); return; } - isdef = !strcmp(ssd->sesslist.sessions[i], "Default Settings"); + isdef = !strcmp(ssd->sesslist.sessions[i], "默认设置"); sfree(ssd->savedsession); ssd->savedsession = dupstr(isdef ? "" : ssd->sesslist.sessions[i]); @@ -828,17 +828,17 @@ struct colour_data { }; static const char *const colours[] = { - "Default Foreground", "Default Bold Foreground", - "Default Background", "Default Bold Background", - "Cursor Text", "Cursor Colour", - "ANSI Black", "ANSI Black Bold", - "ANSI Red", "ANSI Red Bold", - "ANSI Green", "ANSI Green Bold", - "ANSI Yellow", "ANSI Yellow Bold", - "ANSI Blue", "ANSI Blue Bold", - "ANSI Magenta", "ANSI Magenta Bold", - "ANSI Cyan", "ANSI Cyan Bold", - "ANSI White", "ANSI White Bold" + "默认前景", "默认前景(粗)", + "默认背景", "默认背景(粗)", + "光标文本", "光标颜色", + "ANSI 黑", "ANSI 黑(粗)", + "ANSI 红", "ANSI 红(粗)", + "ANSI 绿", "ANSI 绿(粗)", + "ANSI 黄", "ANSI 黄(粗)", + "ANSI 蓝", "ANSI 蓝(粗)", + "ANSI 紫", "ANSI 紫(粗)", + "ANSI 青", "ANSI 青(粗)", + "ANSI 白", "ANSI 白(粗)" }; static void colour_handler(union control *ctrl, void *dlg, @@ -965,8 +965,8 @@ static void ttymodes_handler(union control *ctrl, void *dlg, val != NULL; val = conf_get_str_strs(conf, CONF_ttymodes, key, &key)) { char *disp = dupprintf("%s\t%s", key, - (val[0] == 'A') ? "(auto)" : - ((val[0] == 'N') ? "(don't send)" + (val[0] == 'A') ? "(自动)" : + ((val[0] == 'N') ? "(不发送)" : val+1)); dlg_listbox_add(ctrl, dlg, disp); sfree(disp); @@ -1184,7 +1184,7 @@ static void portfwd_handler(union control *ctrl, void *dlg, src = dlg_editbox_get(pfd->sourcebox, dlg); if (!*src) { - dlg_error_msg(dlg, "You need to specify a source port number"); + dlg_error_msg(dlg, "需要指定一个来源端口数字"); sfree(src); return; } @@ -1192,8 +1192,8 @@ static void portfwd_handler(union control *ctrl, void *dlg, val = dlg_editbox_get(pfd->destbox, dlg); if (!*val || !host_strchr(val, ':')) { dlg_error_msg(dlg, - "You need to specify a destination address\n" - "in the form \"host.name:port\""); + "需要在表单指定一个目标地址\n" + "如 \"host.name:port\""); sfree(src); sfree(val); return; @@ -1207,7 +1207,7 @@ static void portfwd_handler(union control *ctrl, void *dlg, sfree(src); if (conf_get_str_str_opt(conf, CONF_portfwd, key)) { - dlg_error_msg(dlg, "Specified forwarding already exists"); + dlg_error_msg(dlg, "指定的转向已经存在"); } else { conf_set_str_str(conf, CONF_portfwd, key, val); } @@ -1301,17 +1301,17 @@ static void manual_hostkey_handler(union control *ctrl, void *dlg, key = dlg_editbox_get(mh->keybox, dlg); if (!*key) { - dlg_error_msg(dlg, "You need to specify a host key or " - "fingerprint"); + dlg_error_msg(dlg, "需要指定一个主机密钥或" + "指纹"); sfree(key); return; } if (!validate_manual_hostkey(key)) { - dlg_error_msg(dlg, "Host key is not in a valid format"); + dlg_error_msg(dlg, "主机密钥不是一个有效的格式"); } else if (conf_get_str_str_opt(conf, CONF_ssh_manual_hostkeys, key)) { - dlg_error_msg(dlg, "Specified host key is already listed"); + dlg_error_msg(dlg, "指定的主机密钥已存在"); } else { conf_set_str_str(conf, CONF_ssh_manual_hostkeys, key, ""); } @@ -1365,13 +1365,13 @@ void setup_config_box(struct controlbox *b, int midsession, s = ctrl_getset(b, "", "", ""); ctrl_columns(s, 5, 20, 20, 20, 20, 20); ssd->okbutton = ctrl_pushbutton(s, - (midsession ? "Apply" : "Open"), + (midsession ? "应用(A)" : "打开(O)"), (char)(midsession ? 'a' : 'o'), HELPCTX(no_help), sessionsaver_handler, P(ssd)); ssd->okbutton->button.isdefault = TRUE; ssd->okbutton->generic.column = 3; - ssd->cancelbutton = ctrl_pushbutton(s, "Cancel", 'c', HELPCTX(no_help), + ssd->cancelbutton = ctrl_pushbutton(s, "取消(C)", 'c', HELPCTX(no_help), sessionsaver_handler, P(ssd)); ssd->cancelbutton->button.iscancel = TRUE; ssd->cancelbutton->generic.column = 4; @@ -1381,16 +1381,16 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Session panel. */ - str = dupprintf("Basic options for your %s session", appname); - ctrl_settitle(b, "Session", str); + str = dupprintf("%s 会话基本设置", appname); + ctrl_settitle(b, "会话", str); sfree(str); if (!midsession) { struct hostport *hp = (struct hostport *) ctrl_alloc(b, sizeof(struct hostport)); - s = ctrl_getset(b, "Session", "hostport", - "Specify the destination you want to connect to"); + s = ctrl_getset(b, "会话", "hostport", + "指定要连接的目的地址"); ctrl_columns(s, 2, 75, 25); c = ctrl_editbox(s, HOST_BOX_TITLE, 'n', 100, HELPCTX(session_hostname), @@ -1405,7 +1405,7 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_columns(s, 1, 100); if (!backend_from_proto(PROT_SSH)) { - ctrl_radiobuttons(s, "Connection type:", NO_SHORTCUT, 3, + ctrl_radiobuttons(s, "连接类型:", NO_SHORTCUT, 3, HELPCTX(session_hostname), config_protocolbuttons_handler, P(hp), "Raw", 'w', I(PROT_RAW), @@ -1413,7 +1413,7 @@ void setup_config_box(struct controlbox *b, int midsession, "Rlogin", 'i', I(PROT_RLOGIN), NULL); } else { - ctrl_radiobuttons(s, "Connection type:", NO_SHORTCUT, 4, + ctrl_radiobuttons(s, "连接类型:", NO_SHORTCUT, 4, HELPCTX(session_hostname), config_protocolbuttons_handler, P(hp), "Raw", 'w', I(PROT_RAW), @@ -1427,12 +1427,12 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Load/Save panel is available even in mid-session. */ - s = ctrl_getset(b, "Session", "savedsessions", - midsession ? "Save the current session settings" : - "Load, save or delete a stored session"); + s = ctrl_getset(b, "会话", "savedsessions", + midsession ? "保存当前会话设置" : + "载入、保存或删除已存在的会话"); ctrl_columns(s, 2, 75, 25); get_sesslist(&ssd->sesslist, TRUE); - ssd->editbox = ctrl_editbox(s, "Saved Sessions", 'e', 100, + ssd->editbox = ctrl_editbox(s, "保存的会话(E)", 'e', 100, HELPCTX(session_saved), sessionsaver_handler, P(ssd), P(NULL)); ssd->editbox->generic.column = 0; @@ -1446,7 +1446,7 @@ void setup_config_box(struct controlbox *b, int midsession, ssd->listbox->generic.column = 0; ssd->listbox->listbox.height = 7; if (!midsession) { - ssd->loadbutton = ctrl_pushbutton(s, "Load", 'l', + ssd->loadbutton = ctrl_pushbutton(s, "载入(L)", 'l', HELPCTX(session_saved), sessionsaver_handler, P(ssd)); ssd->loadbutton->generic.column = 1; @@ -1458,12 +1458,12 @@ void setup_config_box(struct controlbox *b, int midsession, ssd->loadbutton = NULL; } /* "Save" button is permitted mid-session. */ - ssd->savebutton = ctrl_pushbutton(s, "Save", 'v', + ssd->savebutton = ctrl_pushbutton(s, "保存(V)", 'v', HELPCTX(session_saved), sessionsaver_handler, P(ssd)); ssd->savebutton->generic.column = 1; if (!midsession) { - ssd->delbutton = ctrl_pushbutton(s, "Delete", 'd', + ssd->delbutton = ctrl_pushbutton(s, "删除(D)", 'd', HELPCTX(session_saved), sessionsaver_handler, P(ssd)); ssd->delbutton->generic.column = 1; @@ -1473,21 +1473,21 @@ void setup_config_box(struct controlbox *b, int midsession, } ctrl_columns(s, 1, 100); - s = ctrl_getset(b, "Session", "otheropts", NULL); - ctrl_radiobuttons(s, "Close window on exit:", 'x', 4, + s = ctrl_getset(b, "会话", "otheropts", NULL); + ctrl_radiobuttons(s, "退出时关闭窗口(X):", 'x', 4, HELPCTX(session_coe), conf_radiobutton_handler, I(CONF_close_on_exit), - "Always", I(FORCE_ON), - "Never", I(FORCE_OFF), - "Only on clean exit", I(AUTO), NULL); + "总是", I(FORCE_ON), + "从不", I(FORCE_OFF), + "仅正常退出", I(AUTO), NULL); /* * The Session/Logging panel. */ - ctrl_settitle(b, "Session/Logging", "Options controlling session logging"); + ctrl_settitle(b, "会话/日志记录", "会话日志记录选项"); - s = ctrl_getset(b, "Session/Logging", "main", NULL); + s = ctrl_getset(b, "会话/日志记录", "main", NULL); /* * The logging buttons change depending on whether SSH packet * logging can sensibly be available. @@ -1496,48 +1496,48 @@ void setup_config_box(struct controlbox *b, int midsession, const char *sshlogname, *sshrawlogname; if ((midsession && protocol == PROT_SSH) || (!midsession && backend_from_proto(PROT_SSH))) { - sshlogname = "SSH packets"; - sshrawlogname = "SSH packets and raw data"; + sshlogname = "SSH 包"; + sshrawlogname = "SSH 包和 RAW 数据"; } else { sshlogname = NULL; /* this will disable both buttons */ sshrawlogname = NULL; /* this will just placate optimisers */ } - ctrl_radiobuttons(s, "Session logging:", NO_SHORTCUT, 2, + ctrl_radiobuttons(s, "会话日志记录:", NO_SHORTCUT, 2, HELPCTX(logging_main), loggingbuttons_handler, I(CONF_logtype), - "None", 't', I(LGTYP_NONE), - "Printable output", 'p', I(LGTYP_ASCII), - "All session output", 'l', I(LGTYP_DEBUG), + "无(T)", 't', I(LGTYP_NONE), + "可打印输出(P)", 'p', I(LGTYP_ASCII), + "所有会话输出(L)", 'l', I(LGTYP_DEBUG), sshlogname, 's', I(LGTYP_PACKETS), sshrawlogname, 'r', I(LGTYP_SSHRAW), NULL); } - ctrl_filesel(s, "Log file name:", 'f', - NULL, TRUE, "Select session log file name", + ctrl_filesel(s, "日志文件名(F):", 'f', + NULL, TRUE, "选择会话的日志文件名", HELPCTX(logging_filename), conf_filesel_handler, I(CONF_logfilename)); - ctrl_text(s, "(Log file name can contain &Y, &M, &D for date," - " &T for time, &H for host name, and &P for port number)", + ctrl_text(s, "(日志文件名可以包含 &Y &M &D 表示年月日," + "&T 表示时间,&H 表示主机名称)", HELPCTX(logging_filename)); - ctrl_radiobuttons(s, "What to do if the log file already exists:", 'e', 1, + ctrl_radiobuttons(s, "要记录的日志文件已存在时(E):", 'e', 1, HELPCTX(logging_exists), conf_radiobutton_handler, I(CONF_logxfovr), - "Always overwrite it", I(LGXF_OVR), - "Always append to the end of it", I(LGXF_APN), - "Ask the user every time", I(LGXF_ASK), NULL); - ctrl_checkbox(s, "Flush log file frequently", 'u', + "总是覆盖", I(LGXF_OVR), + "总是添加到末尾", I(LGXF_APN), + "每次询问", I(LGXF_ASK), NULL); + ctrl_checkbox(s, "快速刷新缓存到日志文件(U)", 'u', HELPCTX(logging_flush), conf_checkbox_handler, I(CONF_logflush)); if ((midsession && protocol == PROT_SSH) || (!midsession && backend_from_proto(PROT_SSH))) { - s = ctrl_getset(b, "Session/Logging", "ssh", - "Options specific to SSH packet logging"); - ctrl_checkbox(s, "Omit known password fields", 'k', + s = ctrl_getset(b, "会话/日志记录", "ssh", + "指定 SSH 包日志记录设置"); + ctrl_checkbox(s, "忽略已知的密码域(K)", 'k', HELPCTX(logging_ssh_omit_password), conf_checkbox_handler, I(CONF_logomitpass)); - ctrl_checkbox(s, "Omit session data", 'd', + ctrl_checkbox(s, "忽略会话数据(D)", 'd', HELPCTX(logging_ssh_omit_data), conf_checkbox_handler, I(CONF_logomitdata)); } @@ -1545,117 +1545,117 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Terminal panel. */ - ctrl_settitle(b, "Terminal", "Options controlling the terminal emulation"); + ctrl_settitle(b, "终端", "终端模拟设置"); - s = ctrl_getset(b, "Terminal", "general", "Set various terminal options"); - ctrl_checkbox(s, "Auto wrap mode initially on", 'w', + s = ctrl_getset(b, "终端", "general", "设置不同的终端选项"); + ctrl_checkbox(s, "初始开启自动换行(W)", 'w', HELPCTX(terminal_autowrap), conf_checkbox_handler, I(CONF_wrap_mode)); - ctrl_checkbox(s, "DEC Origin Mode initially on", 'd', + ctrl_checkbox(s, "初始开启 DEC 原始模式", 'd', HELPCTX(terminal_decom), conf_checkbox_handler, I(CONF_dec_om)); - ctrl_checkbox(s, "Implicit CR in every LF", 'r', + ctrl_checkbox(s, "在每个 LF 字符后增加 CR 字符", 'r', HELPCTX(terminal_lfhascr), conf_checkbox_handler, I(CONF_lfhascr)); - ctrl_checkbox(s, "Implicit LF in every CR", 'f', + ctrl_checkbox(s, "在每个 CR 字符后增加 LF 字符", 'f', HELPCTX(terminal_crhaslf), conf_checkbox_handler, I(CONF_crhaslf)); - ctrl_checkbox(s, "Use background colour to erase screen", 'e', + ctrl_checkbox(s, "使用背景颜色清除屏幕(E)", 'e', HELPCTX(terminal_bce), conf_checkbox_handler, I(CONF_bce)); - ctrl_checkbox(s, "Enable blinking text", 'n', + ctrl_checkbox(s, "开启闪烁字文本(N)", 'n', HELPCTX(terminal_blink), conf_checkbox_handler, I(CONF_blinktext)); - ctrl_editbox(s, "Answerback to ^E:", 's', 100, + ctrl_editbox(s, "^E 回应(S):", 's', 100, HELPCTX(terminal_answerback), conf_editbox_handler, I(CONF_answerback), I(1)); - s = ctrl_getset(b, "Terminal", "ldisc", "Line discipline options"); - ctrl_radiobuttons(s, "Local echo:", 'l', 3, + s = ctrl_getset(b, "终端", "ldisc", "行规则选项"); + ctrl_radiobuttons(s, "本地回应(L):", 'l', 3, HELPCTX(terminal_localecho), conf_radiobutton_handler,I(CONF_localecho), - "Auto", I(AUTO), - "Force on", I(FORCE_ON), - "Force off", I(FORCE_OFF), NULL); - ctrl_radiobuttons(s, "Local line editing:", 't', 3, + "自动", I(AUTO), + "强制开", I(FORCE_ON), + "强制关", I(FORCE_OFF), NULL); + ctrl_radiobuttons(s, "本地行编辑(T):", 't', 3, HELPCTX(terminal_localedit), conf_radiobutton_handler,I(CONF_localedit), - "Auto", I(AUTO), - "Force on", I(FORCE_ON), - "Force off", I(FORCE_OFF), NULL); + "自动", I(AUTO), + "强制开", I(FORCE_ON), + "强制关", I(FORCE_OFF), NULL); - s = ctrl_getset(b, "Terminal", "printing", "Remote-controlled printing"); - ctrl_combobox(s, "Printer to send ANSI printer output to:", 'p', 100, + s = ctrl_getset(b, "终端", "printing", "远程控制打印"); + ctrl_combobox(s, "打印发送 ANSI 打印机输出到(P):", 'p', 100, HELPCTX(terminal_printing), printerbox_handler, P(NULL), P(NULL)); /* * The Terminal/Keyboard panel. */ - ctrl_settitle(b, "Terminal/Keyboard", - "Options controlling the effects of keys"); + ctrl_settitle(b, "终端/键盘", + "按键效果设置"); - s = ctrl_getset(b, "Terminal/Keyboard", "mappings", - "Change the sequences sent by:"); - ctrl_radiobuttons(s, "The Backspace key", 'b', 2, + s = ctrl_getset(b, "终端/键盘", "mappings", + "修改按键码发送序列:"); + ctrl_radiobuttons(s, "Backspace 回退键", 'b', 2, HELPCTX(keyboard_backspace), conf_radiobutton_handler, I(CONF_bksp_is_delete), "Control-H", I(0), "Control-? (127)", I(1), NULL); - ctrl_radiobuttons(s, "The Home and End keys", 'e', 2, + ctrl_radiobuttons(s, "Home 和 End 键", 'e', 2, HELPCTX(keyboard_homeend), conf_radiobutton_handler, I(CONF_rxvt_homeend), - "Standard", I(0), "rxvt", I(1), NULL); - ctrl_radiobuttons(s, "The Function keys and keypad", 'f', 3, + "标准", I(0), "rxvt", I(1), NULL); + ctrl_radiobuttons(s, "Fn 功能键和小键盘", 'f', 3, HELPCTX(keyboard_funkeys), conf_radiobutton_handler, I(CONF_funky_type), "ESC[n~", I(0), "Linux", I(1), "Xterm R6", I(2), "VT400", I(3), "VT100+", I(4), "SCO", I(5), NULL); - s = ctrl_getset(b, "Terminal/Keyboard", "appkeypad", - "Application keypad settings:"); - ctrl_radiobuttons(s, "Initial state of cursor keys:", 'r', 3, + s = ctrl_getset(b, "终端/键盘", "appkeypad", + "应用小键盘设置:"); + ctrl_radiobuttons(s, "光标键初始状态(R):", 'r', 3, HELPCTX(keyboard_appcursor), conf_radiobutton_handler, I(CONF_app_cursor), - "Normal", I(0), "Application", I(1), NULL); - ctrl_radiobuttons(s, "Initial state of numeric keypad:", 'n', 3, + "常规", I(0), "应用", I(1), NULL); + ctrl_radiobuttons(s, "数字小键盘初始状态(N):", 'n', 3, HELPCTX(keyboard_appkeypad), numeric_keypad_handler, P(NULL), - "Normal", I(0), "Application", I(1), "NetHack", I(2), + "常规", I(0), "应用", I(1), "NetHack", I(2), NULL); /* * The Terminal/Bell panel. */ - ctrl_settitle(b, "Terminal/Bell", - "Options controlling the terminal bell"); + ctrl_settitle(b, "终端/响铃", + "终端响铃设置"); - s = ctrl_getset(b, "Terminal/Bell", "style", "Set the style of bell"); - ctrl_radiobuttons(s, "Action to happen when a bell occurs:", 'b', 1, + s = ctrl_getset(b, "终端/响铃", "style", "设置响铃类型"); + ctrl_radiobuttons(s, "发生响铃时动作(B):", 'b', 1, HELPCTX(bell_style), conf_radiobutton_handler, I(CONF_beep), - "None (bell disabled)", I(BELL_DISABLED), - "Make default system alert sound", I(BELL_DEFAULT), - "Visual bell (flash window)", I(BELL_VISUAL), NULL); + "无 (禁止响铃)", I(BELL_DISABLED), + "使用系统默认警告声音", I(BELL_DEFAULT), + "可视响铃 (闪动窗口)", I(BELL_VISUAL), NULL); - s = ctrl_getset(b, "Terminal/Bell", "overload", - "Control the bell overload behaviour"); - ctrl_checkbox(s, "Bell is temporarily disabled when over-used", 'd', + s = ctrl_getset(b, "终端/响铃", "overload", + "设置重复响铃处理"); + ctrl_checkbox(s, "大量重复响铃时临时禁止响铃(D)", 'd', HELPCTX(bell_overload), conf_checkbox_handler, I(CONF_bellovl)); - ctrl_editbox(s, "Over-use means this many bells...", 'm', 20, + ctrl_editbox(s, "重复响铃最少数目(M):", 'm', 20, HELPCTX(bell_overload), conf_editbox_handler, I(CONF_bellovl_n), I(-1)); - ctrl_editbox(s, "... in this many seconds", 't', 20, + ctrl_editbox(s, "重复响铃计算时间(秒)(T):", 't', 20, HELPCTX(bell_overload), conf_editbox_handler, I(CONF_bellovl_t), I(-TICKSPERSEC)); - ctrl_text(s, "The bell is re-enabled after a few seconds of silence.", + ctrl_text(s, "响铃将在被禁止一段时间后重新被允许。", HELPCTX(bell_overload)); - ctrl_editbox(s, "Seconds of silence required", 's', 20, + ctrl_editbox(s, "被禁止响铃的时间(秒)(S):", 's', 20, HELPCTX(bell_overload), conf_editbox_handler, I(CONF_bellovl_s), I(-TICKSPERSEC)); @@ -1663,88 +1663,88 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Terminal/Features panel. */ - ctrl_settitle(b, "Terminal/Features", - "Enabling and disabling advanced terminal features"); + ctrl_settitle(b, "终端/特性", + "允许或禁止高级终端特性"); - s = ctrl_getset(b, "Terminal/Features", "main", NULL); - ctrl_checkbox(s, "Disable application cursor keys mode", 'u', + s = ctrl_getset(b, "终端/特性", "main", NULL); + ctrl_checkbox(s, "禁止应用光标键模式(U)", 'u', HELPCTX(features_application), conf_checkbox_handler, I(CONF_no_applic_c)); - ctrl_checkbox(s, "Disable application keypad mode", 'k', + ctrl_checkbox(s, "禁止应用小键盘模式(K)", 'k', HELPCTX(features_application), conf_checkbox_handler, I(CONF_no_applic_k)); - ctrl_checkbox(s, "Disable xterm-style mouse reporting", 'x', + ctrl_checkbox(s, "禁止 xterm 类型鼠标报告", 'x', HELPCTX(features_mouse), conf_checkbox_handler, I(CONF_no_mouse_rep)); - ctrl_checkbox(s, "Disable remote-controlled terminal resizing", 's', + ctrl_checkbox(s, "禁止改变远程控制终端大小(S)", 's', HELPCTX(features_resize), conf_checkbox_handler, I(CONF_no_remote_resize)); - ctrl_checkbox(s, "Disable switching to alternate terminal screen", 'w', + ctrl_checkbox(s, "禁止切换终端屏幕(W)", 'w', HELPCTX(features_altscreen), conf_checkbox_handler, I(CONF_no_alt_screen)); - ctrl_checkbox(s, "Disable remote-controlled window title changing", 't', + ctrl_checkbox(s, "禁止改变远程控制窗口标题(T)", 't', HELPCTX(features_retitle), conf_checkbox_handler, I(CONF_no_remote_wintitle)); - ctrl_checkbox(s, "Disable remote-controlled clearing of scrollback", 'e', + ctrl_checkbox(s, "禁止远程控制清除回滚(E)", 'e', HELPCTX(features_clearscroll), conf_checkbox_handler, I(CONF_no_remote_clearscroll)); - ctrl_radiobuttons(s, "Response to remote title query (SECURITY):", 'q', 3, + ctrl_radiobuttons(s, "远程标题查询回应(SECURITY)(Q):", 'q', 3, HELPCTX(features_qtitle), conf_radiobutton_handler, I(CONF_remote_qtitle_action), - "None", I(TITLE_NONE), - "Empty string", I(TITLE_EMPTY), - "Window title", I(TITLE_REAL), NULL); - ctrl_checkbox(s, "Disable destructive backspace on server sending ^?",'b', + "无", I(TITLE_NONE), + "空字符串", I(TITLE_EMPTY), + "窗口标题", I(TITLE_REAL), NULL); + ctrl_checkbox(s, "禁止服务器发送 ^? 时破坏性回退删除(B)",'b', HELPCTX(features_dbackspace), conf_checkbox_handler, I(CONF_no_dbackspace)); - ctrl_checkbox(s, "Disable remote-controlled character set configuration", + ctrl_checkbox(s, "禁止远程控制字符集设置(R)", 'r', HELPCTX(features_charset), conf_checkbox_handler, I(CONF_no_remote_charset)); - ctrl_checkbox(s, "Disable Arabic text shaping", + ctrl_checkbox(s, "禁止修整阿拉伯文本(L)", 'l', HELPCTX(features_arabicshaping), conf_checkbox_handler, I(CONF_arabicshaping)); - ctrl_checkbox(s, "Disable bidirectional text display", + ctrl_checkbox(s, "禁止双向文本显示(D)", 'd', HELPCTX(features_bidi), conf_checkbox_handler, I(CONF_bidi)); /* * The Window panel. */ - str = dupprintf("Options controlling %s's window", appname); - ctrl_settitle(b, "Window", str); + str = dupprintf("%s 窗口设置", appname); + ctrl_settitle(b, "窗口", str); sfree(str); - s = ctrl_getset(b, "Window", "size", "Set the size of the window"); + s = ctrl_getset(b, "窗口", "size", "设置窗口大小"); ctrl_columns(s, 2, 50, 50); - c = ctrl_editbox(s, "Columns", 'm', 100, + c = ctrl_editbox(s, "列(M)", 'm', 100, HELPCTX(window_size), conf_editbox_handler, I(CONF_width), I(-1)); c->generic.column = 0; - c = ctrl_editbox(s, "Rows", 'r', 100, + c = ctrl_editbox(s, "行(R)", 'r', 100, HELPCTX(window_size), conf_editbox_handler, I(CONF_height),I(-1)); c->generic.column = 1; ctrl_columns(s, 1, 100); - s = ctrl_getset(b, "Window", "scrollback", - "Control the scrollback in the window"); - ctrl_editbox(s, "Lines of scrollback", 's', 50, + s = ctrl_getset(b, "窗口", "scrollback", + "设置窗口回滚"); + ctrl_editbox(s, "回滚行数(S)", 's', 50, HELPCTX(window_scrollback), conf_editbox_handler, I(CONF_savelines), I(-1)); - ctrl_checkbox(s, "Display scrollbar", 'd', + ctrl_checkbox(s, "显示滚动条(D)", 'd', HELPCTX(window_scrollback), conf_checkbox_handler, I(CONF_scrollbar)); - ctrl_checkbox(s, "Reset scrollback on keypress", 'k', + ctrl_checkbox(s, "按键时重置回滚(K)", 'k', HELPCTX(window_scrollback), conf_checkbox_handler, I(CONF_scroll_on_key)); - ctrl_checkbox(s, "Reset scrollback on display activity", 'p', + ctrl_checkbox(s, "刷新显示时重置回滚(P)", 'p', HELPCTX(window_scrollback), conf_checkbox_handler, I(CONF_scroll_on_disp)); - ctrl_checkbox(s, "Push erased text into scrollback", 'e', + ctrl_checkbox(s, "将清除的文本压入回滚(E)", 'e', HELPCTX(window_erased), conf_checkbox_handler, I(CONF_erase_to_scrollback)); @@ -1752,38 +1752,38 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Window/Appearance panel. */ - str = dupprintf("Configure the appearance of %s's window", appname); - ctrl_settitle(b, "Window/Appearance", str); + str = dupprintf("配置 %s 窗口外观", appname); + ctrl_settitle(b, "窗口/外观", str); sfree(str); - s = ctrl_getset(b, "Window/Appearance", "cursor", - "Adjust the use of the cursor"); - ctrl_radiobuttons(s, "Cursor appearance:", NO_SHORTCUT, 3, + s = ctrl_getset(b, "窗口/外观", "cursor", + "调整光标"); + ctrl_radiobuttons(s, "光标显示:", NO_SHORTCUT, 3, HELPCTX(appearance_cursor), conf_radiobutton_handler, I(CONF_cursor_type), - "Block", 'l', I(0), - "Underline", 'u', I(1), - "Vertical line", 'v', I(2), NULL); - ctrl_checkbox(s, "Cursor blinks", 'b', + "显示块(L)", 'l', I(0), + "下划线(U)", 'u', I(1), + "垂直线(V)", 'v', I(2), NULL); + ctrl_checkbox(s, "光标闪烁(B)", 'b', HELPCTX(appearance_cursor), conf_checkbox_handler, I(CONF_blink_cur)); - s = ctrl_getset(b, "Window/Appearance", "font", - "Font settings"); - ctrl_fontsel(s, "Font used in the terminal window", 'n', + s = ctrl_getset(b, "窗口/外观", "font", + "字体设置"); + ctrl_fontsel(s, "终端窗口使用的字体(N)", 'n', HELPCTX(appearance_font), conf_fontsel_handler, I(CONF_font)); - s = ctrl_getset(b, "Window/Appearance", "mouse", - "Adjust the use of the mouse pointer"); - ctrl_checkbox(s, "Hide mouse pointer when typing in window", 'p', + s = ctrl_getset(b, "窗口/外观", "mouse", + "调整鼠标指针"); + ctrl_checkbox(s, "在窗口中输入时隐藏鼠标指针(P)", 'p', HELPCTX(appearance_hidemouse), conf_checkbox_handler, I(CONF_hide_mouseptr)); - s = ctrl_getset(b, "Window/Appearance", "border", - "Adjust the window border"); - ctrl_editbox(s, "Gap between text and window edge:", 'e', 20, + s = ctrl_getset(b, "窗口/外观", "border", + "调整窗口边框"); + ctrl_editbox(s, "文本与窗口边界的距离(E):", 'e', 20, HELPCTX(appearance_border), conf_editbox_handler, I(CONF_window_border), I(-1)); @@ -1791,80 +1791,80 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Window/Behaviour panel. */ - str = dupprintf("Configure the behaviour of %s's window", appname); - ctrl_settitle(b, "Window/Behaviour", str); + str = dupprintf("配置 %s 窗口行为", appname); + ctrl_settitle(b, "窗口/行为", str); sfree(str); - s = ctrl_getset(b, "Window/Behaviour", "title", - "Adjust the behaviour of the window title"); - ctrl_editbox(s, "Window title:", 't', 100, + s = ctrl_getset(b, "窗口/行为", "title", + "调整窗口标题外观"); + ctrl_editbox(s, "窗口标题(T):", 't', 100, HELPCTX(appearance_title), conf_editbox_handler, I(CONF_wintitle), I(1)); - ctrl_checkbox(s, "Separate window and icon titles", 'i', + ctrl_checkbox(s, "使用单独的客户区窗口(I)", 'i', HELPCTX(appearance_title), conf_checkbox_handler, I(CHECKBOX_INVERT | CONF_win_name_always)); - s = ctrl_getset(b, "Window/Behaviour", "main", NULL); - ctrl_checkbox(s, "Warn before closing window", 'w', + s = ctrl_getset(b, "窗口/行为", "main", NULL); + ctrl_checkbox(s, "关闭窗口时警告(W)", 'w', HELPCTX(behaviour_closewarn), conf_checkbox_handler, I(CONF_warn_on_close)); /* * The Window/Translation panel. */ - ctrl_settitle(b, "Window/Translation", - "Options controlling character set translation"); + ctrl_settitle(b, "窗口/转换", + "字符集转换设置"); - s = ctrl_getset(b, "Window/Translation", "trans", - "Character set translation"); - ctrl_combobox(s, "Remote character set:", + s = ctrl_getset(b, "窗口/转换", "trans", + "字符集转换"); + ctrl_combobox(s, "远程字符集(R):", 'r', 100, HELPCTX(translation_codepage), codepage_handler, P(NULL), P(NULL)); - s = ctrl_getset(b, "Window/Translation", "tweaks", NULL); - ctrl_checkbox(s, "Treat CJK ambiguous characters as wide", 'w', + s = ctrl_getset(b, "窗口/转换", "tweaks", NULL); + ctrl_checkbox(s, "将不确定字符处理为 CJK 字符(W)", 'w', HELPCTX(translation_cjk_ambig_wide), conf_checkbox_handler, I(CONF_cjk_ambig_wide)); - str = dupprintf("Adjust how %s handles line drawing characters", appname); - s = ctrl_getset(b, "Window/Translation", "linedraw", str); + str = dupprintf("调整 %s 如何重画字符行", appname); + s = ctrl_getset(b, "窗口/转换", "linedraw", str); sfree(str); - ctrl_radiobuttons(s, "Handling of line drawing characters:", NO_SHORTCUT,1, + ctrl_radiobuttons(s, "重画字符行处理:", NO_SHORTCUT,1, HELPCTX(translation_linedraw), conf_radiobutton_handler, I(CONF_vtmode), - "Use Unicode line drawing code points",'u',I(VT_UNICODE), - "Poor man's line drawing (+, - and |)",'p',I(VT_POORMAN), + "使用 Unicode 统一码重画代码",'u',I(VT_UNICODE), + "简单重画行(+、- 和 |)(P)",'p',I(VT_POORMAN), NULL); - ctrl_checkbox(s, "Copy and paste line drawing characters as lqqqk",'d', + ctrl_checkbox(s, "重画字符类似 lqqqk 复制粘贴行(D)",'d', HELPCTX(selection_linedraw), conf_checkbox_handler, I(CONF_rawcnp)); /* * The Window/Selection panel. */ - ctrl_settitle(b, "Window/Selection", "Options controlling copy and paste"); + ctrl_settitle(b, "窗口/选择", "复制粘贴设置"); - s = ctrl_getset(b, "Window/Selection", "mouse", - "Control use of mouse"); - ctrl_checkbox(s, "Shift overrides application's use of mouse", 'p', + s = ctrl_getset(b, "窗口/选择", "mouse", + "鼠标使用控制"); + ctrl_checkbox(s, "Shift 上档键可与鼠标组合使用(P)", 'p', HELPCTX(selection_shiftdrag), conf_checkbox_handler, I(CONF_mouse_override)); ctrl_radiobuttons(s, - "Default selection mode (Alt+drag does the other one):", + "默认选择模式(Alt 换档键拖放为另一种模式):", NO_SHORTCUT, 2, HELPCTX(selection_rect), conf_radiobutton_handler, I(CONF_rect_select), - "Normal", 'n', I(0), - "Rectangular block", 'r', I(1), NULL); + "常规(N)", 'n', I(0), + "矩形框(R)", 'r', I(1), NULL); - s = ctrl_getset(b, "Window/Selection", "charclass", - "Control the select-one-word-at-a-time mode"); + s = ctrl_getset(b, "窗口/选择", "charclass", + "设置自动选取单词模式"); ccd = (struct charclass_data *) ctrl_alloc(b, sizeof(struct charclass_data)); - ccd->listbox = ctrl_listbox(s, "Character classes:", 'e', + ccd->listbox = ctrl_listbox(s, "字符类别(E):", 'e', HELPCTX(selection_charclasses), charclass_handler, P(ccd)); ccd->listbox->listbox.multisel = 1; @@ -1875,11 +1875,11 @@ void setup_config_box(struct controlbox *b, int midsession, ccd->listbox->listbox.percentages[2] = 20; ccd->listbox->listbox.percentages[3] = 40; ctrl_columns(s, 2, 67, 33); - ccd->editbox = ctrl_editbox(s, "Set to class", 't', 50, + ccd->editbox = ctrl_editbox(s, "设置到类别(T)", 't', 50, HELPCTX(selection_charclasses), charclass_handler, P(ccd), P(NULL)); ccd->editbox->generic.column = 0; - ccd->button = ctrl_pushbutton(s, "Set", 's', + ccd->button = ctrl_pushbutton(s, "设置(S)", 's', HELPCTX(selection_charclasses), charclass_handler, P(ccd)); ccd->button->generic.column = 1; @@ -1888,48 +1888,48 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Window/Colours panel. */ - ctrl_settitle(b, "Window/Colours", "Options controlling use of colours"); + ctrl_settitle(b, "窗口/颜色", "颜色使用设置"); - s = ctrl_getset(b, "Window/Colours", "general", - "General options for colour usage"); - ctrl_checkbox(s, "Allow terminal to specify ANSI colours", 'i', + s = ctrl_getset(b, "窗口/颜色", "general", + "颜色使用常规设置"); + ctrl_checkbox(s, "允许终端指定 ANSI 颜色", 'i', HELPCTX(colours_ansi), conf_checkbox_handler, I(CONF_ansi_colour)); - ctrl_checkbox(s, "Allow terminal to use xterm 256-colour mode", '2', + ctrl_checkbox(s, "允许终端使用 xterm 256 色模式", '2', HELPCTX(colours_xterm256), conf_checkbox_handler, I(CONF_xterm_256_colour)); - ctrl_radiobuttons(s, "Indicate bolded text by changing:", 'b', 3, + ctrl_radiobuttons(s, "粗体文字表现(B):", 'b', 3, HELPCTX(colours_bold), conf_radiobutton_handler, I(CONF_bold_style), - "The font", I(1), - "The colour", I(2), - "Both", I(3), + "字体", I(1), + "颜色", I(2), + "两者", I(3), NULL); - str = dupprintf("Adjust the precise colours %s displays", appname); - s = ctrl_getset(b, "Window/Colours", "adjust", str); + str = dupprintf("调整 %s 显示的精确颜色", appname); + s = ctrl_getset(b, "窗口/颜色", "adjust", str); sfree(str); - ctrl_text(s, "Select a colour from the list, and then click the" - " Modify button to change its appearance.", + ctrl_text(s, "选择列表中的颜色,然后点击" + "“修改”按钮改变其具体数值。", HELPCTX(colours_config)); ctrl_columns(s, 2, 67, 33); cd = (struct colour_data *)ctrl_alloc(b, sizeof(struct colour_data)); - cd->listbox = ctrl_listbox(s, "Select a colour to adjust:", 'u', + cd->listbox = ctrl_listbox(s, "选择颜色进行修改(U):", 'u', HELPCTX(colours_config), colour_handler, P(cd)); cd->listbox->generic.column = 0; cd->listbox->listbox.height = 7; - c = ctrl_text(s, "RGB value:", HELPCTX(colours_config)); + c = ctrl_text(s, "RGB 值:", HELPCTX(colours_config)); c->generic.column = 1; - cd->redit = ctrl_editbox(s, "Red", 'r', 50, HELPCTX(colours_config), + cd->redit = ctrl_editbox(s, "红(R)", 'r', 50, HELPCTX(colours_config), colour_handler, P(cd), P(NULL)); cd->redit->generic.column = 1; - cd->gedit = ctrl_editbox(s, "Green", 'n', 50, HELPCTX(colours_config), + cd->gedit = ctrl_editbox(s, "绿(N)", 'n', 50, HELPCTX(colours_config), colour_handler, P(cd), P(NULL)); cd->gedit->generic.column = 1; - cd->bedit = ctrl_editbox(s, "Blue", 'e', 50, HELPCTX(colours_config), + cd->bedit = ctrl_editbox(s, "蓝(E)", 'e', 50, HELPCTX(colours_config), colour_handler, P(cd), P(NULL)); cd->bedit->generic.column = 1; - cd->button = ctrl_pushbutton(s, "Modify", 'm', HELPCTX(colours_config), + cd->button = ctrl_pushbutton(s, "修改(M)", 'm', HELPCTX(colours_config), colour_handler, P(cd)); cd->button->generic.column = 1; ctrl_columns(s, 1, 100); @@ -1940,34 +1940,34 @@ void setup_config_box(struct controlbox *b, int midsession, * passed a protocol < 0. */ if (protocol >= 0) { - ctrl_settitle(b, "Connection", "Options controlling the connection"); + ctrl_settitle(b, "连接", "连接设置"); - s = ctrl_getset(b, "Connection", "keepalive", - "Sending of null packets to keep session active"); - ctrl_editbox(s, "Seconds between keepalives (0 to turn off)", 'k', 20, + s = ctrl_getset(b, "连接", "keepalive", + "发送空数据包保持会话活动"); + ctrl_editbox(s, "空包发送时间间隔(秒,0 表示关闭)(K):", 'k', 20, HELPCTX(connection_keepalive), conf_editbox_handler, I(CONF_ping_interval), I(-1)); if (!midsession) { - s = ctrl_getset(b, "Connection", "tcp", - "Low-level TCP connection options"); - ctrl_checkbox(s, "Disable Nagle's algorithm (TCP_NODELAY option)", + s = ctrl_getset(b, "连接", "tcp", + "底层 TCP 连接选项"); + ctrl_checkbox(s, "禁止 Nagle 算法(TCP_NODELAY 参数)", 'n', HELPCTX(connection_nodelay), conf_checkbox_handler, I(CONF_tcp_nodelay)); - ctrl_checkbox(s, "Enable TCP keepalives (SO_KEEPALIVE option)", + ctrl_checkbox(s, "允许 TCP 保持活动连接(SO_KEEPALIVE 参数)", 'p', HELPCTX(connection_tcpkeepalive), conf_checkbox_handler, I(CONF_tcp_keepalives)); #ifndef NO_IPV6 - s = ctrl_getset(b, "Connection", "ipversion", - "Internet protocol version"); + s = ctrl_getset(b, "连接", "ipversion", + "互联网协议版本"); ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3, HELPCTX(connection_ipversion), conf_radiobutton_handler, I(CONF_addressfamily), - "Auto", 'u', I(ADDRTYPE_UNSPEC), + "自动(U)", 'u', I(ADDRTYPE_UNSPEC), "IPv4", '4', I(ADDRTYPE_IPV4), "IPv6", '6', I(ADDRTYPE_IPV6), NULL); @@ -1975,10 +1975,10 @@ void setup_config_box(struct controlbox *b, int midsession, { const char *label = backend_from_proto(PROT_SSH) ? - "Logical name of remote host (e.g. for SSH key lookup):" : - "Logical name of remote host:"; - s = ctrl_getset(b, "Connection", "identity", - "Logical name of remote host"); + "远程主机的注册名字(比如用 ssh 密钥寻找)(M):" : + "Logical 远程主机的注册名字(M):"; + s = ctrl_getset(b, "连接", "identity", + "远程主机的注册名字"); ctrl_editbox(s, label, 'm', 100, HELPCTX(connection_loghost), conf_editbox_handler, I(CONF_loghost), I(1)); @@ -1990,57 +1990,57 @@ void setup_config_box(struct controlbox *b, int midsession, * decide on data to send to the server. */ if (!midsession) { - ctrl_settitle(b, "Connection/Data", "Data to send to the server"); + ctrl_settitle(b, "连接/数据", "传送到服务器的数据"); - s = ctrl_getset(b, "Connection/Data", "login", - "Login details"); - ctrl_editbox(s, "Auto-login username", 'u', 50, + s = ctrl_getset(b, "连接/数据", "login", + "登录详细资料"); + ctrl_editbox(s, "自动登录用户名(U):", 'u', 50, HELPCTX(connection_username), conf_editbox_handler, I(CONF_username), I(1)); { /* We assume the local username is sufficiently stable * to include on the dialog box. */ char *user = get_username(); - char *userlabel = dupprintf("Use system username (%s)", + char *userlabel = dupprintf("使用系统用户名 (%s)", user ? user : ""); sfree(user); - ctrl_radiobuttons(s, "When username is not specified:", 'n', 4, + ctrl_radiobuttons(s, "未指定用户名时(N):", 'n', 4, HELPCTX(connection_username_from_env), conf_radiobutton_handler, I(CONF_username_from_env), - "Prompt", I(FALSE), + "提示", I(FALSE), userlabel, I(TRUE), NULL); sfree(userlabel); } - s = ctrl_getset(b, "Connection/Data", "term", - "Terminal details"); - ctrl_editbox(s, "Terminal-type string", 't', 50, + s = ctrl_getset(b, "连接/数据", "term", + "终端详细资料"); + ctrl_editbox(s, "终端类型字符串(T):", 't', 50, HELPCTX(connection_termtype), conf_editbox_handler, I(CONF_termtype), I(1)); - ctrl_editbox(s, "Terminal speeds", 's', 50, + ctrl_editbox(s, "终端速度(S):", 's', 50, HELPCTX(connection_termspeed), conf_editbox_handler, I(CONF_termspeed), I(1)); - s = ctrl_getset(b, "Connection/Data", "env", - "Environment variables"); + s = ctrl_getset(b, "连接/数据", "env", + "环境变量"); ctrl_columns(s, 2, 80, 20); ed = (struct environ_data *) ctrl_alloc(b, sizeof(struct environ_data)); - ed->varbox = ctrl_editbox(s, "Variable", 'v', 60, + ed->varbox = ctrl_editbox(s, "变量(V):", 'v', 60, HELPCTX(telnet_environ), environ_handler, P(ed), P(NULL)); ed->varbox->generic.column = 0; - ed->valbox = ctrl_editbox(s, "Value", 'l', 60, + ed->valbox = ctrl_editbox(s, "值(L):", 'l', 60, HELPCTX(telnet_environ), environ_handler, P(ed), P(NULL)); ed->valbox->generic.column = 0; - ed->addbutton = ctrl_pushbutton(s, "Add", 'd', + ed->addbutton = ctrl_pushbutton(s, "增加(D)", 'd', HELPCTX(telnet_environ), environ_handler, P(ed)); ed->addbutton->generic.column = 1; - ed->rembutton = ctrl_pushbutton(s, "Remove", 'r', + ed->rembutton = ctrl_pushbutton(s, "删除(R)", 'r', HELPCTX(telnet_environ), environ_handler, P(ed)); ed->rembutton->generic.column = 1; @@ -2061,70 +2061,70 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/Proxy panel. */ - ctrl_settitle(b, "Connection/Proxy", - "Options controlling proxy usage"); + ctrl_settitle(b, "连接/代理", + "代理使用设置"); - s = ctrl_getset(b, "Connection/Proxy", "basics", NULL); - ctrl_radiobuttons(s, "Proxy type:", 't', 3, + s = ctrl_getset(b, "连接/代理", "basics", NULL); + ctrl_radiobuttons(s, "代理类型(T):", 't', 3, HELPCTX(proxy_type), conf_radiobutton_handler, I(CONF_proxy_type), - "None", I(PROXY_NONE), + "无", I(PROXY_NONE), "SOCKS 4", I(PROXY_SOCKS4), "SOCKS 5", I(PROXY_SOCKS5), "HTTP", I(PROXY_HTTP), "Telnet", I(PROXY_TELNET), NULL); ctrl_columns(s, 2, 80, 20); - c = ctrl_editbox(s, "Proxy hostname", 'y', 100, + c = ctrl_editbox(s, "代理地址(Y)", 'y', 100, HELPCTX(proxy_main), conf_editbox_handler, I(CONF_proxy_host), I(1)); c->generic.column = 0; - c = ctrl_editbox(s, "Port", 'p', 100, + c = ctrl_editbox(s, "端口(P)", 'p', 100, HELPCTX(proxy_main), conf_editbox_handler, I(CONF_proxy_port), I(-1)); c->generic.column = 1; ctrl_columns(s, 1, 100); - ctrl_editbox(s, "Exclude Hosts/IPs", 'e', 100, + ctrl_editbox(s, "排除在外的地址(E)", 'e', 100, HELPCTX(proxy_exclude), conf_editbox_handler, I(CONF_proxy_exclude_list), I(1)); - ctrl_checkbox(s, "Consider proxying local host connections", 'x', + ctrl_checkbox(s, "对于本地地址不使用代理(X)", 'x', HELPCTX(proxy_exclude), conf_checkbox_handler, I(CONF_even_proxy_localhost)); - ctrl_radiobuttons(s, "Do DNS name lookup at proxy end:", 'd', 3, + ctrl_radiobuttons(s, "在代理端进行 DNS 域名解析:", 'd', 3, HELPCTX(proxy_dns), conf_radiobutton_handler, I(CONF_proxy_dns), - "No", I(FORCE_OFF), - "Auto", I(AUTO), - "Yes", I(FORCE_ON), NULL); - ctrl_editbox(s, "Username", 'u', 60, + "否", I(FORCE_OFF), + "自动", I(AUTO), + "是", I(FORCE_ON), NULL); + ctrl_editbox(s, "用户名(U):", 'u', 60, HELPCTX(proxy_auth), conf_editbox_handler, I(CONF_proxy_username), I(1)); - c = ctrl_editbox(s, "Password", 'w', 60, + c = ctrl_editbox(s, "密码(W):", 'w', 60, HELPCTX(proxy_auth), conf_editbox_handler, I(CONF_proxy_password), I(1)); c->editbox.password = 1; - ctrl_editbox(s, "Telnet command", 'm', 100, + ctrl_editbox(s, "Telnet 命令(M)", 'm', 100, HELPCTX(proxy_command), conf_editbox_handler, I(CONF_proxy_telnet_command), I(1)); - ctrl_radiobuttons(s, "Print proxy diagnostics " - "in the terminal window", 'r', 5, + ctrl_radiobuttons(s, "在终端窗口" + "输出代理诊断信息(R)", 'r', 5, HELPCTX(proxy_logging), conf_radiobutton_handler, I(CONF_proxy_log_to_term), - "No", I(FORCE_OFF), - "Yes", I(FORCE_ON), - "Only until session starts", I(AUTO), NULL); + "否", I(FORCE_OFF), + "是", I(FORCE_ON), + "只在会话开始时", I(AUTO), NULL); } /* @@ -2135,31 +2135,31 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/Telnet panel. */ - ctrl_settitle(b, "Connection/Telnet", - "Options controlling Telnet connections"); + ctrl_settitle(b, "连接/Telnet", + "Telnet 连接设置"); - s = ctrl_getset(b, "Connection/Telnet", "protocol", - "Telnet protocol adjustments"); + s = ctrl_getset(b, "连接/Telnet", "protocol", + "Telnet 协议调整"); if (!midsession) { - ctrl_radiobuttons(s, "Handling of OLD_ENVIRON ambiguity:", + ctrl_radiobuttons(s, "处理含糊的 OLD_ENVIRON 参数:", NO_SHORTCUT, 2, HELPCTX(telnet_oldenviron), conf_radiobutton_handler, I(CONF_rfc_environ), - "BSD (commonplace)", 'b', I(0), - "RFC 1408 (unusual)", 'f', I(1), NULL); - ctrl_radiobuttons(s, "Telnet negotiation mode:", 't', 2, + "BSD (常用)", 'b', I(0), + "RFC 1408 (不常用)", 'f', I(1), NULL); + ctrl_radiobuttons(s, "Telnet 通讯模式:", 't', 2, HELPCTX(telnet_passive), conf_radiobutton_handler, I(CONF_passive_telnet), - "Passive", I(1), "Active", I(0), NULL); + "被动", I(1), "主动", I(0), NULL); } - ctrl_checkbox(s, "Keyboard sends Telnet special commands", 'k', + ctrl_checkbox(s, "键盘直接发送 Telnet 特殊命令(K)", 'k', HELPCTX(telnet_specialkeys), conf_checkbox_handler, I(CONF_telnet_keyboard)); - ctrl_checkbox(s, "Return key sends Telnet New Line instead of ^M", + ctrl_checkbox(s, "发送 Telnet 新行命令替换 ^M 字符", 'm', HELPCTX(telnet_newline), conf_checkbox_handler, I(CONF_telnet_newline)); @@ -2170,12 +2170,12 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/Rlogin panel. */ - ctrl_settitle(b, "Connection/Rlogin", - "Options controlling Rlogin connections"); + ctrl_settitle(b, "连接/Rlogin", + "Rlogin 连接设置"); - s = ctrl_getset(b, "Connection/Rlogin", "data", - "Data to send to the server"); - ctrl_editbox(s, "Local username:", 'l', 50, + s = ctrl_getset(b, "连接/Rlogin", "data", + "传送到服务器的数据"); + ctrl_editbox(s, "本地用户名(L):", 'l', 50, HELPCTX(rlogin_localuser), conf_editbox_handler, I(CONF_localusername), I(1)); @@ -2191,12 +2191,12 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH panel. */ - ctrl_settitle(b, "Connection/SSH", - "Options controlling SSH connections"); + ctrl_settitle(b, "连接/SSH", + "SSH 连接设置"); /* SSH-1 or connection-sharing downstream */ if (midsession && (protcfginfo == 1 || protcfginfo == -1)) { - s = ctrl_getset(b, "Connection/SSH", "disclaimer", NULL); + s = ctrl_getset(b, "连接/SSH", "disclaimer", NULL); ctrl_text(s, "Nothing on this panel may be reconfigured in mid-" "session; it is only here so that sub-panels of it can " "exist without looking strange.", HELPCTX(no_help)); @@ -2204,57 +2204,57 @@ void setup_config_box(struct controlbox *b, int midsession, if (!midsession) { - s = ctrl_getset(b, "Connection/SSH", "data", - "Data to send to the server"); - ctrl_editbox(s, "Remote command:", 'r', 100, + s = ctrl_getset(b, "连接/SSH", "data", + "传送到服务器的数据"); + ctrl_editbox(s, "远程命令(R):", 'r', 100, HELPCTX(ssh_command), conf_editbox_handler, I(CONF_remote_cmd), I(1)); - s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options"); - ctrl_checkbox(s, "Don't start a shell or command at all", 'n', + s = ctrl_getset(b, "连接/SSH", "protocol", "协议选项"); + ctrl_checkbox(s, "完全不运行 Shell 或命令(N)", 'n', HELPCTX(ssh_noshell), conf_checkbox_handler, I(CONF_ssh_no_shell)); } if (!midsession || !(protcfginfo == 1 || protcfginfo == -1)) { - s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options"); + s = ctrl_getset(b, "连接/SSH", "protocol", "协议选项"); - ctrl_checkbox(s, "Enable compression", 'e', + ctrl_checkbox(s, "开启压缩(E)", 'e', HELPCTX(ssh_compress), conf_checkbox_handler, I(CONF_compression)); } if (!midsession) { - s = ctrl_getset(b, "Connection/SSH", "sharing", "Sharing an SSH connection between PuTTY tools"); + s = ctrl_getset(b, "连接/SSH", "sharing", "在 PuTTY 工具之间共享 SSH 连接"); - ctrl_checkbox(s, "Share SSH connections if possible", 's', + ctrl_checkbox(s, "如果可能共享 SSH 连接", 's', HELPCTX(ssh_share), conf_checkbox_handler, I(CONF_ssh_connection_sharing)); - ctrl_text(s, "Permitted roles in a shared connection:", + ctrl_text(s, "共享连接中允许角色:", HELPCTX(ssh_share)); - ctrl_checkbox(s, "Upstream (connecting to the real server)", 'u', + ctrl_checkbox(s, "上游 (连接到真实服务器)(U)", 'u', HELPCTX(ssh_share), conf_checkbox_handler, I(CONF_ssh_connection_sharing_upstream)); - ctrl_checkbox(s, "Downstream (connecting to the upstream PuTTY)", 'd', + ctrl_checkbox(s, "下游 (连接到上游 PuTTY)(D)", 'd', HELPCTX(ssh_share), conf_checkbox_handler, I(CONF_ssh_connection_sharing_downstream)); } if (!midsession) { - s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options"); + s = ctrl_getset(b, "连接/SSH", "protocol", "协议选项"); - ctrl_radiobuttons(s, "SSH protocol version:", NO_SHORTCUT, 2, + ctrl_radiobuttons(s, "首选的 SSH 协议版本:", NO_SHORTCUT, 2, HELPCTX(ssh_protocol), conf_radiobutton_handler, I(CONF_sshprot), "2", '2', I(3), - "1 (INSECURE)", '1', I(0), NULL); + "1 (不安全)", '1', I(0), NULL); } /* @@ -2264,30 +2264,30 @@ void setup_config_box(struct controlbox *b, int midsession, * downstream, or haven't decided yet.) */ if (protcfginfo != 1 && protcfginfo != -1) { - ctrl_settitle(b, "Connection/SSH/Kex", - "Options controlling SSH key exchange"); + ctrl_settitle(b, "连接/SSH/密钥", + "SSH 密钥验证设置"); - s = ctrl_getset(b, "Connection/SSH/Kex", "main", - "Key exchange algorithm options"); - c = ctrl_draglist(s, "Algorithm selection policy:", 's', + s = ctrl_getset(b, "连接/SSH/密钥", "main", + "密钥验证算法选项"); + c = ctrl_draglist(s, "算法选择顺序(S):", 's', HELPCTX(ssh_kexlist), kexlist_handler, P(NULL)); c->listbox.height = 5; - s = ctrl_getset(b, "Connection/SSH/Kex", "repeat", - "Options controlling key re-exchange"); + s = ctrl_getset(b, "连接/SSH/密钥", "repeat", + "密钥再次验证设置"); - ctrl_editbox(s, "Max minutes before rekey (0 for no limit)", 't', 20, + ctrl_editbox(s, "重新验证最长时间(分钟,0 不限制)(T):", 't', 20, HELPCTX(ssh_kex_repeat), conf_editbox_handler, I(CONF_ssh_rekey_time), I(-1)); - ctrl_editbox(s, "Max data before rekey (0 for no limit)", 'x', 20, + ctrl_editbox(s, "重新验证最大数据量(0 为不限制)(X):", 'x', 20, HELPCTX(ssh_kex_repeat), conf_editbox_handler, I(CONF_ssh_rekey_data), I(16)); - ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)", + ctrl_text(s, "(使用 1M 表示 1 兆字节,1G 表示 1 吉字节))", HELPCTX(ssh_kex_repeat)); } @@ -2295,12 +2295,12 @@ void setup_config_box(struct controlbox *b, int midsession, * The 'Connection/SSH/Host keys' panel. */ if (protcfginfo != 1 && protcfginfo != -1) { - ctrl_settitle(b, "Connection/SSH/Host keys", - "Options controlling SSH host keys"); + ctrl_settitle(b, "连接/SSH/主机密钥", + "控制 SSH 主机密钥选项"); - s = ctrl_getset(b, "Connection/SSH/Host keys", "main", - "Host key algorithm preference"); - c = ctrl_draglist(s, "Algorithm selection policy:", 's', + s = ctrl_getset(b, "连接/SSH/主机密钥", "main", + "主机密钥算法偏好"); + c = ctrl_draglist(s, "算法选择优先级(S):", 's', HELPCTX(ssh_hklist), hklist_handler, P(NULL)); c->listbox.height = 5; @@ -2312,18 +2312,18 @@ void setup_config_box(struct controlbox *b, int midsession, * same as that used at the start of the session. */ if (!midsession) { - s = ctrl_getset(b, "Connection/SSH/Host keys", "hostkeys", - "Manually configure host keys for this connection"); + s = ctrl_getset(b, "连接/SSH/主机密钥", "hostkeys", + "手动配置本连接的主机密钥"); ctrl_columns(s, 2, 75, 25); - c = ctrl_text(s, "Host keys or fingerprints to accept:", + c = ctrl_text(s, "可接受的主机密钥或指纹:", HELPCTX(ssh_kex_manual_hostkeys)); c->generic.column = 0; /* You want to select from the list, _then_ hit Remove. So * tab order should be that way round. */ mh = (struct manual_hostkey_data *) ctrl_alloc(b,sizeof(struct manual_hostkey_data)); - mh->rembutton = ctrl_pushbutton(s, "Remove", 'r', + mh->rembutton = ctrl_pushbutton(s, "删除(R)", 'r', HELPCTX(ssh_kex_manual_hostkeys), manual_hostkey_handler, P(mh)); mh->rembutton->generic.column = 1; @@ -2338,11 +2338,11 @@ void setup_config_box(struct controlbox *b, int midsession, mh->listbox->listbox.height = 2; mh->listbox->listbox.hscroll = FALSE; ctrl_tabdelay(s, mh->rembutton); - mh->keybox = ctrl_editbox(s, "Key", 'k', 80, + mh->keybox = ctrl_editbox(s, "密钥(K)", 'k', 75, HELPCTX(ssh_kex_manual_hostkeys), manual_hostkey_handler, P(mh), P(NULL)); mh->keybox->generic.column = 0; - mh->addbutton = ctrl_pushbutton(s, "Add key", 'y', + mh->addbutton = ctrl_pushbutton(s, "增加(Y)", 'y', HELPCTX(ssh_kex_manual_hostkeys), manual_hostkey_handler, P(mh)); mh->addbutton->generic.column = 1; @@ -2353,17 +2353,17 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/Cipher panel. */ - ctrl_settitle(b, "Connection/SSH/Cipher", - "Options controlling SSH encryption"); + ctrl_settitle(b, "连接/SSH/加密", + "控制 SSH 加密选项"); - s = ctrl_getset(b, "Connection/SSH/Cipher", - "encryption", "Encryption options"); - c = ctrl_draglist(s, "Encryption cipher selection policy:", 's', + s = ctrl_getset(b, "连接/SSH/加密", + "encryption", "加密选项"); + c = ctrl_draglist(s, "加密方法选择顺序(S):", 's', HELPCTX(ssh_ciphers), cipherlist_handler, P(NULL)); c->listbox.height = 6; - ctrl_checkbox(s, "Enable legacy use of single-DES in SSH-2", 'i', + ctrl_checkbox(s, "允许 SSH-2 兼容使用单一 DES 算法(I)", 'i', HELPCTX(ssh_ciphers), conf_checkbox_handler, I(CONF_ssh2_des_cbc)); @@ -2374,45 +2374,45 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/Auth panel. */ - ctrl_settitle(b, "Connection/SSH/Auth", - "Options controlling SSH authentication"); + ctrl_settitle(b, "连接/SSH/认证", + "SSH 认证设置"); - s = ctrl_getset(b, "Connection/SSH/Auth", "main", NULL); - ctrl_checkbox(s, "Display pre-authentication banner (SSH-2 only)", + s = ctrl_getset(b, "连接/SSH/认证", "main", NULL); + ctrl_checkbox(s, "显示预认证提示,只限于 SSH-2(D)", 'd', HELPCTX(ssh_auth_banner), conf_checkbox_handler, I(CONF_ssh_show_banner)); - ctrl_checkbox(s, "Bypass authentication entirely (SSH-2 only)", 'b', + ctrl_checkbox(s, "完全绕过认证,只限于 SSH-2(B)", 'b', HELPCTX(ssh_auth_bypass), conf_checkbox_handler, I(CONF_ssh_no_userauth)); - s = ctrl_getset(b, "Connection/SSH/Auth", "methods", - "Authentication methods"); - ctrl_checkbox(s, "Attempt authentication using Pageant", 'p', + s = ctrl_getset(b, "连接/SSH/认证", "methods", + "认证方式"); + ctrl_checkbox(s, "尝试使用 Pageant 认证", 'p', HELPCTX(ssh_auth_pageant), conf_checkbox_handler, I(CONF_tryagent)); - ctrl_checkbox(s, "Attempt TIS or CryptoCard auth (SSH-1)", 'm', + ctrl_checkbox(s, "尝试 TIS 或 CryptoCard 认证 (SSH-1) (M)", 'm', HELPCTX(ssh_auth_tis), conf_checkbox_handler, I(CONF_try_tis_auth)); - ctrl_checkbox(s, "Attempt \"keyboard-interactive\" auth (SSH-2)", + ctrl_checkbox(s, "尝试“智能键盘”认证 (SSH-2) (I)", 'i', HELPCTX(ssh_auth_ki), conf_checkbox_handler, I(CONF_try_ki_auth)); - s = ctrl_getset(b, "Connection/SSH/Auth", "params", - "Authentication parameters"); - ctrl_checkbox(s, "Allow agent forwarding", 'f', + s = ctrl_getset(b, "连接/SSH/认证", "params", + "认证参数"); + ctrl_checkbox(s, "允许代理映射(F)", 'f', HELPCTX(ssh_auth_agentfwd), conf_checkbox_handler, I(CONF_agentfwd)); - ctrl_checkbox(s, "Allow attempted changes of username in SSH-2", NO_SHORTCUT, + ctrl_checkbox(s, "允许尝试在 SSH-2 中修改用户名", NO_SHORTCUT, HELPCTX(ssh_auth_changeuser), conf_checkbox_handler, I(CONF_change_username)); - ctrl_filesel(s, "Private key file for authentication:", 'k', - FILTER_KEY_FILES, FALSE, "Select private key file", + ctrl_filesel(s, "认证私钥文件(K):", 'k', + FILTER_KEY_FILES, FALSE, "选择私钥文件", HELPCTX(ssh_auth_privkey), conf_filesel_handler, I(CONF_keyfile)); @@ -2421,16 +2421,16 @@ void setup_config_box(struct controlbox *b, int midsession, * Connection/SSH/Auth/GSSAPI, which sadly won't fit on * the main Auth panel. */ - ctrl_settitle(b, "Connection/SSH/Auth/GSSAPI", - "Options controlling GSSAPI authentication"); - s = ctrl_getset(b, "Connection/SSH/Auth/GSSAPI", "gssapi", NULL); + ctrl_settitle(b, "连接/SSH/认证/GSSAPI", + "控制 GSSAPI 认证选项"); + s = ctrl_getset(b, "连接/SSH/认证/GSSAPI", "gssapi", NULL); - ctrl_checkbox(s, "Attempt GSSAPI authentication (SSH-2 only)", + ctrl_checkbox(s, "尝试使用 GSSAPI 认证,只限于 SSH-2(T)", 't', HELPCTX(ssh_gssapi), conf_checkbox_handler, I(CONF_try_gssapi_auth)); - ctrl_checkbox(s, "Allow GSSAPI credential delegation", 'l', + ctrl_checkbox(s, "允许 GSSAPI 凭据委托(L)", 'l', HELPCTX(ssh_gssapi_delegation), conf_checkbox_handler, I(CONF_gssapifwd)); @@ -2439,7 +2439,7 @@ void setup_config_box(struct controlbox *b, int midsession, * GSSAPI library selection. */ if (ngsslibs > 1) { - c = ctrl_draglist(s, "Preference order for GSSAPI libraries:", + c = ctrl_draglist(s, "GSSAPI 库优先级:", 'p', HELPCTX(ssh_gssapi_libraries), gsslist_handler, P(NULL)); c->listbox.height = ngsslibs; @@ -2463,8 +2463,8 @@ void setup_config_box(struct controlbox *b, int midsession, * displayed. */ - ctrl_filesel(s, "User-supplied GSSAPI library path:", 's', - FILTER_DYNLIB_FILES, FALSE, "Select library file", + ctrl_filesel(s, "用户支持的 GSSAPI 库路径:", 's', + FILTER_DYNLIB_FILES, FALSE, "选择库文件", HELPCTX(ssh_gssapi_libraries), conf_filesel_handler, I(CONF_ssh_gss_custom)); @@ -2476,19 +2476,19 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/TTY panel. */ - ctrl_settitle(b, "Connection/SSH/TTY", "Remote terminal settings"); + ctrl_settitle(b, "连接/SSH/TTY", "远程终端设置"); - s = ctrl_getset(b, "Connection/SSH/TTY", "sshtty", NULL); - ctrl_checkbox(s, "Don't allocate a pseudo-terminal", 'p', + s = ctrl_getset(b, "连接/SSH/TTY", "sshtty", NULL); + ctrl_checkbox(s, "不分配假终端(P)", 'p', HELPCTX(ssh_nopty), conf_checkbox_handler, I(CONF_nopty)); - s = ctrl_getset(b, "Connection/SSH/TTY", "ttymodes", - "Terminal modes"); + s = ctrl_getset(b, "连接/SSH/TTY", "ttymodes", + "终端模式"); td = (struct ttymodes_data *) ctrl_alloc(b, sizeof(struct ttymodes_data)); - c = ctrl_text(s, "Terminal modes to send:", HELPCTX(ssh_ttymodes)); + c = ctrl_text(s, "终端模式用于发送:", HELPCTX(ssh_ttymodes)); td->listbox = ctrl_listbox(s, NULL, NO_SHORTCUT, HELPCTX(ssh_ttymodes), ttymodes_handler, P(td)); @@ -2498,9 +2498,9 @@ void setup_config_box(struct controlbox *b, int midsession, td->listbox->listbox.percentages[0] = 40; td->listbox->listbox.percentages[1] = 60; ctrl_columns(s, 2, 75, 25); - c = ctrl_text(s, "For selected mode, send:", HELPCTX(ssh_ttymodes)); + c = ctrl_text(s, "选择的模式,发送:", HELPCTX(ssh_ttymodes)); c->generic.column = 0; - td->setbutton = ctrl_pushbutton(s, "Set", 's', + td->setbutton = ctrl_pushbutton(s, "设置(S)", 's', HELPCTX(ssh_ttymodes), ttymodes_handler, P(td)); td->setbutton->generic.column = 1; @@ -2512,9 +2512,9 @@ void setup_config_box(struct controlbox *b, int midsession, td->valradio = ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3, HELPCTX(ssh_ttymodes), ttymodes_handler, P(td), - "Auto", NO_SHORTCUT, P(NULL), - "Nothing", NO_SHORTCUT, P(NULL), - "This:", NO_SHORTCUT, P(NULL), + "自动", NO_SHORTCUT, P(NULL), + "无", NO_SHORTCUT, P(NULL), + "指定:", NO_SHORTCUT, P(NULL), NULL); td->valradio->generic.column = 0; td->valbox = ctrl_editbox(s, NULL, NO_SHORTCUT, 100, @@ -2528,17 +2528,17 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/X11 panel. */ - ctrl_settitle(b, "Connection/SSH/X11", - "Options controlling SSH X11 forwarding"); + ctrl_settitle(b, "连接/SSH/X11", + "SSH X11 映射设置"); - s = ctrl_getset(b, "Connection/SSH/X11", "x11", "X11 forwarding"); - ctrl_checkbox(s, "Enable X11 forwarding", 'e', + s = ctrl_getset(b, "连接/SSH/X11", "x11", "X11 映射"); + ctrl_checkbox(s, "允许 X11 映射(E)", 'e', HELPCTX(ssh_tunnels_x11), conf_checkbox_handler,I(CONF_x11_forward)); - ctrl_editbox(s, "X display location", 'x', 50, + ctrl_editbox(s, "X 显示位置:", 'x', 50, HELPCTX(ssh_tunnels_x11), conf_editbox_handler, I(CONF_x11_display), I(1)); - ctrl_radiobuttons(s, "Remote X11 authentication protocol", 'u', 2, + ctrl_radiobuttons(s, "远程 X11 认证协议(U)", 'u', 1, HELPCTX(ssh_tunnels_x11auth), conf_radiobutton_handler, I(CONF_x11_auth), @@ -2549,27 +2549,27 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Tunnels panel _is_ still available in mid-session. */ - ctrl_settitle(b, "Connection/SSH/Tunnels", - "Options controlling SSH port forwarding"); + ctrl_settitle(b, "连接/SSH/通道", + "SSH 端口映射设置"); - s = ctrl_getset(b, "Connection/SSH/Tunnels", "portfwd", - "Port forwarding"); - ctrl_checkbox(s, "Local ports accept connections from other hosts",'t', + s = ctrl_getset(b, "连接/SSH/通道", "portfwd", + "端口映射"); + ctrl_checkbox(s, "本地端口接受其他主机的连接(T)",'t', HELPCTX(ssh_tunnels_portfwd_localhost), conf_checkbox_handler, I(CONF_lport_acceptall)); - ctrl_checkbox(s, "Remote ports do the same (SSH-2 only)", 'p', + ctrl_checkbox(s, "远程端口接受连接(只限 SSH-2)(P)", 'p', HELPCTX(ssh_tunnels_portfwd_localhost), conf_checkbox_handler, I(CONF_rport_acceptall)); ctrl_columns(s, 3, 55, 20, 25); - c = ctrl_text(s, "Forwarded ports:", HELPCTX(ssh_tunnels_portfwd)); + c = ctrl_text(s, "映射的端口:", HELPCTX(ssh_tunnels_portfwd)); c->generic.column = COLUMN_FIELD(0,2); /* You want to select from the list, _then_ hit Remove. So tab order * should be that way round. */ pfd = (struct portfwd_data *)ctrl_alloc(b,sizeof(struct portfwd_data)); - pfd->rembutton = ctrl_pushbutton(s, "Remove", 'r', + pfd->rembutton = ctrl_pushbutton(s, "删除(R)", 'r', HELPCTX(ssh_tunnels_portfwd), portfwd_handler, P(pfd)); pfd->rembutton->generic.column = 2; @@ -2583,34 +2583,34 @@ void setup_config_box(struct controlbox *b, int midsession, pfd->listbox->listbox.percentages[0] = 20; pfd->listbox->listbox.percentages[1] = 80; ctrl_tabdelay(s, pfd->rembutton); - ctrl_text(s, "Add new forwarded port:", HELPCTX(ssh_tunnels_portfwd)); + ctrl_text(s, "增加新的映射端口:", HELPCTX(ssh_tunnels_portfwd)); /* You want to enter source, destination and type, _then_ hit Add. * Again, we adjust the tab order to reflect this. */ - pfd->addbutton = ctrl_pushbutton(s, "Add", 'd', + pfd->addbutton = ctrl_pushbutton(s, "增加(D)", 'd', HELPCTX(ssh_tunnels_portfwd), portfwd_handler, P(pfd)); pfd->addbutton->generic.column = 2; pfd->addbutton->generic.tabdelay = 1; - pfd->sourcebox = ctrl_editbox(s, "Source port", 's', 40, + pfd->sourcebox = ctrl_editbox(s, "源端口(S):", 's', 40, HELPCTX(ssh_tunnels_portfwd), portfwd_handler, P(pfd), P(NULL)); pfd->sourcebox->generic.column = 0; - pfd->destbox = ctrl_editbox(s, "Destination", 'i', 67, + pfd->destbox = ctrl_editbox(s, "目的地(I)", 'i', 67, HELPCTX(ssh_tunnels_portfwd), portfwd_handler, P(pfd), P(NULL)); pfd->direction = ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3, HELPCTX(ssh_tunnels_portfwd), portfwd_handler, P(pfd), - "Local", 'l', P(NULL), - "Remote", 'm', P(NULL), - "Dynamic", 'y', P(NULL), + "本地(L)", 'l', P(NULL), + "远程(M)", 'm', P(NULL), + "动态(Y)", 'y', P(NULL), NULL); #ifndef NO_IPV6 pfd->addressfamily = ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3, HELPCTX(ssh_tunnels_portfwd_ipversion), portfwd_handler, P(pfd), - "Auto", 'u', I(ADDRTYPE_UNSPEC), + "自动(U)", 'u', I(ADDRTYPE_UNSPEC), "IPv4", '4', I(ADDRTYPE_IPV4), "IPv6", '6', I(ADDRTYPE_IPV6), NULL); @@ -2622,54 +2622,54 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/Bugs panels. */ - ctrl_settitle(b, "Connection/SSH/Bugs", - "Workarounds for SSH server bugs"); + ctrl_settitle(b, "连接/SSH/查错", + "处理 SSH 服务器错误设置"); - s = ctrl_getset(b, "Connection/SSH/Bugs", "main", - "Detection of known bugs in SSH servers"); - ctrl_droplist(s, "Chokes on SSH-2 ignore messages", '2', 20, + s = ctrl_getset(b, "连接/SSH/查错", "main", + "检测已知的 SSH 服务器错误"); + ctrl_droplist(s, "阻塞 SSH-2 忽略信息", '2', 20, HELPCTX(ssh_bugs_ignore2), sshbug_handler, I(CONF_sshbug_ignore2)); - ctrl_droplist(s, "Handles SSH-2 key re-exchange badly", 'k', 20, + ctrl_droplist(s, "严格 SSH-2 密钥再次验证操作(K)", 'k', 20, HELPCTX(ssh_bugs_rekey2), sshbug_handler, I(CONF_sshbug_rekey2)); - ctrl_droplist(s, "Chokes on PuTTY's SSH-2 'winadj' requests", 'j', + ctrl_droplist(s, "阻塞 PuTTY's SSH-2 'winadj' 请求", 'j', 20, HELPCTX(ssh_bugs_winadj), sshbug_handler, I(CONF_sshbug_winadj)); - ctrl_droplist(s, "Replies to requests on closed channels", 'q', 20, + ctrl_droplist(s, "回复已关闭通道的请求(Q)", 'q', 20, HELPCTX(ssh_bugs_chanreq), sshbug_handler, I(CONF_sshbug_chanreq)); - ctrl_droplist(s, "Ignores SSH-2 maximum packet size", 'x', 20, + ctrl_droplist(s, "忽略 SSH-2 最大包大小(X)", 'x', 20, HELPCTX(ssh_bugs_maxpkt2), sshbug_handler, I(CONF_sshbug_maxpkt2)); - ctrl_settitle(b, "Connection/SSH/More bugs", - "Further workarounds for SSH server bugs"); + ctrl_settitle(b, "连接/SSH/更多查错", + "处理 SSH 服务器更多错误设置"); - s = ctrl_getset(b, "Connection/SSH/More bugs", "main", - "Detection of known bugs in SSH servers"); - ctrl_droplist(s, "Requires padding on SSH-2 RSA signatures", 'p', 20, + s = ctrl_getset(b, "连接/SSH/更多查错", "main", + "检测已知的 SSH 服务器错误"); + ctrl_droplist(s, "SSH-2 RSA 签名附加请求(P)", 'p', 20, HELPCTX(ssh_bugs_rsapad2), sshbug_handler, I(CONF_sshbug_rsapad2)); - ctrl_droplist(s, "Only supports pre-RFC4419 SSH-2 DH GEX", 'd', 20, + ctrl_droplist(s, "只支持 pre-RFC4419 SSH-2 DH GEX", 'd', 20, HELPCTX(ssh_bugs_oldgex2), sshbug_handler, I(CONF_sshbug_oldgex2)); - ctrl_droplist(s, "Miscomputes SSH-2 HMAC keys", 'm', 20, + ctrl_droplist(s, "混算 SSH-2 HMAC 密钥", 'm', 20, HELPCTX(ssh_bugs_hmac2), sshbug_handler, I(CONF_sshbug_hmac2)); - ctrl_droplist(s, "Misuses the session ID in SSH-2 PK auth", 'n', 20, + ctrl_droplist(s, "错误 SSH-2 PK 认证会话 ID(N)", 'n', 20, HELPCTX(ssh_bugs_pksessid2), sshbug_handler, I(CONF_sshbug_pksessid2)); - ctrl_droplist(s, "Miscomputes SSH-2 encryption keys", 'e', 20, + ctrl_droplist(s, "混算 SSH-2 加密密钥(E)", 'e', 20, HELPCTX(ssh_bugs_derivekey2), sshbug_handler, I(CONF_sshbug_derivekey2)); - ctrl_droplist(s, "Chokes on SSH-1 ignore messages", 'i', 20, + ctrl_droplist(s, "阻塞 SSH-1 忽略信息(I)", 'i', 20, HELPCTX(ssh_bugs_ignore1), sshbug_handler, I(CONF_sshbug_ignore1)); - ctrl_droplist(s, "Refuses all SSH-1 password camouflage", 's', 20, + ctrl_droplist(s, "拒绝所有 SSH-1 密码伪装", 's', 20, HELPCTX(ssh_bugs_plainpw1), sshbug_handler, I(CONF_sshbug_plainpw1)); - ctrl_droplist(s, "Chokes on SSH-1 RSA authentication", 'r', 20, + ctrl_droplist(s, "阻塞 SSH-1 RSA 认证", 'r', 20, HELPCTX(ssh_bugs_rsa1), sshbug_handler, I(CONF_sshbug_rsa1)); } diff --git a/logging.c b/logging.c index 865fe9b82..642372beb 100644 --- a/logging.c +++ b/logging.c @@ -117,7 +117,7 @@ static void logfopen_callback(void *handle, int mode) (mode == 1 ? "Appending" : "Writing new"), (ctx->logtype == LGTYP_ASCII ? "ASCII" : ctx->logtype == LGTYP_DEBUG ? "raw" : - ctx->logtype == LGTYP_PACKETS ? "SSH packets" : + ctx->logtype == LGTYP_PACKETS ? "SSH 包" : ctx->logtype == LGTYP_SSHRAW ? "SSH raw data" : "unknown"), filename_to_str(ctx->currlogfilename)); diff --git a/misc.c b/misc.c index 9aff234b9..2c5b0304d 100644 --- a/misc.c +++ b/misc.c @@ -1160,16 +1160,16 @@ char *buildinfo(const char *newline) strbuf *buf = strbuf_new(); extern const char commitid[]; /* in commitid.c */ - strbuf_catf(buf, "Build platform: %d-bit %s", + strbuf_catf(buf, "构建平台: %d 位 %s", (int)(CHAR_BIT * sizeof(void *)), BUILDINFO_PLATFORM); #ifdef __clang_version__ - strbuf_catf(buf, "%sCompiler: clang %s", newline, __clang_version__); + strbuf_catf(buf, "%s编译器: clang %s", newline, __clang_version__); #elif defined __GNUC__ && defined __VERSION__ - strbuf_catf(buf, "%sCompiler: gcc %s", newline, __VERSION__); + strbuf_catf(buf, "%s编译器: gcc %s", newline, __VERSION__); #elif defined _MSC_VER - strbuf_catf(buf, "%sCompiler: Visual Studio", newline); + strbuf_catf(buf, "%s编译器: Visual Studio", newline); #if _MSC_VER == 1900 strbuf_catf(buf, " 2015 / MSVC++ 14.0"); #elif _MSC_VER == 1800 @@ -1185,7 +1185,7 @@ char *buildinfo(const char *newline) #elif _MSC_VER == 1310 strbuf_catf(buf, " 2003 / MSVC++ 7.1"); #else - strbuf_catf(buf, ", unrecognised version"); + strbuf_catf(buf, ", 未知版本"); #endif strbuf_catf(buf, " (_MSC_VER=%d)", (int)_MSC_VER); #endif @@ -1202,31 +1202,31 @@ char *buildinfo(const char *newline) #endif #ifdef NO_SECURITY - strbuf_catf(buf, "%sBuild option: NO_SECURITY", newline); + strbuf_catf(buf, "%s构建选项: NO_SECURITY", newline); #endif #ifdef NO_SECUREZEROMEMORY - strbuf_catf(buf, "%sBuild option: NO_SECUREZEROMEMORY", newline); + strbuf_catf(buf, "%s构建选项: NO_SECUREZEROMEMORY", newline); #endif #ifdef NO_IPV6 - strbuf_catf(buf, "%sBuild option: NO_IPV6", newline); + strbuf_catf(buf, "%s构建选项: NO_IPV6", newline); #endif #ifdef NO_GSSAPI - strbuf_catf(buf, "%sBuild option: NO_GSSAPI", newline); + strbuf_catf(buf, "%s构建选项: NO_GSSAPI", newline); #endif #ifdef STATIC_GSSAPI - strbuf_catf(buf, "%sBuild option: STATIC_GSSAPI", newline); + strbuf_catf(buf, "%s构建选项: STATIC_GSSAPI", newline); #endif #ifdef UNPROTECT - strbuf_catf(buf, "%sBuild option: UNPROTECT", newline); + strbuf_catf(buf, "%s构建选项: UNPROTECT", newline); #endif #ifdef FUZZING - strbuf_catf(buf, "%sBuild option: FUZZING", newline); + strbuf_catf(buf, "%s构建选项: FUZZING", newline); #endif #ifdef DEBUG - strbuf_catf(buf, "%sBuild option: DEBUG", newline); + strbuf_catf(buf, "%s构建选项: DEBUG", newline); #endif - strbuf_catf(buf, "%sSource commit: %s", newline, commitid); + strbuf_catf(buf, "%s源代码提交: %s", newline, commitid); return strbuf_to_str(buf); } diff --git a/pscp.c b/pscp.c index 454ec084c..de984ac43 100644 --- a/pscp.c +++ b/pscp.c @@ -127,7 +127,7 @@ void nonfatal(const char *fmt, ...) va_list ap; va_start(ap, fmt); str = dupvprintf(fmt, ap); - str2 = dupcat("Error: ", str, "\n", NULL); + str2 = dupcat("错误:", str, "\n", NULL); sfree(str); va_end(ap); tell_str(stderr, str2); @@ -2229,40 +2229,40 @@ static void get_dir_list(int argc, char *argv[]) */ static void usage(void) { - printf("PuTTY Secure Copy client\n"); + printf("PuTTY 安全拷贝客户端\n"); printf("%s\n", ver); - printf("Usage: pscp [options] [user@]host:source target\n"); + printf("用法: pscp [选项] [用户名@]主机:源 目标\n"); printf - (" pscp [options] source [source...] [user@]host:target\n"); - printf(" pscp [options] -ls [user@]host:filespec\n"); - printf("Options:\n"); - printf(" -V print version information and exit\n"); - printf(" -pgpfp print PGP key fingerprints and exit\n"); - printf(" -p preserve file attributes\n"); - printf(" -q quiet, don't show statistics\n"); - printf(" -r copy directories recursively\n"); - printf(" -v show verbose messages\n"); - printf(" -load sessname Load settings from saved session\n"); - printf(" -P port connect to specified port\n"); - printf(" -l user connect with specified username\n"); - printf(" -pw passw login with specified password\n"); - printf(" -1 -2 force use of particular SSH protocol version\n"); - printf(" -4 -6 force use of IPv4 or IPv6\n"); - printf(" -C enable compression\n"); - printf(" -i key private key file for user authentication\n"); - printf(" -noagent disable use of Pageant\n"); - printf(" -agent enable use of Pageant\n"); + (" pscp [选项] 源 [其他源...] [用户名@]主机:目标\n"); + printf(" pscp [选项] -ls [用户名@]主机:指定文件\n"); + printf("选项:\n"); + printf(" -V 显示版本信息后退出\n"); + printf(" -pgpfp 显示 PGP 密钥指纹后退出\n"); + printf(" -p 保留文件属性\n"); + printf(" -q 安静模式,不显示状态信息\n"); + printf(" -r 递归拷贝目录\n"); + printf(" -v 显示详细信息\n"); + printf(" -load 会话名 载入保存的会话信息\n"); + printf(" -P 端口 连接指定的端口\n"); + printf(" -l 用户名 使用指定的用户名连接\n"); + printf(" -pw 密码 使用指定的密码登录\n"); + printf(" -1 -2 强制使用 SSH 协议版本\n"); + printf(" -4 -6 强制使用 IPv4 或 IPv6 版本\n"); + printf(" -C 允许压缩\n"); + printf(" -i 密钥 认证使用的密钥文件\n"); + printf(" -noagent 禁用 Pageant 认证代理\n"); + printf(" -agent 启用 Pageant 认证代理\n"); printf(" -hostkey aa:bb:cc:...\n"); - printf(" manually specify a host key (may be repeated)\n"); - printf(" -batch disable all interactive prompts\n"); - printf(" -proxycmd command\n"); - printf(" use 'command' as local proxy\n"); - printf(" -unsafe allow server-side wildcards (DANGEROUS)\n"); - printf(" -sftp force use of SFTP protocol\n"); - printf(" -scp force use of SCP protocol\n"); - printf(" -sshlog file\n"); - printf(" -sshrawlog file\n"); - printf(" log protocol details to a file\n"); + printf(" 手动指定主机密钥(可能重复)\n"); + printf(" -batch 禁止所有交互提示\n"); + printf(" -proxycmd 命令\n"); + printf(" 使用 '命令' 作为本地代理\n"); + printf(" -unsafe 允许服务端通配符(危险操作)\n"); + printf(" -sftp 强制使用 SFTP 协议\n"); + printf(" -scp 强制使用 SCP 协议\n"); + printf(" -sshlog 文件\n"); + printf(" -sshrawlog 文件\n"); + printf(" 记录协议详细日志到指定文件\n"); #if 0 /* * -gui is an internal option, used by GUI front ends to get diff --git a/psftp.c b/psftp.c index 5394c1fbb..a5b85037f 100644 --- a/psftp.c +++ b/psftp.c @@ -2474,7 +2474,7 @@ void nonfatal(const char *fmt, ...) va_list ap; va_start(ap, fmt); str = dupvprintf(fmt, ap); - str2 = dupcat("Error: ", str, "\n", NULL); + str2 = dupcat("错误:", str, "\n", NULL); sfree(str); va_end(ap); fputs(str2, stderr); @@ -2635,34 +2635,34 @@ int sftp_sendbuffer(void) */ static void usage(void) { - printf("PuTTY Secure File Transfer (SFTP) client\n"); + printf("PuTTY 安全文件传输 (SFTP) 客户端\n"); printf("%s\n", ver); - printf("Usage: psftp [options] [user@]host\n"); - printf("Options:\n"); - printf(" -V print version information and exit\n"); - printf(" -pgpfp print PGP key fingerprints and exit\n"); - printf(" -b file use specified batchfile\n"); - printf(" -bc output batchfile commands\n"); - printf(" -be don't stop batchfile processing if errors\n"); - printf(" -v show verbose messages\n"); - printf(" -load sessname Load settings from saved session\n"); - printf(" -l user connect with specified username\n"); - printf(" -P port connect to specified port\n"); - printf(" -pw passw login with specified password\n"); - printf(" -1 -2 force use of particular SSH protocol version\n"); - printf(" -4 -6 force use of IPv4 or IPv6\n"); - printf(" -C enable compression\n"); - printf(" -i key private key file for user authentication\n"); - printf(" -noagent disable use of Pageant\n"); - printf(" -agent enable use of Pageant\n"); + printf("用法: psftp [选项] [用户名@]主机\n"); + printf("选项:\n"); + printf(" -V 显示版本信息后退出\n"); + printf(" -pgpfp 显示 PGP 密钥指纹后退出\n"); + printf(" -b 文件 使用指定的批处理文件\n"); + printf(" -bc 输出批处理文件命令\n"); + printf(" -be 批处理文件发生错误也不停止其处理进程\n"); + printf(" -v 显示详细信息\n"); + printf(" -load 会话名 载入保存的会话信息\n"); + printf(" -l 用户名 使用指定的用户名连接\n"); + printf(" -P 端口 连接指定的端口\n"); + printf(" -pw 密码 使用指定的密码登录\n"); + printf(" -1 -2 强制使用 SSH 协议版本\n"); + printf(" -4 -6 强制使用 IPv4 或 IPv6 版本\n"); + printf(" -C 允许压缩\n"); + printf(" -i 密钥 认证使用的密钥文件\n"); + printf(" -noagent 禁止使用 Pageant 认证代理\n"); + printf(" -agent 开启使用 Pageant 认证代理\n"); printf(" -hostkey aa:bb:cc:...\n"); - printf(" manually specify a host key (may be repeated)\n"); - printf(" -batch disable all interactive prompts\n"); - printf(" -proxycmd command\n"); - printf(" use 'command' as local proxy\n"); - printf(" -sshlog file\n"); - printf(" -sshrawlog file\n"); - printf(" log protocol details to a file\n"); + printf(" 手工指定主机密钥指纹 (可能是重复的)\n"); + printf(" -batch 禁止所有交互提示\n"); + printf(" -proxycmd 命令\n"); + printf(" 使用 '命令' 作为本地代理\n"); + printf(" -sshlog 文件\n"); + printf(" -sshrawlog 文件\n"); + printf(" 日志协议明细输出到文件\n"); cleanup_exit(1); } diff --git a/readme.md b/readme.md new file mode 100644 index 000000000..7c3fbae6d --- /dev/null +++ b/readme.md @@ -0,0 +1,13 @@ +# PuTTY: 鑷敱鐨 Telnet/SSH 瀹㈡埛绔紙涓枃鐗堬級 + +PuTTY 鏄嚜鐢辩殑璺ㄥ钩鍙 Telnet/SSH 瀹㈡埛绔紝鍚屾椂鍦 Win32 鍜 Unix 绯荤粺涓嬫ā鎷 xterm 缁堢銆傚叾涓昏浣滆呮槸 Simon Tatham銆 + +褰撳墠鐗堟湰涓 0.68 娴嬭瘯鐗堬紝璇疯闂 [PuTTY 缃戠珯](http://www.chiark.greenend.org.uk/~sgtatham/putty/)鑾峰緱鏇村淇℃伅銆傚鏋滃彂鐜拌嫳鏂囩増鏈湁鏇存柊锛孾璇峰強鏃堕氱煡](https://github.com/larryli/PuTTY/issues/new)銆 + +## 鏈夐檺缁存姢 + +姝ら」鐩洰鍓嶅浜庢湁闄愮淮鎶ょ姸鎬侊紝寤鸿 Windows 涓嬬敤鎴蜂娇鐢 [Git for Windows](https://git-for-windows.github.io/) 涓 Git Bash 鎻愪緵鐨 SSH 宸ュ叿銆俶sysgit 鍐呯疆鏈夊熀浜 PuTTY 6.0 鏀归犵殑 [Mintty](https://mintty.github.io/) 缁堢锛屽苟涓旀彁渚涙湁瀹屾暣 Linux/Unix 鐜銆 + +## MIT 璁稿彲璇 + +PuTTY 閲囩敤涓嶅悓浜 GNU 杞欢鐨 MIT 璁稿彲璇併傜畝鍗曠殑璇达紝MIT 璁稿彲璇佹瘮 GPL 鏇村姞鑷敱銆傜被浼间笌 BSD 璁稿彲璇侊紝浣嗕篃姣 BSD 璁稿彲璇佹洿涓哄鏉俱傚浜 PuTTY 涓枃鐗堢増鏉冮〉闈 MIT 璁稿彲璇佺炕璇戞枃鏈粎渚涘弬鑰冿紝涓鍒囨硶寰嬫晥鍔涗互[鑻辨枃鍘熸湰](http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html)涓哄噯銆 diff --git a/sercfg.c b/sercfg.c index fef910f31..bc2cf72bd 100644 --- a/sercfg.c +++ b/sercfg.c @@ -23,7 +23,7 @@ static void serial_parity_handler(union control *ctrl, void *dlg, const char *name; int val; } parities[] = { - {"None", SER_PAR_NONE}, + {"无", SER_PAR_NONE}, {"Odd", SER_PAR_ODD}, {"Even", SER_PAR_EVEN}, {"Mark", SER_PAR_MARK}, @@ -78,7 +78,7 @@ static void serial_flow_handler(union control *ctrl, void *dlg, const char *name; int val; } flows[] = { - {"None", SER_FLOW_NONE}, + {"无", SER_FLOW_NONE}, {"XON/XOFF", SER_FLOW_XONXOFF}, {"RTS/CTS", SER_FLOW_RTSCTS}, {"DSR/DTR", SER_FLOW_DSRDTR}, @@ -139,19 +139,21 @@ void ser_setup_config_box(struct controlbox *b, int midsession, * Add the serial back end to the protocols list at the * top of the config box. */ - s = ctrl_getset(b, "Session", "hostport", - "Specify the destination you want to connect to"); + s = ctrl_getset(b, "会话", "hostport", + "指定要连接的目的地址"); for (i = 0; i < s->ncontrols; i++) { c = s->ctrls[i]; if (c->generic.type == CTRL_RADIO && c->generic.handler == config_protocolbuttons_handler) { c->radio.nbuttons++; - c->radio.ncolumns++; + if (c->radio.ncolumns < 4) { + c->radio.ncolumns++; + } c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *); c->radio.buttons[c->radio.nbuttons-1] = - dupstr("Serial"); + dupstr("串口(R)"); c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr); c->radio.buttondata[c->radio.nbuttons-1] = I(PROT_SERIAL); @@ -168,8 +170,8 @@ void ser_setup_config_box(struct controlbox *b, int midsession, * Entirely new Connection/Serial panel for serial port * configuration. */ - ctrl_settitle(b, "Connection/Serial", - "Options controlling local serial lines"); + ctrl_settitle(b, "连接/串口", + "本地串口设置"); if (!midsession) { /* @@ -177,30 +179,30 @@ void ser_setup_config_box(struct controlbox *b, int midsession, * midflight, although we do allow all other * reconfiguration. */ - s = ctrl_getset(b, "Connection/Serial", "serline", - "Select a serial line"); - ctrl_editbox(s, "Serial line to connect to", 'l', 40, + s = ctrl_getset(b, "连接/串口", "serline", + "选择一个串口"); + ctrl_editbox(s, "连接到的串口(L)", 'l', 40, HELPCTX(serial_line), conf_editbox_handler, I(CONF_serline), I(1)); } - s = ctrl_getset(b, "Connection/Serial", "sercfg", "Configure the serial line"); - ctrl_editbox(s, "Speed (baud)", 's', 40, + s = ctrl_getset(b, "连接/串口", "sercfg", "配置串口"); + ctrl_editbox(s, "速度/波特率(S)", 's', 40, HELPCTX(serial_speed), conf_editbox_handler, I(CONF_serspeed), I(-1)); - ctrl_editbox(s, "Data bits", 'b', 40, + ctrl_editbox(s, "数据位(B)", 'b', 40, HELPCTX(serial_databits), conf_editbox_handler, I(CONF_serdatabits), I(-1)); /* * Stop bits come in units of one half. */ - ctrl_editbox(s, "Stop bits", 't', 40, + ctrl_editbox(s, "停止位(T)", 't', 40, HELPCTX(serial_stopbits), conf_editbox_handler, I(CONF_serstopbits), I(-2)); - ctrl_droplist(s, "Parity", 'p', 40, + ctrl_droplist(s, "奇偶校验位(P)", 'p', 40, HELPCTX(serial_parity), serial_parity_handler, I(parity_mask)); - ctrl_droplist(s, "Flow control", 'f', 40, + ctrl_droplist(s, "流量控制(F)", 'f', 40, HELPCTX(serial_flow), serial_flow_handler, I(flow_mask)); } diff --git a/settings.c b/settings.c index 00c01c546..975a0fc18 100644 --- a/settings.c +++ b/settings.c @@ -917,8 +917,8 @@ void load_open_settings(void *sesskey, Conf *conf) gppi(sesskey, "PassiveTelnet", 0, conf, CONF_passive_telnet); gppi(sesskey, "BackspaceIsDelete", 1, conf, CONF_bksp_is_delete); gppi(sesskey, "RXVTHomeEnd", 0, conf, CONF_rxvt_homeend); - gppi(sesskey, "LinuxFunctionKeys", 0, conf, CONF_funky_type); - gppi(sesskey, "NoApplicationKeys", 0, conf, CONF_no_applic_k); + gppi(sesskey, "LinuxFunctionKeys", 2, conf, CONF_funky_type); + gppi(sesskey, "NoApplicationKeys", 1, conf, CONF_no_applic_k); gppi(sesskey, "NoApplicationCursors", 0, conf, CONF_no_applic_c); gppi(sesskey, "NoMouseReporting", 0, conf, CONF_no_mouse_rep); gppi(sesskey, "NoRemoteResize", 0, conf, CONF_no_remote_resize); @@ -987,7 +987,7 @@ void load_open_settings(void *sesskey, Conf *conf) / 1000 #endif ); - gppi(sesskey, "ScrollbackLines", 2000, conf, CONF_savelines); + gppi(sesskey, "ScrollbackLines", 9999, conf, CONF_savelines); gppi(sesskey, "DECOriginMode", 0, conf, CONF_dec_om); gppi(sesskey, "AutoWrapMode", 1, conf, CONF_wrap_mode); gppi(sesskey, "LFImpliesCR", 0, conf, CONF_lfhascr); @@ -1139,9 +1139,9 @@ static int sessioncmp(const void *av, const void *bv) * Alphabetical order, except that "Default Settings" is a * special case and comes first. */ - if (!strcmp(a, "Default Settings")) + if (!strcmp(a, "默认设置")) return -1; /* a comes first */ - if (!strcmp(b, "Default Settings")) + if (!strcmp(b, "默认设置")) return +1; /* b comes first */ /* * FIXME: perhaps we should ignore the first & in determining @@ -1188,7 +1188,7 @@ void get_sesslist(struct sesslist *list, int allocate) p = list->buffer; list->nsessions = 1; /* "Default Settings" counts as one */ while (*p) { - if (strcmp(p, "Default Settings")) + if (strcmp(p, "默认设置")) list->nsessions++; while (*p) p++; @@ -1196,11 +1196,11 @@ void get_sesslist(struct sesslist *list, int allocate) } list->sessions = snewn(list->nsessions + 1, const char *); - list->sessions[0] = "Default Settings"; + list->sessions[0] = "默认设置"; p = list->buffer; i = 1; while (*p) { - if (strcmp(p, "Default Settings")) + if (strcmp(p, "默认设置")) list->sessions[i++] = p; while (*p) p++; diff --git a/ssh.c b/ssh.c index 693f52d8d..c5cf960b2 100644 --- a/ssh.c +++ b/ssh.c @@ -11579,26 +11579,26 @@ static void ssh_size(void *handle, int width, int height) static const struct telnet_special *ssh_get_specials(void *handle) { static const struct telnet_special ssh1_ignore_special[] = { - {"IGNORE message", TS_NOP} + {"IGNORE 消息", TS_NOP} }; static const struct telnet_special ssh2_ignore_special[] = { - {"IGNORE message", TS_NOP}, + {"IGNORE 消息", TS_NOP}, }; static const struct telnet_special ssh2_rekey_special[] = { - {"Repeat key exchange", TS_REKEY}, + {"重复密钥交换", TS_REKEY}, }; static const struct telnet_special ssh2_session_specials[] = { {NULL, TS_SEP}, - {"Break", TS_BRK}, + {"Break 切断", TS_BRK}, /* These are the signal names defined by RFC 4254. * They include all the ISO C signals, but are a subset of the POSIX * required signals. */ - {"SIGINT (Interrupt)", TS_SIGINT}, - {"SIGTERM (Terminate)", TS_SIGTERM}, - {"SIGKILL (Kill)", TS_SIGKILL}, - {"SIGQUIT (Quit)", TS_SIGQUIT}, - {"SIGHUP (Hangup)", TS_SIGHUP}, - {"More signals", TS_SUBMENU}, + {"SIGINT (终止)", TS_SIGINT}, + {"SIGTERM (结束)", TS_SIGTERM}, + {"SIGKILL (强制终止)", TS_SIGKILL}, + {"SIGQUIT (退出)", TS_SIGQUIT}, + {"SIGHUP (断开)", TS_SIGHUP}, + {"更多信号", TS_SUBMENU}, {"SIGABRT", TS_SIGABRT}, {"SIGALRM", TS_SIGALRM}, {"SIGFPE", TS_SIGFPE}, {"SIGILL", TS_SIGILL}, {"SIGPIPE", TS_SIGPIPE}, {"SIGSEGV", TS_SIGSEGV}, @@ -11644,7 +11644,7 @@ static const struct telnet_special *ssh_get_specials(void *handle) if (ssh->n_uncert_hostkeys) { static const struct telnet_special uncert_start[] = { {NULL, TS_SEP}, - {"Cache new host key type", TS_SUBMENU}, + {"缓存新的主机密钥类型", TS_SUBMENU}, }; static const struct telnet_special uncert_end[] = { {NULL, TS_EXITMENU}, diff --git a/sshbn.h b/sshbn.h index 6ee97ee65..8709c26a3 100644 --- a/sshbn.h +++ b/sshbn.h @@ -69,50 +69,11 @@ #elif defined _MSC_VER && defined _M_AMD64 - /* - * 64-bit BignumInt, using Visual Studio x86-64 compiler intrinsics. - * - * 64-bit Visual Studio doesn't provide very much in the way of help - * here: there's no int128 type, and also no inline assembler giving - * us direct access to the x86-64 MUL or ADC instructions. However, - * there are compiler intrinsics giving us that access, so we can - * use those - though it turns out we have to be a little careful, - * since they seem to generate wrong code if their pointer-typed - * output parameters alias their inputs. Hence all the internal temp - * variables inside the macros. - */ + /* 32-bit BignumInt, using Visual Studio __int64 as BignumDblInt */ - #include - typedef unsigned char BignumCarry; /* the type _addcarry_u64 likes to use */ - typedef unsigned __int64 BignumInt; - #define BIGNUM_INT_BITS 64 - #define BignumADC(ret, retc, a, b, c) do \ - { \ - BignumInt ADC_tmp; \ - (retc) = _addcarry_u64(c, a, b, &ADC_tmp); \ - (ret) = ADC_tmp; \ - } while (0) - #define BignumMUL(rh, rl, a, b) do \ - { \ - BignumInt MULADD_hi; \ - (rl) = _umul128(a, b, &MULADD_hi); \ - (rh) = MULADD_hi; \ - } while (0) - #define BignumMULADD(rh, rl, a, b, addend) do \ - { \ - BignumInt MULADD_lo, MULADD_hi; \ - MULADD_lo = _umul128(a, b, &MULADD_hi); \ - MULADD_hi += _addcarry_u64(0, MULADD_lo, (addend), &(rl)); \ - (rh) = MULADD_hi; \ - } while (0) - #define BignumMULADD2(rh, rl, a, b, addend1, addend2) do \ - { \ - BignumInt MULADD_lo1, MULADD_lo2, MULADD_hi; \ - MULADD_lo1 = _umul128(a, b, &MULADD_hi); \ - MULADD_hi += _addcarry_u64(0, MULADD_lo1, (addend1), &MULADD_lo2); \ - MULADD_hi += _addcarry_u64(0, MULADD_lo2, (addend2), &(rl)); \ - (rh) = MULADD_hi; \ - } while (0) + typedef unsigned int BignumInt; + #define BIGNUM_INT_BITS 32 + #define DEFINE_BIGNUMDBLINT typedef unsigned __int64 BignumDblInt #elif defined __GNUC__ || defined _LLP64 || __STDC__ >= 199901L diff --git a/sshpubk.c b/sshpubk.c index 1a27c3139..f76ae827a 100644 --- a/sshpubk.c +++ b/sshpubk.c @@ -1695,16 +1695,16 @@ int key_type(const Filename *filename) const char *key_type_to_str(int type) { switch (type) { - case SSH_KEYTYPE_UNOPENABLE: return "unable to open file"; break; - case SSH_KEYTYPE_UNKNOWN: return "not a recognised key file format"; break; - case SSH_KEYTYPE_SSH1_PUBLIC: return "SSH-1 public key"; break; - case SSH_KEYTYPE_SSH2_PUBLIC_RFC4716: return "SSH-2 public key (RFC 4716 format)"; break; - case SSH_KEYTYPE_SSH2_PUBLIC_OPENSSH: return "SSH-2 public key (OpenSSH format)"; break; - case SSH_KEYTYPE_SSH1: return "SSH-1 private key"; break; - case SSH_KEYTYPE_SSH2: return "PuTTY SSH-2 private key"; break; - case SSH_KEYTYPE_OPENSSH_PEM: return "OpenSSH SSH-2 private key (old PEM format)"; break; - case SSH_KEYTYPE_OPENSSH_NEW: return "OpenSSH SSH-2 private key (new format)"; break; - case SSH_KEYTYPE_SSHCOM: return "ssh.com SSH-2 private key"; break; + case SSH_KEYTYPE_UNOPENABLE: return "无法打开文件"; break; + case SSH_KEYTYPE_UNKNOWN: return "不是私钥"; break; + case SSH_KEYTYPE_SSH1_PUBLIC: return "SSH-1 公钥"; break; + case SSH_KEYTYPE_SSH2_PUBLIC_RFC4716: return "SSH-2 公钥 (RFC 4716 格式)"; break; + case SSH_KEYTYPE_SSH2_PUBLIC_OPENSSH: return "SSH-2 公钥 (OpenSSH 格式)"; break; + case SSH_KEYTYPE_SSH1: return "SSH-1 私钥"; break; + case SSH_KEYTYPE_SSH2: return "PuTTY SSH-2 私钥"; break; + case SSH_KEYTYPE_OPENSSH_PEM: return "OpenSSH SSH-2 私钥 (旧 PEM 格式)"; break; + case SSH_KEYTYPE_OPENSSH_NEW: return "OpenSSH SSH-2 私钥 (新格式)"; break; + case SSH_KEYTYPE_SSHCOM: return "ssh.com SSH-2 私钥"; break; /* * This function is called with a key type derived from * looking at an actual key file, so the output-only type diff --git a/version.h b/version.h index 26242ad6d..dee507d19 100644 --- a/version.h +++ b/version.h @@ -8,9 +8,9 @@ * default stuff used for local development runs of 'make'. */ -#define TEXTVER "Unidentified build" -#define SSHVER "PuTTY-Unidentified-Local-Build" -#define BINARY_VERSION 0,0,0,0 +#define TEXTVER "发布版 0.69cn" +#define SSHVER "PuTTY-0-69-CN-Build" +#define BINARY_VERSION 0,69,0,0 #ifndef SOURCE_COMMIT /* diff --git a/windows/pageant.rc b/windows/pageant.rc index 65bbbefc2..5d4a1bd13 100644 --- a/windows/pageant.rc +++ b/windows/pageant.rc @@ -5,55 +5,55 @@ #include "rcstuff.h" #define APPNAME "Pageant" -#define APPDESC "PuTTY SSH authentication agent" +#define APPDESC "PuTTY SSH 认证代理" 200 ICON "pageant.ico" 201 ICON "pageants.ico" 210 DIALOG DISCARDABLE 0, 0, 140, 60 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Pageant: Enter Passphrase" -FONT 8, "MS Shell Dlg" +CAPTION "Pageant: 输入密码" +FONT 9, "宋体" BEGIN - CTEXT "Enter passphrase for key", 100, 10, 6, 120, 8 + CTEXT "请输入密钥的密码", 100, 10, 6, 120, 8 CTEXT "", 101, 10, 16, 120, 8 EDITTEXT 102, 10, 26, 120, 12, ES_PASSWORD | ES_AUTOHSCROLL - DEFPUSHBUTTON "O&K", IDOK, 20, 42, 40, 14 - PUSHBUTTON "&Cancel", IDCANCEL, 80, 42, 40, 14 + DEFPUSHBUTTON "确定(&K)", IDOK, 20, 42, 40, 14 + PUSHBUTTON "取消(&C)", IDCANCEL, 80, 42, 40, 14 END 211 DIALOG DISCARDABLE 0, 0, 330, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Pageant Key List" -FONT 8, "MS Shell Dlg" +CAPTION "Pageant 密钥列表" +FONT 9, "宋体" BEGIN LISTBOX 100, 10, 10, 310, 155, LBS_EXTENDEDSEL | LBS_HASSTRINGS | LBS_USETABSTOPS | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Add Key", 101, 75, 162, 60, 14 - PUSHBUTTON "&Remove Key", 102, 195, 162, 60, 14 - PUSHBUTTON "&Help", 103, 10, 182, 50, 14 - DEFPUSHBUTTON "&Close", IDOK, 270, 182, 50, 14 + PUSHBUTTON "增加密钥(&A)", 101, 75, 162, 60, 14 + PUSHBUTTON "移除密钥(&R)", 102, 195, 162, 60, 14 + PUSHBUTTON "帮助(&H)", 103, 10, 182, 50, 14 + DEFPUSHBUTTON "关闭(&C)", IDOK, 270, 182, 50, 14 END /* Accelerators used: cl */ 213 DIALOG DISCARDABLE 140, 40, 270, 106 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Pageant" -FONT 8, "MS Shell Dlg" +CAPTION "关于 Pageant" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "&Close", IDOK, 216, 88, 48, 14 - PUSHBUTTON "View &Licence", 101, 6, 88, 70, 14 - PUSHBUTTON "Visit &Web Site", 102, 140, 88, 70, 14 + DEFPUSHBUTTON "关闭(&C)", IDOK, 216, 88, 48, 14 + PUSHBUTTON "查看许可证(&L)", 101, 6, 88, 70, 14 + PUSHBUTTON "查看网站 (&W)", 102, 140, 88, 70, 14 EDITTEXT 1000, 10, 6, 250, 80, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE END /* No accelerators used */ 214 DIALOG DISCARDABLE 50, 50, 326, 231 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Licence" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 许可证" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "OK", IDOK, 148, 211, 44, 14 + DEFPUSHBUTTON "确定", IDOK, 148, 211, 44, 14 EDITTEXT 1000, 10, 10, 306, 192, ES_READONLY | ES_MULTILINE | ES_LEFT, WS_EX_STATICEDGE END diff --git a/windows/plink.rc b/windows/plink.rc index 5282907d2..7f141f262 100644 --- a/windows/plink.rc +++ b/windows/plink.rc @@ -1,7 +1,7 @@ #include "rcstuff.h" #define APPNAME "Plink" -#define APPDESC "Command-line SSH, Telnet, and Rlogin client" +#define APPDESC "命令行 SSH、Telnet 和 Rlogin 客户端" 200 ICON "putty.ico" diff --git a/windows/pscp.rc b/windows/pscp.rc index f99324510..0d9d0daf4 100644 --- a/windows/pscp.rc +++ b/windows/pscp.rc @@ -1,7 +1,7 @@ #include "rcstuff.h" #define APPNAME "PSCP" -#define APPDESC "Command-line SCP/SFTP client" +#define APPDESC "命令行 SCP/SFTP 客户端" 200 ICON "pscp.ico" diff --git a/windows/psftp.rc b/windows/psftp.rc index 6b39531ed..85c31b13e 100644 --- a/windows/psftp.rc +++ b/windows/psftp.rc @@ -1,7 +1,7 @@ #include "rcstuff.h" #define APPNAME "PSFTP" -#define APPDESC "Command-line interactive SFTP client" +#define APPDESC "命令行交互 SFTP 客户端" 200 ICON "pscp.ico" diff --git a/windows/putty.rc b/windows/putty.rc index 9cfd43d22..183ba69fa 100644 --- a/windows/putty.rc +++ b/windows/putty.rc @@ -1,7 +1,7 @@ #include "rcstuff.h" #define APPNAME "PuTTY" -#define APPDESC "SSH, Telnet and Rlogin client" +#define APPDESC "SSH、Telnet 和 Rlogin 客户端" #include "win_res.rc2" diff --git a/windows/puttygen.rc b/windows/puttygen.rc index 38e7b35ba..ae9cb6417 100644 --- a/windows/puttygen.rc +++ b/windows/puttygen.rc @@ -5,48 +5,48 @@ #include "rcstuff.h" #define APPNAME "PuTTYgen" -#define APPDESC "PuTTY SSH key generation utility" +#define APPDESC "PuTTY SSH 密钥生成工具" 200 ICON "puttygen.ico" 201 DIALOG DISCARDABLE 0, 0, 318, 270 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Key Generator" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 密钥生成器" +FONT 9, "宋体" BEGIN END 210 DIALOG DISCARDABLE 0, 0, 140, 60 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTYgen: Enter Passphrase" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTYgen: 输入密码" +FONT 9, "宋体" BEGIN - CTEXT "Enter passphrase for key", 100, 10, 6, 120, 8 + CTEXT "请输入密钥的密码", 100, 10, 6, 120, 8 CTEXT "", 101, 10, 16, 120, 8 EDITTEXT 102, 10, 26, 120, 12, ES_PASSWORD | ES_AUTOHSCROLL - DEFPUSHBUTTON "O&K", IDOK, 20, 42, 40, 14 - PUSHBUTTON "&Cancel", IDCANCEL, 80, 42, 40, 14 + DEFPUSHBUTTON "确定(&K)", IDOK, 20, 42, 40, 14 + PUSHBUTTON "取消(&C)", IDCANCEL, 80, 42, 40, 14 END /* Accelerators used: cl */ 213 DIALOG DISCARDABLE 140, 40, 270, 106 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About PuTTYgen" -FONT 8, "MS Shell Dlg" +CAPTION "关于 PuTTYgen" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "&Close", IDOK, 216, 88, 48, 14 - PUSHBUTTON "View &Licence", 101, 6, 88, 70, 14 - PUSHBUTTON "Visit &Web Site", 102, 140, 88, 70, 14 + DEFPUSHBUTTON "关闭(&C)", IDOK, 216, 88, 48, 14 + PUSHBUTTON "查看许可证(&L)", 101, 6, 88, 70, 14 + PUSHBUTTON "查看网站 (&W)", 102, 140, 88, 70, 14 EDITTEXT 1000, 10, 6, 250, 80, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE END /* No accelerators used */ 214 DIALOG DISCARDABLE 50, 50, 326, 231 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Licence" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 许可证" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "OK", IDOK, 148, 211, 44, 14 + DEFPUSHBUTTON "确定", IDOK, 148, 211, 44, 14 EDITTEXT 1000, 10, 10, 306, 192, ES_READONLY | ES_MULTILINE | ES_LEFT, WS_EX_STATICEDGE END diff --git a/windows/version.rc2 b/windows/version.rc2 index 500f9002c..b50f56c8f 100644 --- a/windows/version.rc2 +++ b/windows/version.rc2 @@ -35,17 +35,17 @@ BEGIN * in the file properties in Explorer.) */ BLOCK "StringFileInfo" BEGIN - /* "lang-charset" LLLLCCCC = (UK English, Unicode) */ - BLOCK "080904B0" + /* "lang-charset" LLLLCCCC = (CN 中文, 中华人民共和国) */ + BLOCK "080404B0" BEGIN VALUE "CompanyName", "Simon Tatham" /* required :/ */ - VALUE "ProductName", "PuTTY suite" + VALUE "ProductName", "PuTTY 套件" VALUE "FileDescription", APPDESC VALUE "InternalName", APPNAME VALUE "OriginalFilename", APPNAME VALUE "FileVersion", TEXTVER VALUE "ProductVersion", TEXTVER - VALUE "LegalCopyright", "Copyright \251 " SHORT_COPYRIGHT_DETAILS "." + VALUE "LegalCopyright", "版权所有(C) " SHORT_COPYRIGHT_DETAILS "." #if (!defined SNAPSHOT) && (!defined RELEASE) && (!defined PRERELEASE) /* Only if VS_FF_PRIVATEBUILD. */ VALUE "PrivateBuild", TEXTVER /* NBI */ @@ -55,6 +55,6 @@ BEGIN BLOCK "VarFileInfo" BEGIN /* Once again -- same meanings -- apparently necessary */ - VALUE "Translation", 0x809, 1200 + VALUE "Translation", 0x804, 0x4B0 END END diff --git a/windows/win_res.rc2 b/windows/win_res.rc2 index 92d39cd5a..0fee38d2d 100644 --- a/windows/win_res.rc2 +++ b/windows/win_res.rc2 @@ -18,20 +18,20 @@ IDI_CFGICON ICON "puttycfg.ico" /* Accelerators used: clw */ IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 270, 106 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About PuTTY" -FONT 8, "MS Shell Dlg" +CAPTION "关于 PuTTY" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "&Close", IDOK, 216, 88, 48, 14 - PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 88, 70, 14 - PUSHBUTTON "Visit &Web Site", IDA_WEB, 140, 88, 70, 14 + DEFPUSHBUTTON "关闭(&C)", IDOK, 216, 88, 48, 14 + PUSHBUTTON "查看许可证(&L)", IDA_LICENCE, 6, 88, 70, 14 + PUSHBUTTON "访问网站(&W)", IDA_WEB, 140, 88, 70, 14 EDITTEXT IDA_TEXT, 10, 6, 250, 80, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE END /* Accelerators used: aco */ -IDD_MAINBOX DIALOG DISCARDABLE 0, 0, 300, 252 +IDD_MAINBOX DIALOG DISCARDABLE 0, 0, 300, 257 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Configuration" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 配置" +FONT 9, "宋体" CLASS "PuTTYConfigBox" BEGIN END @@ -39,21 +39,21 @@ END /* Accelerators used: co */ IDD_LOGBOX DIALOG DISCARDABLE 100, 20, 300, 119 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Event Log" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 事件日志" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "&Close", IDOK, 135, 102, 44, 14 - PUSHBUTTON "C&opy", IDN_COPY, 81, 102, 44, 14 + DEFPUSHBUTTON "关闭(&C)", IDOK, 135, 102, 44, 14 + PUSHBUTTON "复制(&O)", IDN_COPY, 81, 102, 44, 14 LISTBOX IDN_LIST, 3, 3, 294, 95, LBS_HASSTRINGS | LBS_USETABSTOPS | WS_VSCROLL | LBS_EXTENDEDSEL END /* No accelerators used */ IDD_LICENCEBOX DIALOG DISCARDABLE 50, 50, 326, 231 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "PuTTY Licence" -FONT 8, "MS Shell Dlg" +CAPTION "PuTTY 许可证" +FONT 9, "宋体" BEGIN - DEFPUSHBUTTON "OK", IDOK, 148, 211, 44, 14 + DEFPUSHBUTTON "确定", IDOK, 148, 211, 44, 14 EDITTEXT IDA_TEXT, 10, 10, 306, 192, ES_READONLY | ES_MULTILINE | ES_LEFT, WS_EX_STATICEDGE END diff --git a/windows/wincfg.c b/windows/wincfg.c index 9d3673a6d..4f3261b15 100644 --- a/windows/wincfg.c +++ b/windows/wincfg.c @@ -52,11 +52,11 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * Add the About and Help buttons to the standard panel. */ s = ctrl_getset(b, "", "", ""); - c = ctrl_pushbutton(s, "About", 'a', HELPCTX(no_help), + c = ctrl_pushbutton(s, "关于(A)", 'a', HELPCTX(no_help), about_handler, P(hwndp)); c->generic.column = 0; if (has_help) { - c = ctrl_pushbutton(s, "Help", 'h', HELPCTX(no_help), + c = ctrl_pushbutton(s, "帮助(H)", 'h', HELPCTX(no_help), help_handler, P(hwndp)); c->generic.column = 1; } @@ -66,9 +66,9 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * Full-screen mode is a Windows peculiarity; hence * scrollbar_in_fullscreen is as well. */ - s = ctrl_getset(b, "Window", "scrollback", - "Control the scrollback in the window"); - ctrl_checkbox(s, "Display scrollbar in full screen mode", 'i', + s = ctrl_getset(b, "窗口", "scrollback", + "设置窗口回滚"); + ctrl_checkbox(s, "全屏模式显示滚动条(I)", 'i', HELPCTX(window_scrollback), conf_checkbox_handler, I(CONF_scrollbar_in_fullscreen)); @@ -101,12 +101,12 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * Windows has the AltGr key, which has various Windows- * specific options. */ - s = ctrl_getset(b, "Terminal/Keyboard", "features", - "Enable extra keyboard features:"); - ctrl_checkbox(s, "AltGr acts as Compose key", 't', + s = ctrl_getset(b, "终端/键盘", "features", + "使用附加键盘特性:"); + ctrl_checkbox(s, "AltGr 动作为组合键", 't', HELPCTX(keyboard_compose), conf_checkbox_handler, I(CONF_compose_key)); - ctrl_checkbox(s, "Control-Alt is different from AltGr", 'd', + ctrl_checkbox(s, "Ctrl+Alt 键与 AltGr 不同(D)", 'd', HELPCTX(keyboard_ctrlalt), conf_checkbox_handler, I(CONF_ctrlaltkeys)); @@ -127,7 +127,7 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * the interface, and template creation code is under no actual * obligation to use them. */ - s = ctrl_getset(b, "Terminal/Bell", "style", "Set the style of bell"); + s = ctrl_getset(b, "终端/响铃", "style", "设置响铃类型"); { int i; for (i = 0; i < s->ncontrols; i++) { @@ -139,9 +139,9 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *); c->radio.buttons[c->radio.nbuttons-1] = - dupstr("Play a custom sound file"); + dupstr("播放指定的声音文件"); c->radio.buttons[c->radio.nbuttons-2] = - dupstr("Beep using the PC speaker"); + dupstr("使用 PC 扬声器响铃"); c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr); c->radio.buttondata[c->radio.nbuttons-1] = I(BELL_WAVEFILE); @@ -156,8 +156,8 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, } } } - ctrl_filesel(s, "Custom sound file to play as a bell:", NO_SHORTCUT, - FILTER_WAVE_FILES, FALSE, "Select bell sound file", + ctrl_filesel(s, "响铃时播放的声音文件:", NO_SHORTCUT, + FILTER_WAVE_FILES, FALSE, "选择声音文件", HELPCTX(bell_style), conf_filesel_handler, I(CONF_bell_wavefile)); @@ -165,46 +165,46 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * While we've got this box open, taskbar flashing on a bell is * also Windows-specific. */ - ctrl_radiobuttons(s, "Taskbar/caption indication on bell:", 'i', 3, + ctrl_radiobuttons(s, "响铃任务栏/标题栏显示(I):", 'i', 3, HELPCTX(bell_taskbar), conf_radiobutton_handler, I(CONF_beep_ind), - "Disabled", I(B_IND_DISABLED), - "Flashing", I(B_IND_FLASH), - "Steady", I(B_IND_STEADY), NULL); + "禁止", I(B_IND_DISABLED), + "闪烁", I(B_IND_FLASH), + "反显", I(B_IND_STEADY), NULL); /* * The sunken-edge border is a Windows GUI feature. */ - s = ctrl_getset(b, "Window/Appearance", "border", - "Adjust the window border"); - ctrl_checkbox(s, "Sunken-edge border (slightly thicker)", 's', + s = ctrl_getset(b, "窗口/外观", "border", + "调整窗口边框"); + ctrl_checkbox(s, "下沉边框(细瘦外观)(S)", 's', HELPCTX(appearance_border), conf_checkbox_handler, I(CONF_sunken_edge)); /* * Configurable font quality settings for Windows. */ - s = ctrl_getset(b, "Window/Appearance", "font", - "Font settings"); - ctrl_checkbox(s, "Allow selection of variable-pitch fonts", NO_SHORTCUT, + s = ctrl_getset(b, "窗口/外观", "font", + "字体设置"); + ctrl_checkbox(s, "允许选择可变宽度字体", NO_SHORTCUT, HELPCTX(appearance_font), variable_pitch_handler, I(0)); - ctrl_radiobuttons(s, "Font quality:", 'q', 2, + ctrl_radiobuttons(s, "字体品质(Q):", 'q', 2, HELPCTX(appearance_font), conf_radiobutton_handler, I(CONF_font_quality), - "Antialiased", I(FQ_ANTIALIASED), - "Non-Antialiased", I(FQ_NONANTIALIASED), + "抗锯齿", I(FQ_ANTIALIASED), + "无抗锯齿", I(FQ_NONANTIALIASED), "ClearType", I(FQ_CLEARTYPE), - "Default", I(FQ_DEFAULT), NULL); + "默认", I(FQ_DEFAULT), NULL); /* * Cyrillic Lock is a horrid misfeature even on Windows, and * the least we can do is ensure it never makes it to any other * platform (at least unless someone fixes it!). */ - s = ctrl_getset(b, "Window/Translation", "tweaks", NULL); - ctrl_checkbox(s, "Caps Lock acts as Cyrillic switch", 's', + s = ctrl_getset(b, "窗口/转换", "tweaks", NULL); + ctrl_checkbox(s, "Caps Lock 大写按键用于 Cyrillic 切换", 's', HELPCTX(translation_cyrillic), conf_checkbox_handler, I(CONF_xlat_capslockcyr)); @@ -213,10 +213,10 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * On Windows we can use but not enumerate translation tables * from the operating system. Briefly document this. */ - s = ctrl_getset(b, "Window/Translation", "trans", - "Character set translation on received data"); - ctrl_text(s, "(Codepages supported by Windows but not listed here, " - "such as CP866 on many systems, can be entered manually)", + s = ctrl_getset(b, "窗口/转换", "trans", + "接收数据时字符集转换"); + ctrl_text(s, "(列表中没有的 Windows 代码页," + " 比如指定 CP866 代码页,可以手工输入到列表)", HELPCTX(translation_codepage)); /* @@ -224,8 +224,8 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * additional options when working with line-drawing * characters. */ - str = dupprintf("Adjust how %s displays line drawing characters", appname); - s = ctrl_getset(b, "Window/Translation", "linedraw", str); + str = dupprintf("调整 %s 显示文本字符行", appname); + s = ctrl_getset(b, "窗口/转换", "linedraw", str); sfree(str); { int i; @@ -238,11 +238,11 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *); c->radio.buttons[c->radio.nbuttons-3] = - dupstr("Font has XWindows encoding"); + dupstr("使用 X Windows 字体"); c->radio.buttons[c->radio.nbuttons-2] = - dupstr("Use font in both ANSI and OEM modes"); + dupstr("使用 ANSI 和 OEM 字体(B)"); c->radio.buttons[c->radio.nbuttons-1] = - dupstr("Use font in OEM mode only"); + dupstr("只使用 OEM 字体"); c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr); c->radio.buttondata[c->radio.nbuttons-3] = I(VT_XWINDOWS); @@ -268,9 +268,9 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, /* * RTF paste is Windows-specific. */ - s = ctrl_getset(b, "Window/Selection", "format", - "Formatting of pasted characters"); - ctrl_checkbox(s, "Paste to clipboard in RTF as well as plain text", 'f', + s = ctrl_getset(b, "窗口/选择", "format", + "格式化要传送的字符"); + ctrl_checkbox(s, "粘贴 RTF 文本到剪贴板", 'f', HELPCTX(selection_rtf), conf_checkbox_handler, I(CONF_rtf_paste)); @@ -279,15 +279,15 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * mode in which the more critical Paste action is available on * the right button instead. */ - s = ctrl_getset(b, "Window/Selection", "mouse", - "Control use of mouse"); - ctrl_radiobuttons(s, "Action of mouse buttons:", 'm', 1, + s = ctrl_getset(b, "窗口/选择", "mouse", + "鼠标使用控制"); + ctrl_radiobuttons(s, "鼠标按钮动作(M):", 'm', 1, HELPCTX(selection_buttons), conf_radiobutton_handler, I(CONF_mouse_is_xterm), - "Windows (Middle extends, Right brings up menu)", I(2), - "Compromise (Middle extends, Right pastes)", I(0), - "xterm (Right extends, Middle pastes)", I(1), NULL); + "Windows (中键扩展,右键弹出菜单)", I(2), + "混合模式 (中键扩展,右键粘贴)", I(0), + "xterm (右键扩展,中键粘贴)", I(1), NULL); /* * This really ought to go at the _top_ of its box, not the * bottom, so we'll just do some shuffling now we've set it @@ -300,12 +300,12 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, /* * Logical palettes don't even make sense anywhere except Windows. */ - s = ctrl_getset(b, "Window/Colours", "general", - "General options for colour usage"); - ctrl_checkbox(s, "Attempt to use logical palettes", 'l', + s = ctrl_getset(b, "窗口/颜色", "general", + "颜色使用常规设置"); + ctrl_checkbox(s, "尝试使用逻辑调色板(L)", 'l', HELPCTX(colours_logpal), conf_checkbox_handler, I(CONF_try_palette)); - ctrl_checkbox(s, "Use system colours", 's', + ctrl_checkbox(s, "使用系统颜色(S)", 's', HELPCTX(colours_system), conf_checkbox_handler, I(CONF_system_colour)); @@ -313,35 +313,35 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, /* * Resize-by-changing-font is a Windows insanity. */ - s = ctrl_getset(b, "Window", "size", "Set the size of the window"); - ctrl_radiobuttons(s, "When window is resized:", 'z', 1, + s = ctrl_getset(b, "窗口", "size", "设置窗口大小"); + ctrl_radiobuttons(s, "当窗口大小被改变时(Z):", 'z', 1, HELPCTX(window_resize), conf_radiobutton_handler, I(CONF_resize_action), - "Change the number of rows and columns", I(RESIZE_TERM), - "Change the size of the font", I(RESIZE_FONT), - "Change font size only when maximised", I(RESIZE_EITHER), - "Forbid resizing completely", I(RESIZE_DISABLED), NULL); + "改变行列数", I(RESIZE_TERM), + "改变字体大小", I(RESIZE_FONT), + "只在最大化时改变字体大小", I(RESIZE_EITHER), + "完全禁止大小改变", I(RESIZE_DISABLED), NULL); /* * Most of the Window/Behaviour stuff is there to mimic Windows * conventions which PuTTY can optionally disregard. Hence, * most of these options are Windows-specific. */ - s = ctrl_getset(b, "Window/Behaviour", "main", NULL); - ctrl_checkbox(s, "Window closes on ALT-F4", '4', + s = ctrl_getset(b, "窗口/行为", "main", NULL); + ctrl_checkbox(s, "Alt+F4 关闭窗口", '4', HELPCTX(behaviour_altf4), conf_checkbox_handler, I(CONF_alt_f4)); - ctrl_checkbox(s, "System menu appears on ALT-Space", 'y', + ctrl_checkbox(s, "Alt+空格显示系统菜单(Y)", 'y', HELPCTX(behaviour_altspace), conf_checkbox_handler, I(CONF_alt_space)); - ctrl_checkbox(s, "System menu appears on ALT alone", 'l', + ctrl_checkbox(s, "Alt 键显示系统菜单", 'l', HELPCTX(behaviour_altonly), conf_checkbox_handler, I(CONF_alt_only)); - ctrl_checkbox(s, "Ensure window is always on top", 'e', + ctrl_checkbox(s, "窗口总在最上层(E)", 'e', HELPCTX(behaviour_alwaysontop), conf_checkbox_handler, I(CONF_alwaysontop)); - ctrl_checkbox(s, "Full screen on Alt-Enter", 'f', + ctrl_checkbox(s, "Alt+回车全屏(F)", 'f', HELPCTX(behaviour_altenter), conf_checkbox_handler, I(CONF_fullscreenonaltenter)); @@ -352,7 +352,7 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, */ if (!midsession) { int i; - s = ctrl_getset(b, "Connection/Proxy", "basics", NULL); + s = ctrl_getset(b, "连接/代理", "basics", NULL); for (i = 0; i < s->ncontrols; i++) { c = s->ctrls[i]; if (c->generic.type == CTRL_RADIO && @@ -362,7 +362,7 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, c->radio.buttons = sresize(c->radio.buttons, c->radio.nbuttons, char *); c->radio.buttons[c->radio.nbuttons-1] = - dupstr("Local"); + dupstr("本地"); c->radio.buttondata = sresize(c->radio.buttondata, c->radio.nbuttons, intorptr); c->radio.buttondata[c->radio.nbuttons-1] = I(PROXY_CMD); @@ -376,8 +376,8 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, c->generic.context.i == CONF_proxy_telnet_command) { assert(c->generic.handler == conf_editbox_handler); sfree(c->generic.label); - c->generic.label = dupstr("Telnet command, or local" - " proxy command"); + c->generic.label = dupstr("Telnet 命令,或者本地" + "代理命令(M)"); break; } } @@ -394,9 +394,9 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, * means to override it. */ if (!midsession && backend_from_proto(PROT_SSH)) { - s = ctrl_getset(b, "Connection/SSH/X11", "x11", "X11 forwarding"); - ctrl_filesel(s, "X authority file for local display", 't', - NULL, FALSE, "Select X authority file", + s = ctrl_getset(b, "连接/SSH/X11", "x11", "X11 映射"); + ctrl_filesel(s, "用于本地显示的 X 认证文件(T)", 't', + NULL, FALSE, "选择 X 认证文件", HELPCTX(ssh_tunnels_xauthority), conf_filesel_handler, I(CONF_xauthfile)); } diff --git a/windows/wincons.c b/windows/wincons.c index efdecd58e..e6143d708 100644 --- a/windows/wincons.c +++ b/windows/wincons.c @@ -54,55 +54,55 @@ int verify_ssh_host_key(void *frontend, char *host, int port, DWORD savemode, i; static const char absentmsg_batch[] = - "The server's host key is not cached in the registry. You\n" - "have no guarantee that the server is the computer you\n" - "think it is.\n" - "The server's %s key fingerprint is:\n" + "在系统注册表缓存中没有找到该服务器密钥。\n" + "不能保证该服务器是能够正确访问的计算机。\n" + "" + "该服务器的 %s 密钥指纹为:\n" "%s\n" - "Connection abandoned.\n"; + "放弃连接。\n"; static const char absentmsg[] = - "The server's host key is not cached in the registry. You\n" - "have no guarantee that the server is the computer you\n" - "think it is.\n" - "The server's %s key fingerprint is:\n" + "在系统注册表缓存中没有找到该服务器密钥。\n" + "不能保证该服务器是能够正确访问的计算机。\n" + "" + "该服务器的 %s 密钥指纹为:\n" "%s\n" - "If you trust this host, enter \"y\" to add the key to\n" - "PuTTY's cache and carry on connecting.\n" - "If you want to carry on connecting just once, without\n" - "adding the key to the cache, enter \"n\".\n" - "If you do not trust this host, press Return to abandon the\n" - "connection.\n" - "Store key in cache? (y/n) "; + "如果信任该主机,请输入 \"y\" 增加密钥到" + " PuTTY 缓存中并继续连接。\n" + "如果仅仅只希望进行本次连接,而不" + "将密钥储存,请输入 \"n\"。\n" + "如果不信任该主机,请按回车键放弃" + "连接。\n" + "是否储存该密钥?(y/n) "; static const char wrongmsg_batch[] = - "WARNING - POTENTIAL SECURITY BREACH!\n" - "The server's host key does not match the one PuTTY has\n" - "cached in the registry. This means that either the\n" - "server administrator has changed the host key, or you\n" - "have actually connected to another computer pretending\n" - "to be the server.\n" - "The new %s key fingerprint is:\n" + "**警告** - 潜在安全隐患!\n" + "在系统注册表缓存中不能匹配该服务器密钥。\n" + "这说明可能该服务器管理员更新了主机密钥,\n" + "或者更可能是连接到了一台伪装成该服务器的\n" + "虚假计算机系统。\n" + "" + "新的 %s 密钥指纹为:\n" "%s\n" - "Connection abandoned.\n"; + "放弃连接。\n"; static const char wrongmsg[] = - "WARNING - POTENTIAL SECURITY BREACH!\n" - "The server's host key does not match the one PuTTY has\n" - "cached in the registry. This means that either the\n" - "server administrator has changed the host key, or you\n" - "have actually connected to another computer pretending\n" - "to be the server.\n" - "The new %s key fingerprint is:\n" + "**警告** - 潜在安全隐患!\n" + "在系统注册表缓存中不能匹配该服务器密钥。\n" + "这说明可能该服务器管理员更新了主机密钥,\n" + "或者更可能是连接到了一台伪装成该服务器的\n" + "虚假计算机系统。\n" + "" + "新的 %s 密钥指纹为:\n" "%s\n" - "If you were expecting this change and trust the new key,\n" - "enter \"y\" to update PuTTY's cache and continue connecting.\n" - "If you want to carry on connecting but without updating\n" - "the cache, enter \"n\".\n" - "If you want to abandon the connection completely, press\n" - "Return to cancel. Pressing Return is the ONLY guaranteed\n" - "safe choice.\n" - "Update cached key? (y/n, Return cancels connection) "; + "如果确信该密钥被更新同意接受新的密钥,\n" + "请输入 \"y\" 更新 PuTTY 缓存并继续连接。\n" + "如果仅仅只希望继续本次连接,而不更新\n" + "系统缓存,请输入 \"n\"。\n" + "如果希望完全放弃本次连接,请按回车键\n" + "取消操作。按下回车键是**唯一**可以保证" + "的安全选择。\n" + "更新缓存密钥?(y/n, 回车键取消连接) "; - static const char abandoned[] = "Connection abandoned.\n"; + static const char abandoned[] = "放弃连接。\n"; char line[32]; @@ -165,14 +165,14 @@ int askalg(void *frontend, const char *algtype, const char *algname, DWORD savemode, i; static const char msg[] = - "The first %s supported by the server is\n" - "%s, which is below the configured warning threshold.\n" - "Continue with connection? (y/n) "; + "服务器支持的第一个 %s 是\n" + "%s,其低于配置的警告阀值。\n" + "继续连接?(y/n) "; static const char msg_batch[] = - "The first %s supported by the server is\n" - "%s, which is below the configured warning threshold.\n" - "Connection abandoned.\n"; - static const char abandoned[] = "Connection abandoned.\n"; + "服务器支持的第一个 %s 是\n" + "%s,其低于配置的警告阀值。\n" + "放弃连接。\n"; + static const char abandoned[] = "放弃连接。\n"; char line[32]; @@ -206,20 +206,20 @@ int askhk(void *frontend, const char *algname, const char *betteralgs, DWORD savemode, i; static const char msg[] = - "The first host key type we have stored for this server\n" - "is %s, which is below the configured warning threshold.\n" - "The server also provides the following types of host key\n" - "above the threshold, which we do not have stored:\n" + "我们储存的此服务器第一个主机密钥类型\n" + "为 %s,其低于配置的警告阀值。\n" + "此服务器同时也提供有我们没有储存的高\n" + "于阀值的下列主机密钥类型:\n" "%s\n" - "Continue with connection? (y/n) "; + "继续连接?(y/n) "; static const char msg_batch[] = - "The first host key type we have stored for this server\n" - "is %s, which is below the configured warning threshold.\n" - "The server also provides the following types of host key\n" - "above the threshold, which we do not have stored:\n" + "我们储存的此服务器第一个主机密钥类型\n" + "为 %s,其低于配置的警告阀值。\n" + "此服务器同时也提供有我们没有储存的高\n" + "于阀值的下列主机密钥类型:\n" "%s\n" - "Connection abandoned.\n"; - static const char abandoned[] = "Connection abandoned.\n"; + "放弃连接。\n"; + static const char abandoned[] = "放弃连接。\n"; char line[32]; @@ -257,17 +257,17 @@ int askappend(void *frontend, Filename *filename, DWORD savemode, i; static const char msgtemplate[] = - "The session log file \"%.*s\" already exists.\n" - "You can overwrite it with a new session log,\n" - "append your session log to the end of it,\n" - "or disable session logging for this session.\n" - "Enter \"y\" to wipe the file, \"n\" to append to it,\n" - "or just press Return to disable logging.\n" - "Wipe the log file? (y/n, Return cancels logging) "; + "会话日志文件 \"%.*s\" 已经存在。\n" + "你可以使用新会话日志覆盖旧文件,\n" + "或者在旧日志文件结尾增加新日志,\n" + "或在此会话中禁止日志记录。\n" + "输入 \"y\" 覆盖为新文件,\"n\" 附加到旧文件,\n" + "或者直接回车禁止日志记录。\n" + "要覆盖为新文件么?(y/n,回车取消日志记录) "; static const char msgtemplate_batch[] = - "The session log file \"%.*s\" already exists.\n" - "Logging will not be enabled.\n"; + "会话日志文件 \"%.*s\" 已经存在。\n" + "日志功能未被启用。\n"; char line[32]; @@ -307,15 +307,15 @@ int askappend(void *frontend, Filename *filename, void old_keyfile_warning(void) { static const char message[] = - "You are loading an SSH-2 private key which has an\n" - "old version of the file format. This means your key\n" - "file is not fully tamperproof. Future versions of\n" - "PuTTY may stop supporting this private key format,\n" - "so we recommend you convert your key to the new\n" - "format.\n" + "现在载入的是一个旧版本文件格式的 SSH2\n" + " 私钥格式。这意味着该私钥文件不是\n" + "足够的安全。未来版本的 PuTTY 可能会\n" + "停止对该私钥格式的支持。\n" + "建议将其转换为新的\n" + "格式。\n" "\n" - "Once the key is loaded into PuTTYgen, you can perform\n" - "this conversion simply by saving it again.\n"; + "一旦密钥被载入到 PuTTYgen,你可以简单的\n" + "使用保存文件来进行转换。\n"; fputs(message, stderr); } @@ -381,7 +381,7 @@ int console_get_userpass_input(prompts_t *p, return 0; hin = GetStdHandle(STD_INPUT_HANDLE); if (hin == INVALID_HANDLE_VALUE) { - fprintf(stderr, "Cannot get standard input handle\n"); + fprintf(stderr, "无法获取标准输入句柄\n"); cleanup_exit(1); } } @@ -392,7 +392,7 @@ int console_get_userpass_input(prompts_t *p, if ((p->name_reqd && p->name) || p->instruction || p->n_prompts) { hout = GetStdHandle(STD_OUTPUT_HANDLE); if (hout == INVALID_HANDLE_VALUE) { - fprintf(stderr, "Cannot get standard output handle\n"); + fprintf(stderr, "无法获取标准输出句柄\n"); cleanup_exit(1); } } diff --git a/windows/winctrls.c b/windows/winctrls.c index 737018e45..d060116a2 100644 --- a/windows/winctrls.c +++ b/windows/winctrls.c @@ -29,8 +29,8 @@ #define DLGWIDTH 168 #define STATICHEIGHT 8 #define TITLEHEIGHT 12 -#define CHECKBOXHEIGHT 8 -#define RADIOHEIGHT 8 +#define CHECKBOXHEIGHT 9 +#define RADIOHEIGHT 9 #define EDITHEIGHT 12 #define LISTHEIGHT 11 #define LISTINCREMENT 8 @@ -949,7 +949,7 @@ void prefslist(struct prefslist *hdl, struct ctlpos *cp, int lines, doctl(cp, r, "BUTTON", BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, - 0, "&Up", upbid); + 0, "上(&U)", upbid); r.left = left; r.right = wid; r.top = cp->ypos + buttonpos + PUSHBTNHEIGHT + GAPBETWEEN; @@ -957,7 +957,7 @@ void prefslist(struct prefslist *hdl, struct ctlpos *cp, int lines, doctl(cp, r, "BUTTON", BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, - 0, "&Down", dnbid); + 0, "下(&D)", dnbid); break; @@ -1643,7 +1643,7 @@ void winctrl_layout(struct dlgparam *dp, struct winctrls *wc, ctrl->fileselect.shortcut); shortcuts[nshortcuts++] = ctrl->fileselect.shortcut; editbutton(&pos, escaped, base_id, base_id+1, - "Bro&wse...", base_id+2); + "浏览(&W)", base_id+2); shortcuts[nshortcuts++] = 'w'; sfree(escaped); break; @@ -1653,7 +1653,7 @@ void winctrl_layout(struct dlgparam *dp, struct winctrls *wc, ctrl->fontselect.shortcut); shortcuts[nshortcuts++] = ctrl->fontselect.shortcut; statictext(&pos, escaped, 1, base_id); - staticbtn(&pos, "", base_id+1, "Change...", base_id+2); + staticbtn(&pos, "", base_id+1, "修改...", base_id+2); data = fontspec_new("", 0, 0, 0); sfree(escaped); break; @@ -1924,7 +1924,7 @@ int winctrl_handle_command(struct dlgparam *dp, UINT msg, if (ctrl->fileselect.filter) of.lpstrFilter = ctrl->fileselect.filter; else - of.lpstrFilter = "All Files (*.*)\0*\0\0\0"; + of.lpstrFilter = "所有文件 (*.*)\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; @@ -2333,11 +2333,11 @@ void dlg_fontsel_set(union control *ctrl, void *dlg, FontSpec *fs) boldstr = (fs->isbold ? "bold, " : ""); if (fs->height == 0) - buf = dupprintf("Font: %s, %sdefault height", fs->name, boldstr); + buf = dupprintf("字体: %s, %s默认高度", fs->name, boldstr); else - buf = dupprintf("Font: %s, %s%d-%s", fs->name, boldstr, + buf = dupprintf("字体: %s, %s%d %s", fs->name, boldstr, (fs->height < 0 ? -fs->height : fs->height), - (fs->height < 0 ? "pixel" : "point")); + (fs->height < 0 ? "像素" : "点")); SetDlgItemText(dp->hwnd, c->base_id+1, buf); sfree(buf); diff --git a/windows/windefs.c b/windows/windefs.c index 24a2ea412..24513308a 100644 --- a/windows/windefs.c +++ b/windows/windefs.c @@ -9,7 +9,7 @@ FontSpec *platform_default_fontspec(const char *name) { if (!strcmp(name, "Font")) - return fontspec_new("Courier New", 0, 10, ANSI_CHARSET); + return fontspec_new("新宋体", 0, 12, GB2312_CHARSET); else return fontspec_new("", 0, 0, 0); } diff --git a/windows/windlg.c b/windows/windlg.c index e29f12914..40d31f5c7 100644 --- a/windows/windlg.c +++ b/windows/windlg.c @@ -47,7 +47,7 @@ static int nevents = 0, negsize = 0; extern Conf *conf; /* defined in window.c */ -#define PRINTER_DISABLED_STRING "None (printing disabled)" +#define PRINTER_DISABLED_STRING "无 (禁止打印)" void force_normal(HWND hwnd) { @@ -75,7 +75,7 @@ static INT_PTR CALLBACK LogProc(HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: { - char *str = dupprintf("%s Event Log", appname); + char *str = dupprintf("%s 事件日志记录", appname); SetWindowText(hwnd, str); sfree(str); } @@ -168,7 +168,7 @@ static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: { - char *str = dupprintf("%s Licence", appname); + char *str = dupprintf("%s 许可证", appname); SetWindowText(hwnd, str); sfree(str); SetDlgItemText(hwnd, IDA_TEXT, LICENCE_TEXT("\r\n\r\n")); @@ -196,7 +196,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, switch (msg) { case WM_INITDIALOG: - str = dupprintf("About %s", appname); + str = dupprintf("关于 %s", appname); SetWindowText(hwnd, str); sfree(str); { @@ -204,7 +204,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, char *text = dupprintf ("%s\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", appname, ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + "(C) " SHORT_COPYRIGHT_DETAILS ". 保留所有权利。"); sfree(buildinfo_text); SetDlgItemText(hwnd, IDA_TEXT, text); sfree(text); @@ -227,7 +227,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, case IDA_WEB: /* Load web browser */ ShellExecute(hwnd, "open", - "http://www.chiark.greenend.org.uk/~sgtatham/putty/", + "https://github.com/larryli/PuTTY", 0, 0, SW_SHOWDEFAULT); return 0; } @@ -353,7 +353,7 @@ static void create_controls(HWND hwnd, char *path) /* * Here we must create the basic standard controls. */ - ctlposinit(&cp, hwnd, 3, 3, 235); + ctlposinit(&cp, hwnd, 3, 3, 240); // fix height 235 wc = &ctrls_base; base_id = IDCX_STDBASE; } else { @@ -428,7 +428,7 @@ static INT_PTR CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg, r.top = 3; r.bottom = r.top + 10; MapDialogRect(hwnd, &r); - tvstatic = CreateWindowEx(0, "STATIC", "Cate&gory:", + tvstatic = CreateWindowEx(0, "STATIC", "分类(&G):", WS_CHILD | WS_VISIBLE, r.left, r.top, r.right - r.left, r.bottom - r.top, @@ -440,7 +440,7 @@ static INT_PTR CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg, r.left = 3; r.right = r.left + 95; r.top = 13; - r.bottom = r.top + 219; + r.bottom = r.top + 224; // fix height 219 MapDialogRect(hwnd, &r); treeview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "", WS_CHILD | WS_VISIBLE | @@ -689,8 +689,8 @@ int do_config(void) winctrl_init(&ctrls_panel); dp_add_tree(&dp, &ctrls_base); dp_add_tree(&dp, &ctrls_panel); - dp.wintitle = dupprintf("%s Configuration", appname); - dp.errtitle = dupprintf("%s Error", appname); + dp.wintitle = dupprintf("%s 配置", appname); + dp.errtitle = dupprintf("%s 错误", appname); dp.data = conf; dlg_auto_set_fixed_pitch_flag(&dp); dp.shortcuts['g'] = TRUE; /* the treeview: `Cate&gory' */ @@ -723,8 +723,8 @@ int do_reconfig(HWND hwnd, int protcfginfo) winctrl_init(&ctrls_panel); dp_add_tree(&dp, &ctrls_base); dp_add_tree(&dp, &ctrls_panel); - dp.wintitle = dupprintf("%s Reconfiguration", appname); - dp.errtitle = dupprintf("%s Error", appname); + dp.wintitle = dupprintf("%s 重新配置", appname); + dp.errtitle = dupprintf("%s 错误", appname); dp.data = conf; dlg_auto_set_fixed_pitch_flag(&dp); dp.shortcuts['g'] = TRUE; /* the treeview: `Cate&gory' */ @@ -795,36 +795,36 @@ int verify_ssh_host_key(void *frontend, char *host, int port, int ret; static const char absentmsg[] = - "The server's host key is not cached in the registry. You\n" - "have no guarantee that the server is the computer you\n" - "think it is.\n" - "The server's %s key fingerprint is:\n" + "在系统注册表缓存中没有找到该服务器密钥。\n" + "不能保证该服务器是能够正确访问的计算机。\n" + "" + "该服务器的 %s 密钥指纹为:\n" "%s\n" - "If you trust this host, hit Yes to add the key to\n" - "%s's cache and carry on connecting.\n" - "If you want to carry on connecting just once, without\n" - "adding the key to the cache, hit No.\n" - "If you do not trust this host, hit Cancel to abandon the\n" - "connection.\n"; + "如果信任该主机,请点击 \"是\" 增加密钥到" + " %s 缓存中并继续连接。\n" + "如果仅仅只希望进行本次连接,而不" + "将密钥储存,请点击 \"否\"。\n" + "如果不信任该主机,请点击 \"取消\" 放弃" + "连接。\n"; static const char wrongmsg[] = - "WARNING - POTENTIAL SECURITY BREACH!\n" + "**警告** - 潜在安全隐患!\n" "\n" - "The server's host key does not match the one %s has\n" - "cached in the registry. This means that either the\n" - "server administrator has changed the host key, or you\n" - "have actually connected to another computer pretending\n" - "to be the server.\n" - "The new %s key fingerprint is:\n" + "在 %s 注册表缓存中不能匹配该服务器密钥。\n" + "这说明可能该服务器管理员更新了主机密钥,\n" + "或者更可能是连接到了一台伪装成该服务器的\n" + "虚假计算机系统。\n" + "" + "新的 %s 密钥指纹为:\n" "%s\n" - "If you were expecting this change and trust the new key,\n" - "hit Yes to update %s's cache and continue connecting.\n" - "If you want to carry on connecting but without updating\n" - "the cache, hit No.\n" - "If you want to abandon the connection completely, hit\n" - "Cancel. Hitting Cancel is the ONLY guaranteed safe\n" "choice.\n"; + "如果确信该密钥被更新同意接受新的密钥,\n" + "请点击 \"是\" 更新 %s 缓存并继续连接。\n" + "如果仅仅只希望继续本次连接,而不更新\n" + "系统缓存,请点击 \"否\"。\n" + "如果希望完全放弃本次连接,请点击\n" + " \"取消\"。点击 \"取消\" 是**唯一**可以保证的安全" "操作。\n"; - static const char mbtitle[] = "%s Security Alert"; + static const char mbtitle[] = "%s 安全警告"; /* * Verify the key against the registry. @@ -875,12 +875,11 @@ int verify_ssh_host_key(void *frontend, char *host, int port, int askalg(void *frontend, const char *algtype, const char *algname, void (*callback)(void *ctx, int result), void *ctx) { - static const char mbtitle[] = "%s Security Alert"; + static const char mbtitle[] = "%s 安全警告"; static const char msg[] = - "The first %s supported by the server\n" - "is %.64s, which is below the configured\n" - "warning threshold.\n" - "Do you want to continue with this connection?\n"; + "服务器支持的第一个 %s\n" + "是 %.64s,其低于配置的警告阀值。\n" + "你要继续连接么?\n"; char *message, *title; int mbret; @@ -900,14 +899,14 @@ int askalg(void *frontend, const char *algtype, const char *algname, int askhk(void *frontend, const char *algname, const char *betteralgs, void (*callback)(void *ctx, int result), void *ctx) { - static const char mbtitle[] = "%s Security Alert"; + static const char mbtitle[] = "%s 安全警告"; static const char msg[] = - "The first host key type we have stored for this server\n" - "is %s, which is below the configured warning threshold.\n" - "The server also provides the following types of host key\n" - "above the threshold, which we do not have stored:\n" + "我们储存的此服务器第一个主机密钥类型\n" + "为 %s,其低于配置的警告阀值。\n" + "此服务器同时也提供有我们没有储存的高\n" + "于阀值的下列主机密钥类型:\n" "%s\n" - "Do you want to continue with this connection?\n"; + "你要继续连接么?\n"; char *message, *title; int mbret; @@ -932,18 +931,18 @@ int askappend(void *frontend, Filename *filename, void (*callback)(void *ctx, int result), void *ctx) { static const char msgtemplate[] = - "The session log file \"%.*s\" already exists.\n" - "You can overwrite it with a new session log,\n" - "append your session log to the end of it,\n" - "or disable session logging for this session.\n" - "Hit Yes to wipe the file, No to append to it,\n" - "or Cancel to disable logging."; + "会话日志文件 \"%.*s\" 已经存在。\n" + "你可以使用新会话日志覆盖旧文件,\n" + "或者在旧日志文件结尾增加新日志,\n" + "或在此会话中禁止日志记录。\n" + "点击是覆盖为新文件,否附加到旧文件,\n" + "或者点击取消禁止日志记录。"; char *message; char *mbtitle; int mbret; message = dupprintf(msgtemplate, FILENAME_MAX, filename->path); - mbtitle = dupprintf("%s Log to File", appname); + mbtitle = dupprintf("%s 日志记录到文件", appname); mbret = MessageBox(NULL, message, mbtitle, MB_ICONQUESTION | MB_YESNOCANCEL | MB_DEFBUTTON3); @@ -973,17 +972,17 @@ int askappend(void *frontend, Filename *filename, */ void old_keyfile_warning(void) { - static const char mbtitle[] = "%s Key File Warning"; + static const char mbtitle[] = "%s 密钥文件警告"; static const char message[] = - "You are loading an SSH-2 private key which has an\n" - "old version of the file format. This means your key\n" - "file is not fully tamperproof. Future versions of\n" - "%s may stop supporting this private key format,\n" - "so we recommend you convert your key to the new\n" - "format.\n" + "现在载入的是一个旧版本文件格式的 SSH2\n" + " 私钥格式。这意味着该私钥文件不是\n" + "足够的安全。未来版本的 %s 可能会\n" + "停止支持此私钥格式,\n" + "建议将其转换为新的\n" + "格式。\n" "\n" - "You can perform this conversion by loading the key\n" - "into PuTTYgen and then saving it again."; + "请使用 PuTTYgen 载入该密钥进行转换\n" + "然后保存。"; char *msg, *title; msg = dupprintf(message, appname); diff --git a/windows/window.c b/windows/window.c index e01a3c32d..0aa57fb56 100644 --- a/windows/window.c +++ b/windows/window.c @@ -256,8 +256,8 @@ static void start_backend(void) */ back = backend_from_proto(conf_get_int(conf, CONF_protocol)); if (back == NULL) { - char *str = dupprintf("%s Internal Error", appname); - MessageBox(NULL, "Unsupported protocol number found", + char *str = dupprintf("%s 内部错误", appname); + MessageBox(NULL, "发现不支持的协议号", str, MB_OK | MB_ICONEXCLAMATION); sfree(str); cleanup_exit(1); @@ -271,9 +271,9 @@ static void start_backend(void) conf_get_int(conf, CONF_tcp_keepalives)); back->provide_logctx(backhandle, logctx); if (error) { - char *str = dupprintf("%s Error", appname); - sprintf(msg, "Unable to open connection to\n" - "%.800s\n" "%s", conf_dest(conf), error); + char *str = dupprintf("%s 错误", appname); + sprintf(msg, "无法打开到\n" + "%.800s 的连接\n" "%s", conf_dest(conf), error); MessageBox(NULL, msg, str, MB_ICONERROR | MB_OK); sfree(str); exit(0); @@ -318,7 +318,7 @@ static void close_session(void *ignored_context) int i; session_closed = TRUE; - sprintf(morestuff, "%.70s (inactive)", appname); + sprintf(morestuff, "%.70s (不活动的)", appname); set_icon(NULL, morestuff); set_title(NULL, morestuff); @@ -341,7 +341,7 @@ static void close_session(void *ignored_context) for (i = 0; i < lenof(popup_menus); i++) { DeleteMenu(popup_menus[i].menu, IDM_RESTART, MF_BYCOMMAND); InsertMenu(popup_menus[i].menu, IDM_DUPSESS, MF_BYCOMMAND | MF_ENABLED, - IDM_RESTART, "&Restart Session"); + IDM_RESTART, "重启会话(&R)"); } } @@ -372,8 +372,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) if (!init_winver()) { - char *str = dupprintf("%s Fatal Error", appname); - MessageBox(NULL, "Windows refuses to report a version", + char *str = dupprintf("%s 致命错误", appname); + MessageBox(NULL, "Windows 拒绝报告版本", str, MB_OK | MB_ICONEXCLAMATION); sfree(str); return 1; @@ -400,8 +400,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) */ hr = CoInitialize(NULL); if (hr != S_OK && hr != S_FALSE) { - char *str = dupprintf("%s Fatal Error", appname); - MessageBox(NULL, "Failed to initialize COM subsystem", + char *str = dupprintf("%s 致命错误", appname); + MessageBox(NULL, "初始化 COM 子系统失败", str, MB_OK | MB_ICONEXCLAMATION); sfree(str); return 1; @@ -520,15 +520,15 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * and delete the random seed file. */ char *s1, *s2; - s1 = dupprintf("This procedure will remove ALL Registry entries\n" - "associated with %s, and will also remove\n" - "the random seed file. (This only affects the\n" - "currently logged-in user.)\n" + s1 = dupprintf("此过程将删除所有与 %s 相关联\n" + "注册表项目,并且还将删除随机\n" + "种子文件。(这只会影响到当前\n" + "登录的用户。)\n" "\n" - "THIS PROCESS WILL DESTROY YOUR SAVED SESSIONS.\n" - "Are you really sure you want to continue?", + "此操作将会摧毁你保存的会话。\n" + "真的确定要继续么?", appname); - s2 = dupprintf("%s Warning", appname); + s2 = dupprintf("%s 警告", appname); if (message_box(s1, s2, MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2, HELPCTXID(option_cleanup)) == IDYES) { @@ -588,7 +588,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) got_host = 1; } } else { - cmdline_error("unknown option \"%s\"", p); + cmdline_error("未知选项 \"%s\"", p); } } } @@ -810,7 +810,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) popup_menus[SYSMENU].menu = GetSystemMenu(hwnd, FALSE); popup_menus[CTXMENU].menu = CreatePopupMenu(); - AppendMenu(popup_menus[CTXMENU].menu, MF_ENABLED, IDM_PASTE, "&Paste"); + AppendMenu(popup_menus[CTXMENU].menu, MF_ENABLED, IDM_PASTE, "粘贴(&P)"); savedsess_menu = CreateMenu(); get_sesslist(&sesslist, TRUE); @@ -820,25 +820,25 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) m = popup_menus[j].menu; AppendMenu(m, MF_SEPARATOR, 0, 0); - AppendMenu(m, MF_ENABLED, IDM_SHOWLOG, "&Event Log"); + AppendMenu(m, MF_ENABLED, IDM_SHOWLOG, "事件日志记录(&E)"); AppendMenu(m, MF_SEPARATOR, 0, 0); - AppendMenu(m, MF_ENABLED, IDM_NEWSESS, "Ne&w Session..."); - AppendMenu(m, MF_ENABLED, IDM_DUPSESS, "&Duplicate Session"); + AppendMenu(m, MF_ENABLED, IDM_NEWSESS, "新会话(&W)..."); + AppendMenu(m, MF_ENABLED, IDM_DUPSESS, "复制会话(&D)"); AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT_PTR) savedsess_menu, - "Sa&ved Sessions"); - AppendMenu(m, MF_ENABLED, IDM_RECONF, "Chan&ge Settings..."); + "保存会话(&V)"); + AppendMenu(m, MF_ENABLED, IDM_RECONF, "修改设置(&G)..."); AppendMenu(m, MF_SEPARATOR, 0, 0); - AppendMenu(m, MF_ENABLED, IDM_COPYALL, "C&opy All to Clipboard"); - AppendMenu(m, MF_ENABLED, IDM_CLRSB, "C&lear Scrollback"); - AppendMenu(m, MF_ENABLED, IDM_RESET, "Rese&t Terminal"); + AppendMenu(m, MF_ENABLED, IDM_COPYALL, "复制所有内容到剪贴板(&O)"); + AppendMenu(m, MF_ENABLED, IDM_CLRSB, "清除滚动条(&L)"); + AppendMenu(m, MF_ENABLED, IDM_RESET, "重启终端(&T)"); AppendMenu(m, MF_SEPARATOR, 0, 0); AppendMenu(m, (conf_get_int(conf, CONF_resize_action) == RESIZE_DISABLED) ? MF_GRAYED : MF_ENABLED, - IDM_FULLSCREEN, "&Full Screen"); + IDM_FULLSCREEN, "全屏(&F)"); AppendMenu(m, MF_SEPARATOR, 0, 0); if (has_help()) - AppendMenu(m, MF_ENABLED, IDM_HELP, "&Help"); - str = dupprintf("&About %s", appname); + AppendMenu(m, MF_ENABLED, IDM_HELP, "帮助(&H)"); + str = dupprintf("关于 %s(&A)", appname); AppendMenu(m, MF_ENABLED, IDM_ABOUT, str); sfree(str); } @@ -1021,7 +1021,7 @@ static void update_savedsess_menu(void) IDM_SAVED_MIN + (i-1)*MENU_SAVED_STEP, sesslist.sessions[i]); if (sesslist.nsessions <= 1) - AppendMenu(savedsess_menu, MF_GRAYED, IDM_SAVED_MIN, "(No sessions)"); + AppendMenu(savedsess_menu, MF_GRAYED, IDM_SAVED_MIN, "(没有会话)"); } /* @@ -1087,7 +1087,7 @@ void update_specials_menu(void *frontend) if (new_menu) { InsertMenu(popup_menus[j].menu, IDM_SHOWLOG, MF_BYCOMMAND | MF_POPUP | MF_ENABLED, - (UINT_PTR) new_menu, "S&pecial Command"); + (UINT_PTR) new_menu, "指定命令(&P)"); InsertMenu(popup_menus[j].menu, IDM_SHOWLOG, MF_BYCOMMAND | MF_SEPARATOR, IDM_SPECIALSEP, 0); } @@ -2118,10 +2118,10 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, { char *str; show_mouseptr(1); - str = dupprintf("%s Exit Confirmation", appname); + str = dupprintf("%s 退出确认", appname); if (session_closed || !conf_get_int(conf, CONF_warn_on_close) || MessageBox(hwnd, - "Are you sure you want to close this session?", + "确定要关闭本会话么?", str, MB_ICONWARNING | MB_OKCANCEL | MB_DEFBUTTON1) == IDOK) DestroyWindow(hwnd); diff --git a/windows/winnet.c b/windows/winnet.c index fc26c3e55..e3b27f801 100644 --- a/windows/winnet.c +++ b/windows/winnet.c @@ -293,7 +293,7 @@ void sk_init(void) GET_WINDOWS_FUNCTION(winsock2_module, WSAAddressToStringA); #else #ifdef NET_SETUP_DIAGNOSTICS - logevent(NULL, "PuTTY was built without IPv6 support"); + logevent(NULL, "PuTTY 无 IPv6 支持编译版"); #endif #endif diff --git a/windows/winpgen.c b/windows/winpgen.c index 2507d37ea..bbaf9a228 100644 --- a/windows/winpgen.c +++ b/windows/winpgen.c @@ -38,7 +38,7 @@ void modalfatalbox(const char *fmt, ...) va_start(ap, fmt); stuff = dupvprintf(fmt, ap); va_end(ap); - MessageBox(NULL, stuff, "PuTTYgen Fatal Error", + MessageBox(NULL, stuff, "PuTTYgen 致命错误", MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); sfree(stuff); exit(1); @@ -55,7 +55,7 @@ void nonfatal(const char *fmt, ...) va_start(ap, fmt); stuff = dupvprintf(fmt, ap); va_end(ap); - MessageBox(NULL, stuff, "PuTTYgen Error", + MessageBox(NULL, stuff, "PuTTYgen 错误", MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); sfree(stuff); } @@ -216,11 +216,11 @@ static int prompt_keyfile(HWND hwnd, char *dlgtitle, memset(&of, 0, sizeof(of)); of.hwndOwner = hwnd; if (ppk) { - of.lpstrFilter = "PuTTY Private Key Files (*.ppk)\0*.ppk\0" - "All Files (*.*)\0*\0\0\0"; + of.lpstrFilter = "PuTTY 私钥文件 (*.ppk)\0*.ppk\0" + "所有文件 (*.*)\0*\0\0\0"; of.lpstrDefExt = ".ppk"; } else { - of.lpstrFilter = "All Files (*.*)\0*\0\0\0"; + of.lpstrFilter = "所有文件 (*.*)\0*\0\0\0"; } of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; @@ -301,7 +301,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, char *text = dupprintf ("PuTTYgen\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + "(C) " SHORT_COPYRIGHT_DETAILS ". 保留所有权利。"); sfree(buildinfo_text); SetDlgItemText(hwnd, 1000, text); sfree(text); @@ -322,7 +322,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, case 102: /* Load web browser */ ShellExecute(hwnd, "open", - "http://www.chiark.greenend.org.uk/~sgtatham/putty/", + "https://github.com/larryli/PuTTY", 0, 0, SW_SHOWDEFAULT); return 0; } @@ -406,7 +406,7 @@ static void setupbigedit1(HWND hwnd, int id, int idstatic, struct RSAKey *key) char *buffer = ssh1_pubkey_str(key); SetDlgItemText(hwnd, id, buffer); SetDlgItemText(hwnd, idstatic, - "&Public key for pasting into authorized_keys file:"); + "已认可密钥文件的公钥(&P):"); sfree(buffer); } @@ -415,8 +415,8 @@ static void setupbigedit2(HWND hwnd, int id, int idstatic, { char *buffer = ssh2_pubkey_openssh_str(key); SetDlgItemText(hwnd, id, buffer); - SetDlgItemText(hwnd, idstatic, "&Public key for pasting into " - "OpenSSH authorized_keys file:"); + SetDlgItemText(hwnd, idstatic, "显示的公钥由 " + "OpenSSH 认可(&P):"); sfree(buffer); } @@ -425,17 +425,17 @@ static void setupbigedit2(HWND hwnd, int id, int idstatic, */ void old_keyfile_warning(void) { - static const char mbtitle[] = "PuTTY Key File Warning"; + static const char mbtitle[] = "PuTTY 密钥文件警告"; static const char message[] = - "You are loading an SSH-2 private key which has an\n" - "old version of the file format. This means your key\n" - "file is not fully tamperproof. Future versions of\n" - "PuTTY may stop supporting this private key format,\n" - "so we recommend you convert your key to the new\n" - "format.\n" + "现在载入的是一个旧版本文件格式的 SSH2\n" + " 私钥格式。这意味着该私钥文件不是\n" + "足够的安全。未来版本的 PuTTY 可能会\n" + "停止对该私钥格式的支持。\n" + "建议将其转换为新的\n" + "格式。\n" "\n" - "Once the key is loaded into PuTTYgen, you can perform\n" - "this conversion simply by saving it again."; + "一旦密钥被载入到 PuTTYgen,你可以简单的\n" + "使用保存文件来进行转换。"; MessageBox(NULL, message, mbtitle, MB_OK); } @@ -654,9 +654,9 @@ void load_key_file(HWND hwnd, struct MainDlgState *state, if (type != SSH_KEYTYPE_SSH1 && type != SSH_KEYTYPE_SSH2 && !import_possible(type)) { - char *msg = dupprintf("Couldn't load private key (%s)", + char *msg = dupprintf("无法载入私钥 (%s)", key_type_to_str(type)); - message_box(msg, "PuTTYgen Error", MB_OK | MB_ICONERROR, + message_box(msg, "PuTTYgen 错误", MB_OK | MB_ICONERROR, HELPCTXID(errors_cantloadkey)); sfree(msg); return; @@ -718,8 +718,8 @@ void load_key_file(HWND hwnd, struct MainDlgState *state, if (comment) sfree(comment); if (ret == 0) { - char *msg = dupprintf("Couldn't load private key (%s)", errmsg); - message_box(msg, "PuTTYgen Error", MB_OK | MB_ICONERROR, + char *msg = dupprintf("无法载入私钥 (%s)", errmsg); + message_box(msg, "PuTTYgen 错误", MB_OK | MB_ICONERROR, HELPCTXID(errors_cantloadkey)); sfree(msg); } else if (ret == 1) { @@ -796,13 +796,13 @@ void load_key_file(HWND hwnd, struct MainDlgState *state, */ if (realtype != type && !was_import_cmd) { char msg[512]; - sprintf(msg, "Successfully imported foreign key\n" + sprintf(msg, "成功导入其他格式密钥\n" "(%s).\n" - "To use this key with PuTTY, you need to\n" - "use the \"Save private key\" command to\n" - "save it in PuTTY's own format.", + "请选择“保存私钥”命令将密钥保存为 PuTTY\n" + "自有格式,以便于 PuTTY 使用该密钥。\n" + "", key_type_to_str(realtype)); - MessageBox(NULL, msg, "PuTTYgen Notice", + MessageBox(NULL, msg, "PuTTYgen 提示", MB_OK | MB_ICONINFORMATION); } } @@ -816,9 +816,9 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static const char generating_msg[] = - "Please wait while a key is generated..."; + "正在生成密钥,请稍等..."; static const char entropy_msg[] = - "Please generate some randomness by moving the mouse over the blank area."; + "请在空白区域移动鼠标,以便产生随机数据。"; struct MainDlgState *state; switch (msg) { @@ -848,43 +848,43 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, menu = CreateMenu(); menu1 = CreateMenu(); - AppendMenu(menu1, MF_ENABLED, IDC_LOAD, "&Load private key"); - AppendMenu(menu1, MF_ENABLED, IDC_SAVEPUB, "Save p&ublic key"); - AppendMenu(menu1, MF_ENABLED, IDC_SAVE, "&Save private key"); + AppendMenu(menu1, MF_ENABLED, IDC_LOAD, "载入私钥(&L)"); + AppendMenu(menu1, MF_ENABLED, IDC_SAVEPUB, "保存公钥(&U)"); + AppendMenu(menu1, MF_ENABLED, IDC_SAVE, "保存私钥(&S)"); AppendMenu(menu1, MF_SEPARATOR, 0, 0); - AppendMenu(menu1, MF_ENABLED, IDC_QUIT, "E&xit"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&File"); + AppendMenu(menu1, MF_ENABLED, IDC_QUIT, "退出(&X)"); + AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "文件(&F)"); state->filemenu = menu1; menu1 = CreateMenu(); - AppendMenu(menu1, MF_ENABLED, IDC_GENERATE, "&Generate key pair"); + AppendMenu(menu1, MF_ENABLED, IDC_GENERATE, "生成密钥对(&G)"); AppendMenu(menu1, MF_SEPARATOR, 0, 0); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH1, "SSH-&1 key (RSA)"); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2RSA, "SSH-2 &RSA key"); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2DSA, "SSH-2 &DSA key"); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ECDSA, "SSH-2 &ECDSA key"); - AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ED25519, "SSH-2 ED&25519 key"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&Key"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH1, "SSH&1 密钥 (RSA)"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2RSA, "SSH2 &RSA 密钥"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2DSA, "SSH2 &DSA 密钥"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ECDSA, "SSH-2 &ECDSA 密钥"); + AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ED25519, "SSH-2 ED&25519 密钥"); + AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "密钥(&K)"); state->keymenu = menu1; menu1 = CreateMenu(); - AppendMenu(menu1, MF_ENABLED, IDC_IMPORT, "&Import key"); + AppendMenu(menu1, MF_ENABLED, IDC_IMPORT, "导入密钥(&I)"); AppendMenu(menu1, MF_SEPARATOR, 0, 0); AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_OPENSSH_AUTO, - "Export &OpenSSH key"); + "导出 OpenSSH 密钥(&O)"); AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_OPENSSH_NEW, - "Export &OpenSSH key (force new file format)"); + "导出 OpenSSH 密钥(强制新文件格式)"); AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_SSHCOM, - "Export &ssh.com key"); + "导出 ssh.com 密钥(&S)"); AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, - "Con&versions"); + "转换(&V)"); state->cvtmenu = menu1; menu1 = CreateMenu(); - AppendMenu(menu1, MF_ENABLED, IDC_ABOUT, "&About"); + AppendMenu(menu1, MF_ENABLED, IDC_ABOUT, "关于(&A)"); if (has_help()) - AppendMenu(menu1, MF_ENABLED, IDC_GIVEHELP, "&Help"); - AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&Help"); + AppendMenu(menu1, MF_ENABLED, IDC_GIVEHELP, "帮助(&H)"); + AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "帮助(&H)"); SetMenu(hwnd, menu); } @@ -911,38 +911,38 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, /* Accelerators used: acglops1rbvde */ ctlposinit(&cp, hwnd, 4, 4, 4); - beginbox(&cp, "Key", IDC_BOX_KEY); + beginbox(&cp, "密钥", IDC_BOX_KEY); cp2 = cp; - statictext(&cp2, "No key.", 1, IDC_NOKEY); + statictext(&cp2, "没有密钥", 1, IDC_NOKEY); cp2 = cp; statictext(&cp2, "", 1, IDC_GENERATING); progressbar(&cp2, IDC_PROGRESS); bigeditctrl(&cp, - "&Public key for pasting into authorized_keys file:", + "已认可密钥文件的公钥(&P):", IDC_PKSTATIC, IDC_KEYDISPLAY, 5); SendDlgItemMessage(hwnd, IDC_KEYDISPLAY, EM_SETREADONLY, 1, 0); - staticedit(&cp, "Key f&ingerprint:", IDC_FPSTATIC, + staticedit(&cp, "密钥指纹(&I):", IDC_FPSTATIC, IDC_FINGERPRINT, 75); SendDlgItemMessage(hwnd, IDC_FINGERPRINT, EM_SETREADONLY, 1, 0); - staticedit(&cp, "Key &comment:", IDC_COMMENTSTATIC, + staticedit(&cp, "密钥注释(&C):", IDC_COMMENTSTATIC, IDC_COMMENTEDIT, 75); - staticpassedit(&cp, "Key p&assphrase:", IDC_PASSPHRASE1STATIC, + staticpassedit(&cp, "密钥密码(&A):", IDC_PASSPHRASE1STATIC, IDC_PASSPHRASE1EDIT, 75); - staticpassedit(&cp, "C&onfirm passphrase:", + staticpassedit(&cp, "确认密码(&O):", IDC_PASSPHRASE2STATIC, IDC_PASSPHRASE2EDIT, 75); endbox(&cp); - beginbox(&cp, "Actions", IDC_BOX_ACTIONS); - staticbtn(&cp, "Generate a public/private key pair", - IDC_GENSTATIC, "&Generate", IDC_GENERATE); - staticbtn(&cp, "Load an existing private key file", - IDC_LOADSTATIC, "&Load", IDC_LOAD); - static2btn(&cp, "Save the generated key", IDC_SAVESTATIC, - "Save p&ublic key", IDC_SAVEPUB, - "&Save private key", IDC_SAVE); + beginbox(&cp, "动作", IDC_BOX_ACTIONS); + staticbtn(&cp, "生成公钥/私钥对", + IDC_GENSTATIC, "生成(&G)", IDC_GENERATE); + staticbtn(&cp, "载入已保存的私钥文件", + IDC_LOADSTATIC, "载入(&L)", IDC_LOAD); + static2btn(&cp, "保存生成的密钥", IDC_SAVESTATIC, + "保存公钥(&U)", IDC_SAVEPUB, + "保存私钥(&S)", IDC_SAVE); endbox(&cp); - beginbox(&cp, "Parameters", IDC_BOX_PARAMS); - radioline(&cp, "Type of key to generate:", IDC_TYPESTATIC, 5, + beginbox(&cp, "参数", IDC_BOX_PARAMS); + radioline(&cp, "生成的密钥类型:", IDC_TYPESTATIC, 5, "&RSA", IDC_KEYSSH2RSA, "&DSA", IDC_KEYSSH2DSA, "&ECDSA", IDC_KEYSSH2ECDSA, @@ -950,11 +950,11 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, "SSH-&1 (RSA)", IDC_KEYSSH1, NULL); cp2 = cp; - staticedit(&cp2, "Number of &bits in a generated key:", + staticedit(&cp2, "生成密钥位数(&B):", IDC_BITSSTATIC, IDC_BITS, 20); ymax = cp2.ypos; cp2 = cp; - staticddl(&cp2, "Cur&ve to use for generating this key:", + staticddl(&cp2, "用于生成此密钥的曲线(&V):", IDC_CURVESTATIC, IDC_CURVE, 20); SendDlgItemMessage(hwnd, IDC_CURVE, CB_RESETCONTENT, 0, 0); { @@ -971,7 +971,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, } ymax = ymax > cp2.ypos ? ymax : cp2.ypos; cp2 = cp; - statictext(&cp2, "(nothing to configure for this key type)", + statictext(&cp2, "(此密钥类型无需配置)", 1, IDC_NOTHINGSTATIC); ymax = ymax > cp2.ypos ? ymax : cp2.ypos; cp.ypos = ymax; @@ -1036,8 +1036,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, if (!CreateThread(NULL, 0, generate_key_thread, params, 0, &threadid)) { - MessageBox(hwnd, "Out of thread resources", - "Key generation error", + MessageBox(hwnd, "创建线程发生错误", + "密钥生成错误", MB_OK | MB_ICONERROR); sfree(params); } else { @@ -1127,10 +1127,10 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, if ((state->keytype == RSA || state->keytype == DSA) && state->key_bits < 256) { char *message = dupprintf - ("PuTTYgen will not generate a key smaller than 256" - " bits.\nKey length reset to default %d. Continue?", + ("PuTTYgen 不能生成低于 256 位的密钥。" + "\n密钥位数将调整为默认的 %d,是否继续?", DEFAULT_KEY_BITS); - int ret = MessageBox(hwnd, message, "PuTTYgen Warning", + int ret = MessageBox(hwnd, message, "PuTTYgen 警告", MB_ICONWARNING | MB_OKCANCEL); sfree(message); if (ret != IDOK) @@ -1140,9 +1140,9 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, } else if ((state->keytype == RSA || state->keytype == DSA) && state->key_bits < DEFAULT_KEY_BITS) { char *message = dupprintf - ("Keys shorter than %d bits are not recommended. " - "Really generate this key?", DEFAULT_KEY_BITS); - int ret = MessageBox(hwnd, message, "PuTTYgen Warning", + ("不建议使用少于 %d 位密钥。" + "真的要生成此密钥?", DEFAULT_KEY_BITS); + int ret = MessageBox(hwnd, message, "PuTTYgen 警告", MB_ICONWARNING | MB_OKCANCEL); sfree(message); if (ret != IDOK) @@ -1214,11 +1214,11 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, if (type != realtype && import_target_type(type) != realtype) { char msg[256]; - sprintf(msg, "Cannot export an SSH-%d key in an SSH-%d" - " format", (state->ssh2 ? 2 : 1), + sprintf(msg, "无法输出 SSH%d 密钥(SSH%d 格式)" + "", (state->ssh2 ? 2 : 1), (state->ssh2 ? 1 : 2)); MessageBox(hwnd, msg, - "PuTTYgen Error", MB_OK | MB_ICONERROR); + "PuTTYgen 错误", MB_OK | MB_ICONERROR); break; } @@ -1226,8 +1226,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, passphrase2 = GetDlgItemText_alloc(hwnd, IDC_PASSPHRASE2EDIT); if (strcmp(passphrase, passphrase2)) { MessageBox(hwnd, - "The two passphrases given do not match.", - "PuTTYgen Error", MB_OK | MB_ICONERROR); + "两次输入的密码不一样。", + "PuTTYgen 错误", MB_OK | MB_ICONERROR); burnstr(passphrase); burnstr(passphrase2); break; @@ -1236,25 +1236,25 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, if (!*passphrase) { int ret; ret = MessageBox(hwnd, - "Are you sure you want to save this key\n" - "without a passphrase to protect it?", - "PuTTYgen Warning", + "确定不给该密钥设置密码保护么?\n" + "", + "PuTTYgen 警告", MB_YESNO | MB_ICONWARNING); if (ret != IDYES) { burnstr(passphrase); break; } } - if (prompt_keyfile(hwnd, "Save private key as:", + if (prompt_keyfile(hwnd, "保存私钥为:", filename, 1, (type == realtype))) { int ret; FILE *fp = fopen(filename, "r"); if (fp) { char *buffer; fclose(fp); - buffer = dupprintf("Overwrite existing file\n%s?", + buffer = dupprintf("覆盖已存在的文件\n%s?", filename); - ret = MessageBox(hwnd, buffer, "PuTTYgen Warning", + ret = MessageBox(hwnd, buffer, "PuTTYgen 警告", MB_YESNO | MB_ICONWARNING); sfree(buffer); if (ret != IDYES) { @@ -1284,8 +1284,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, filename_free(fn); } if (ret <= 0) { - MessageBox(hwnd, "Unable to save key file", - "PuTTYgen Error", MB_OK | MB_ICONERROR); + MessageBox(hwnd, "无法保存密钥文件", + "PuTTYgen 错误", MB_OK | MB_ICONERROR); } } burnstr(passphrase); @@ -1298,16 +1298,16 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, (struct MainDlgState *) GetWindowLongPtr(hwnd, GWLP_USERDATA); if (state->key_exists) { char filename[FILENAME_MAX]; - if (prompt_keyfile(hwnd, "Save public key as:", + if (prompt_keyfile(hwnd, "保存公钥为:", filename, 1, 0)) { int ret; FILE *fp = fopen(filename, "r"); if (fp) { char *buffer; fclose(fp); - buffer = dupprintf("Overwrite existing file\n%s?", + buffer = dupprintf("覆盖已存在的文件\n%s?", filename); - ret = MessageBox(hwnd, buffer, "PuTTYgen Warning", + ret = MessageBox(hwnd, buffer, "PuTTYgen 警告", MB_YESNO | MB_ICONWARNING); sfree(buffer); if (ret != IDYES) @@ -1315,8 +1315,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, } fp = fopen(filename, "w"); if (!fp) { - MessageBox(hwnd, "Unable to open key file", - "PuTTYgen Error", MB_OK | MB_ICONERROR); + MessageBox(hwnd, "无法打开密钥文件", + "PuTTYgen 错误", MB_OK | MB_ICONERROR); } else { if (state->ssh2) { int bloblen; @@ -1330,8 +1330,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, ssh1_write_pubkey(fp, &state->key); } if (fclose(fp) < 0) { - MessageBox(hwnd, "Unable to save key file", - "PuTTYgen Error", MB_OK | MB_ICONERROR); + MessageBox(hwnd, "无法保存密钥文件", + "PuTTYgen 错误", MB_OK | MB_ICONERROR); } } } @@ -1345,7 +1345,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, (struct MainDlgState *) GetWindowLongPtr(hwnd, GWLP_USERDATA); if (!state->generation_thread_exists) { char filename[FILENAME_MAX]; - if (prompt_keyfile(hwnd, "Load private key:", + if (prompt_keyfile(hwnd, "载入私钥:", filename, 0, LOWORD(wParam)==IDC_LOAD)) { Filename *fn = filename_from_str(filename); load_key_file(hwnd, state, fn, LOWORD(wParam) != IDC_LOAD); diff --git a/windows/winpgnt.c b/windows/winpgnt.c index 70f3d2ca5..02f7e4c0f 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -79,7 +79,7 @@ void modalfatalbox(const char *fmt, ...) va_start(ap, fmt); buf = dupvprintf(fmt, ap); va_end(ap); - MessageBox(hwnd, buf, "Pageant Fatal Error", + MessageBox(hwnd, buf, "Pageant 致命错误", MB_SYSTEMMODAL | MB_ICONERROR | MB_OK); sfree(buf); exit(1); @@ -156,7 +156,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, char *text = dupprintf ("Pageant\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", ver, buildinfo_text, - "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + "(C) " SHORT_COPYRIGHT_DETAILS ". 保留所有权利。"); sfree(buildinfo_text); SetDlgItemText(hwnd, 1000, text); sfree(text); @@ -178,7 +178,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, case 102: /* Load web browser */ ShellExecute(hwnd, "open", - "http://www.chiark.greenend.org.uk/~sgtatham/putty/", + "https://github.com/larryli/PuTTY", 0, 0, SW_SHOWDEFAULT); return 0; } @@ -262,17 +262,17 @@ static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg, */ void old_keyfile_warning(void) { - static const char mbtitle[] = "PuTTY Key File Warning"; + static const char mbtitle[] = "PuTTY 密钥文件警告"; static const char message[] = - "You are loading an SSH-2 private key which has an\n" - "old version of the file format. This means your key\n" - "file is not fully tamperproof. Future versions of\n" - "PuTTY may stop supporting this private key format,\n" - "so we recommend you convert your key to the new\n" - "format.\n" + "现在载入的是一个旧版本文件格式的 SSH2\n" + " 私钥格式。这意味着该私钥文件不是\n" + "足够的安全。未来版本的 PuTTY 可能会\n" + "停止对该私钥格式的支持。\n" + "建议将其转换为新的\n" + "格式。\n" "\n" - "You can perform this conversion by loading the key\n" - "into PuTTYgen and then saving it again."; + "请使用 PuTTYgen 载入该密钥进行转换\n" + "然后保存。"; MessageBox(NULL, message, mbtitle, MB_OK); } @@ -484,7 +484,7 @@ static void prompt_add_keyfile(void) *filelist = '\0'; of.nMaxFile = 8192; of.lpstrFileTitle = NULL; - of.lpstrTitle = "Select Private Key File"; + of.lpstrTitle = "选择私钥文件"; of.Flags = OFN_ALLOWMULTISELECT | OFN_EXPLORER; if (request_file(keypath, &of, TRUE, FALSE)) { if(strlen(filelist) > of.nFileOffset) { @@ -690,7 +690,7 @@ static BOOL AddTrayIcon(HWND hwnd) tnid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; tnid.uCallbackMessage = WM_SYSTRAY; tnid.hIcon = hicon = LoadIcon(hinst, MAKEINTRESOURCE(201)); - strcpy(tnid.szTip, "Pageant (PuTTY authentication agent)"); + strcpy(tnid.szTip, "Pageant (PuTTY 认证代理)"); res = Shell_NotifyIcon(NIM_ADD, &tnid); @@ -747,7 +747,7 @@ static void update_sessions(void) mii.fMask = MIIM_TYPE | MIIM_STATE; mii.fType = MFT_STRING; mii.fState = MFS_GRAYED; - mii.dwTypeData = _T("(No sessions)"); + mii.dwTypeData = _T("(没有会话)"); InsertMenuItem(session_menu, index_menu, TRUE, &mii); } } @@ -849,8 +849,8 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, case IDM_PUTTY: if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""), SW_SHOW) <= 32) { - MessageBox(NULL, "Unable to execute PuTTY!", - "Error", MB_OK | MB_ICONERROR); + MessageBox(NULL, "无法执行 PuTTY!", + "错误", MB_OK | MB_ICONERROR); } break; case IDM_CLOSE: @@ -916,7 +916,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, strcat(param, mii.dwTypeData); if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, param, _T(""), SW_SHOW) <= 32) { - MessageBox(NULL, "Unable to execute PuTTY!", "Error", + MessageBox(NULL, "无法执行 PuTTY!", "错误", MB_OK | MB_ICONERROR); } } @@ -1091,7 +1091,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) */ if (!init_winver()) { - modalfatalbox("Windows refuses to report a version"); + modalfatalbox("Windows 拒绝报告版本"); } if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) { has_security = TRUE; @@ -1105,16 +1105,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) */ if (!got_advapi()) { MessageBox(NULL, - "Unable to access security APIs. Pageant will\n" - "not run, in case it causes a security breach.", - "Pageant Fatal Error", MB_ICONERROR | MB_OK); + "无法访问安全认证 API 函数。\nPageant" + "无法运行,因为存在安全隐患。", + "Pageant 致命错误", MB_ICONERROR | MB_OK); return 1; } #else MessageBox(NULL, - "This program has been compiled for Win9X and will\n" - "not run on NT, in case it causes a security breach.", - "Pageant Fatal Error", MB_ICONERROR | MB_OK); + "本程序在 Win9x 下编译,无法运行在 NT 系统。\n" + "因为存在安全隐患。", + "Pageant 致命错误", MB_ICONERROR | MB_OK); return 1; #endif } @@ -1214,7 +1214,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) */ if (already_running) { if (!command && !added_keys) { - MessageBox(NULL, "Pageant is already running", "Pageant Error", + MessageBox(NULL, "Pageant 已经运行了", "Pageant 错误", MB_ICONERROR | MB_OK); } return 0; @@ -1249,20 +1249,20 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) systray_menu = CreatePopupMenu(); if (putty_path) { session_menu = CreateMenu(); - AppendMenu(systray_menu, MF_ENABLED, IDM_PUTTY, "&New Session"); + AppendMenu(systray_menu, MF_ENABLED, IDM_PUTTY, "新会话(&N)"); AppendMenu(systray_menu, MF_POPUP | MF_ENABLED, - (UINT_PTR) session_menu, "&Saved Sessions"); + (UINT_PTR) session_menu, "保存会话(&S)"); AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); } AppendMenu(systray_menu, MF_ENABLED, IDM_VIEWKEYS, - "&View Keys"); - AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY, "Add &Key"); + "查看密钥(&V)"); + AppendMenu(systray_menu, MF_ENABLED, IDM_ADDKEY, "增加密钥(&K)"); AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); if (has_help()) - AppendMenu(systray_menu, MF_ENABLED, IDM_HELP, "&Help"); - AppendMenu(systray_menu, MF_ENABLED, IDM_ABOUT, "&About"); + AppendMenu(systray_menu, MF_ENABLED, IDM_HELP, "帮助(&H)"); + AppendMenu(systray_menu, MF_ENABLED, IDM_ABOUT, "关于(&A)"); AppendMenu(systray_menu, MF_SEPARATOR, 0, 0); - AppendMenu(systray_menu, MF_ENABLED, IDM_CLOSE, "E&xit"); + AppendMenu(systray_menu, MF_ENABLED, IDM_CLOSE, "退出(&X)"); initial_menuitems_count = GetMenuItemCount(session_menu); /* Set the default menu item. */ diff --git a/windows/winplink.c b/windows/winplink.c index 474707777..ac4569428 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -173,53 +173,53 @@ void agent_schedule_callback(void (*callback)(void *, void *, int), */ static void usage(void) { - printf("Plink: command-line connection utility\n"); + printf("Plink: 命令行连接工具\n"); printf("%s\n", ver); - printf("Usage: plink [options] [user@]host [command]\n"); - printf(" (\"host\" can also be a PuTTY saved session name)\n"); - printf("Options:\n"); - printf(" -V print version information and exit\n"); - printf(" -pgpfp print PGP key fingerprints and exit\n"); - printf(" -v show verbose messages\n"); - printf(" -load sessname Load settings from saved session\n"); + printf("用法: plink [选项] [用户名@]主机 [命令]\n"); + printf(" (\"主机\" 也可以是 PuTTY 已有的会话名称)\n"); + printf("选项:\n"); + printf(" -V 显示版本信息后退出\n"); + printf(" -pgpfp 显示 PGP 密钥指纹后退出\n"); + printf(" -v 显示详细信息\n"); + printf(" -load 会话名 载入保存的会话信息\n"); printf(" -ssh -telnet -rlogin -raw -serial\n"); - printf(" force use of a particular protocol\n"); - printf(" -P port connect to specified port\n"); - printf(" -l user connect with specified username\n"); - printf(" -batch disable all interactive prompts\n"); - printf(" -proxycmd command\n"); - printf(" use 'command' as local proxy\n"); - printf(" -sercfg configuration-string (e.g. 19200,8,n,1,X)\n"); - printf(" Specify the serial configuration (serial only)\n"); - printf("The following options only apply to SSH connections:\n"); - printf(" -pw passw login with specified password\n"); - printf(" -D [listen-IP:]listen-port\n"); - printf(" Dynamic SOCKS-based port forwarding\n"); - printf(" -L [listen-IP:]listen-port:host:port\n"); - printf(" Forward local port to remote address\n"); - printf(" -R [listen-IP:]listen-port:host:port\n"); - printf(" Forward remote port to local address\n"); - printf(" -X -x enable / disable X11 forwarding\n"); - printf(" -A -a enable / disable agent forwarding\n"); - printf(" -t -T enable / disable pty allocation\n"); - printf(" -1 -2 force use of particular protocol version\n"); - printf(" -4 -6 force use of IPv4 or IPv6\n"); - printf(" -C enable compression\n"); - printf(" -i key private key file for user authentication\n"); - printf(" -noagent disable use of Pageant\n"); - printf(" -agent enable use of Pageant\n"); + printf(" 强制使用特定协议\n"); + printf(" -P 端口 连接指定的端口\n"); + printf(" -l 用户名 使用指定的用户名连接\n"); + printf(" -batch 禁止所有交互提示\n"); + printf(" -proxycmd 命令\n"); + printf(" 使用 '命令' 作为本地代理\n"); + printf(" -sercfg 配置字符串 (例如: 19200,8,n,1,X)\n"); + printf(" 指定串口配置(仅限串口)\n"); + printf("以下选项仅适用于 SSH 连接:\n"); + printf(" -pw 密码 使用指定的密码登录\n"); + printf(" -D [监听-IP:]监听-端口\n"); + printf(" 基于 SOCKS 协议的动态端口转发\n"); + printf(" -L [监听-IP:]监听-端口:主机:端口\n"); + printf(" 转发本地端口到远程地址\n"); + printf(" -R [监听-IP:]监听-端口:主机:端口\n"); + printf(" 转发远程端口到本地地址\n"); + printf(" -X -x 启禁用 X11 转发\n"); + printf(" -A -a 启禁用 agent 转发\n"); + printf(" -t -T 启禁用 pty 转发\n"); + printf(" -1 -2 强制使用特定协议版本\n"); + printf(" -4 -6 强制使用 IPv4 或 IPv6 版本\n"); + printf(" -C 允许压缩\n"); + printf(" -i 密钥 认证使用的密钥文件\n"); + printf(" -noagent 禁用 Pageant 认证代理\n"); + printf(" -agent 启用 Pageant 认证代理\n"); printf(" -hostkey aa:bb:cc:...\n"); - printf(" manually specify a host key (may be repeated)\n"); - printf(" -m file read remote command(s) from file\n"); - printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); - printf(" -N don't start a shell/command (SSH-2 only)\n"); - printf(" -nc host:port\n"); - printf(" open tunnel in place of session (SSH-2 only)\n"); - printf(" -sshlog file\n"); - printf(" -sshrawlog file\n"); - printf(" log protocol details to a file\n"); + printf(" 手动指定主机密钥(可能重复)\n"); + printf(" -m 文件 从文件读取远程命令\n"); + printf(" -s SSH 子系统远程命令(仅限 SSH-2)\n"); + printf(" -N 不启动 shell 或执行命令(仅限 SSH-2)\n"); + printf(" -nc 主机:端口\n"); + printf(" 打开隧道代替会话(仅限 SSH-2)\n"); + printf(" -sshlog 文件\n"); + printf(" -sshrawlog 文件\n"); + printf(" 记录协议详细日志到指定文件\n"); printf(" -shareexists\n"); - printf(" test whether a connection-sharing upstream exists\n"); + printf(" 测试是否存在上游共享连接\n"); exit(1); } diff --git a/windows/winstore.c b/windows/winstore.c index 26cbf6349..215ce2249 100644 --- a/windows/winstore.c +++ b/windows/winstore.c @@ -19,7 +19,7 @@ #endif static const char *const reg_jumplist_key = PUTTY_REG_POS "\\Jumplist"; -static const char *const reg_jumplist_value = "Recent sessions"; +static const char *const reg_jumplist_value = "最近会话"; static const char *const puttystr = PUTTY_REG_POS "\\Sessions"; static const char hex[16] = "0123456789ABCDEF"; @@ -83,7 +83,7 @@ void *open_settings_w(const char *sessionname, char **errmsg) *errmsg = NULL; if (!sessionname || !*sessionname) - sessionname = "Default Settings"; + sessionname = "默认设置"; p = snewn(3 * strlen(sessionname) + 1, char); mungestr(sessionname, p); @@ -132,7 +132,7 @@ void *open_settings_r(const char *sessionname) char *p; if (!sessionname || !*sessionname) - sessionname = "Default Settings"; + sessionname = "默认设置"; p = snewn(3 * strlen(sessionname) + 1, char); mungestr(sessionname, p); diff --git a/windows/winstuff.h b/windows/winstuff.h index f8c4243f9..96680d8b6 100644 --- a/windows/winstuff.h +++ b/windows/winstuff.h @@ -274,12 +274,12 @@ GLOBAL void *logctx; * these strings are of exactly the type needed to go in * `lpstrFilter' in an OPENFILENAME structure. */ -#define FILTER_KEY_FILES ("PuTTY Private Key Files (*.ppk)\0*.ppk\0" \ - "All Files (*.*)\0*\0\0\0") -#define FILTER_WAVE_FILES ("Wave Files (*.wav)\0*.WAV\0" \ - "All Files (*.*)\0*\0\0\0") -#define FILTER_DYNLIB_FILES ("Dynamic Library Files (*.dll)\0*.dll\0" \ - "All Files (*.*)\0*\0\0\0") +#define FILTER_KEY_FILES ("PuTTY 私钥文件 (*.ppk)\0*.ppk\0" \ + "所有文件 (*.*)\0*\0\0\0") +#define FILTER_WAVE_FILES ("声音文件 (*.wav)\0*.WAV\0" \ + "所有文件 (*.*)\0*\0\0\0") +#define FILTER_DYNLIB_FILES ("动态链接库文件 (*.dll)\0*.dll\0" \ + "所有文件 (*.*)\0*\0\0\0") /* * Exports from winnet.c. @@ -533,7 +533,7 @@ GLOBAL int restricted_acl; #ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100 #endif -#if _MSC_VER < 1400 +#if _MSC_VER < 1900 typedef PVOID DLL_DIRECTORY_COOKIE; #endif