SCP 関連のメッセージを国際化した
ticket: #44168
@@ -163,16 +163,17 @@ | ||
163 | 163 | #define IDC_SSHFWDLOCALTOREMOTE_CHECKIDENTITY 1089 |
164 | 164 | #define IDC_SENDFILE_SELECT 1090 |
165 | 165 | #define IDC_FILE_PROGRESS 1092 |
166 | +#define IDC_SENDFILE_NOTE 1092 | |
166 | 167 | #define IDC_FILENAME 1093 |
167 | 168 | #define IDC_RECVDIR_SELECT 1093 |
168 | 169 | #define IDC_PROGRESS 1094 |
169 | -#define IDC_FN_STATIC 1095 | |
170 | +#define IDC_SCP_PROGRESS_FILENAME_LABEL 1095 | |
170 | 171 | #define IDC_RECVFILE 1096 |
171 | 172 | #define IDC_RECV 1097 |
172 | 173 | #define IDC_SFTP_TEST 1098 |
173 | 174 | #define IDC_DUMMY_LINE 1099 |
174 | 175 | #define IDC_LOCALUSERNAMELABEL 1100 |
175 | -#define IDC_RECV_TO_DIRECTORY 1100 | |
176 | +#define IDC_RECVFILE_TO_LABEL 1100 | |
176 | 177 | #define IDC_LOCALUSERNAME 1101 |
177 | 178 | #define IDC_RECVFILE_TO 1101 |
178 | 179 | #define IDC_CHOOSEHOSTRSAFILE 1102 |
@@ -243,6 +244,11 @@ | ||
243 | 244 | #define IDC_SSHSETUP_HELP 1249 |
244 | 245 | #define IDC_SSHFWDSETUP_HELP 1250 |
245 | 246 | #define IDC_SSHAUTHSETUP_HELP 1251 |
247 | +#define IDC_SENDFILE_FROM_LABEL 1252 | |
248 | +#define IDC_SENDFILE_TO_LABEL 1253 | |
249 | +#define IDC_RECEIVEFILE_FROM_LABEL 1254 | |
250 | +#define IDC_SCP_PROGRESS_BYTE_LABEL 1255 | |
251 | +#define IDC_SCP_PROGRESS_TIME_LABEL 1256 | |
246 | 252 | |
247 | 253 | // Next default values for new objects |
248 | 254 | // |
@@ -250,7 +256,7 @@ | ||
250 | 256 | #ifndef APSTUDIO_READONLY_SYMBOLS |
251 | 257 | #define _APS_NEXT_RESOURCE_VALUE 118 |
252 | 258 | #define _APS_NEXT_COMMAND_VALUE 40001 |
253 | -#define _APS_NEXT_CONTROL_VALUE 1252 | |
259 | +#define _APS_NEXT_CONTROL_VALUE 1257 | |
254 | 260 | #define _APS_NEXT_SYMED_VALUE 101 |
255 | 261 | #endif |
256 | 262 | #endif |
@@ -4140,7 +4140,9 @@ | ||
4140 | 4140 | if (fp == NULL) { |
4141 | 4141 | char buf[1024]; |
4142 | 4142 | int len; |
4143 | - strcpy_s(buf, sizeof(buf), "Can't open file for reading: "); | |
4143 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_READ_ERROR", pvar, | |
4144 | + "Can't open file for reading:"); | |
4145 | + _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%s ", pvar->ts->UIMsg); | |
4144 | 4146 | len = strlen(buf); |
4145 | 4147 | FormatMessage( |
4146 | 4148 | FORMAT_MESSAGE_FROM_SYSTEM, |
@@ -4150,7 +4152,9 @@ | ||
4150 | 4152 | buf+len, |
4151 | 4153 | sizeof(buf)-len, |
4152 | 4154 | NULL); |
4153 | - MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR); | |
4155 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_ERROR_TITLE", pvar, | |
4156 | + "TTSSH: file open error"); | |
4157 | + MessageBox(NULL, buf, pvar->ts->UIMsg, MB_OK | MB_ICONERROR); | |
4154 | 4158 | goto error; |
4155 | 4159 | } |
4156 | 4160 |
@@ -4191,12 +4195,20 @@ | ||
4191 | 4195 | char buf[512]; |
4192 | 4196 | int dlgresult; |
4193 | 4197 | if (_access(c->scp.localfilefull, 0x02) == -1) { // 0x02 == writable |
4194 | - _snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file is read only.", c->scp.localfilefull); | |
4195 | - MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR); | |
4198 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_READONLY_ERROR", pvar, | |
4199 | + "`%s' file is read only."); | |
4200 | + _snprintf_s(buf, sizeof(buf), _TRUNCATE, pvar->ts->UIMsg, c->scp.localfilefull); | |
4201 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_ERROR_TITLE", pvar, | |
4202 | + "TTSSH: file open error"); | |
4203 | + MessageBox(NULL, buf, pvar->ts->UIMsg, MB_OK | MB_ICONERROR); | |
4196 | 4204 | goto error; |
4197 | 4205 | } |
4198 | - _snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file exists.\noverwrite it?", c->scp.localfilefull); | |
4199 | - dlgresult = MessageBox(NULL, buf, "TTSSH: confirm", MB_YESNO | MB_ICONQUESTION); | |
4206 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_OVERWRITE_CONFIRM", pvar, | |
4207 | + "`%s' file exists.\noverwrite it?"); | |
4208 | + _snprintf_s(buf, sizeof(buf), _TRUNCATE, pvar->ts->UIMsg, c->scp.localfilefull); | |
4209 | + UTIL_get_lang_msg("MSG_SSH_SCP_CONFIRM_TITLE", pvar, | |
4210 | + "TTSSH: confirm"); | |
4211 | + dlgresult = MessageBox(NULL, buf, pvar->ts->UIMsg, MB_YESNO | MB_ICONQUESTION); | |
4200 | 4212 | if (dlgresult == IDNO) { |
4201 | 4213 | goto error; |
4202 | 4214 | } |
@@ -4206,7 +4218,9 @@ | ||
4206 | 4218 | if (fp == NULL) { |
4207 | 4219 | char buf[1024]; |
4208 | 4220 | int len; |
4209 | - strcpy_s(buf, sizeof(buf), "Can't open file for writing: "); | |
4221 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_WRITE_ERROR", pvar, | |
4222 | + "Can't open file for writing:"); | |
4223 | + _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%s ", pvar->ts->UIMsg); | |
4210 | 4224 | len = strlen(buf); |
4211 | 4225 | FormatMessage( |
4212 | 4226 | FORMAT_MESSAGE_FROM_SYSTEM, |
@@ -4216,7 +4230,9 @@ | ||
4216 | 4230 | buf+len, |
4217 | 4231 | sizeof(buf)-len, |
4218 | 4232 | NULL); |
4219 | - MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR); | |
4233 | + UTIL_get_lang_msg("MSG_SSH_SCP_FILEOPEN_ERROR_TITLE", pvar, | |
4234 | + "TTSSH: file open error"); | |
4235 | + MessageBox(NULL, buf, pvar->ts->UIMsg, MB_OK | MB_ICONERROR); | |
4220 | 4236 | goto error; |
4221 | 4237 | } |
4222 | 4238 |
@@ -8211,8 +8227,16 @@ | ||
8211 | 8227 | c->scp.pvar = pvar; |
8212 | 8228 | |
8213 | 8229 | hDlgWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SSHSCP_PROGRESS), |
8214 | - pvar->cv->HWin, (DLGPROC)ssh_scp_dlg_proc); | |
8230 | + pvar->cv->HWin, (DLGPROC)ssh_scp_dlg_proc); | |
8215 | 8231 | if (hDlgWnd != NULL) { |
8232 | + const static DlgTextInfo text_info[] = { | |
8233 | + { 0, "DLG_SCP_PROGRESS_TITLE_SENDFILE" }, | |
8234 | + { IDC_SCP_PROGRESS_FILENAME_LABEL, "DLG_SCP_PROGRESS_FILENAME_LABEL" }, | |
8235 | + { IDC_SCP_PROGRESS_BYTE_LABEL, "DLG_SCP_PROGRESS_BYTES_LABEL" }, | |
8236 | + { IDC_SCP_PROGRESS_TIME_LABEL, "DLG_SCP_PROGRESS_TIME_LABEL" }, | |
8237 | + }; | |
8238 | + SetI18DlgStrs("TTSSH", hDlgWnd, text_info, _countof(text_info), pvar->ts->UILanguageFile); | |
8239 | + | |
8216 | 8240 | c->scp.progress_window = hDlgWnd; |
8217 | 8241 | ShowWindow(hDlgWnd, SW_SHOW); |
8218 | 8242 | } |
@@ -8470,10 +8494,17 @@ | ||
8470 | 8494 | // 進捗ウィンドウ |
8471 | 8495 | c->scp.pvar = pvar; |
8472 | 8496 | hDlgWnd = CreateDialog(hInst, MAKEINTRESOURCE(IDD_SSHSCP_PROGRESS), |
8473 | - pvar->cv->HWin, (DLGPROC)ssh_scp_dlg_proc); | |
8497 | + pvar->cv->HWin, (DLGPROC)ssh_scp_dlg_proc); | |
8474 | 8498 | if (hDlgWnd != NULL) { |
8499 | + const static DlgTextInfo text_info[] = { | |
8500 | + { 0, "DLG_SCP_PROGRESS_TITLE_RECEIVEFILE" }, | |
8501 | + { IDC_SCP_PROGRESS_FILENAME_LABEL, "DLG_SCP_SENDFILE_FROM" }, | |
8502 | + { IDC_SCP_PROGRESS_BYTE_LABEL, "DLG_SCP_PROGRESS_BYTES_LABEL" }, | |
8503 | + { IDC_SCP_PROGRESS_TIME_LABEL, "DLG_SCP_PROGRESS_TIME_LABEL" }, | |
8504 | + }; | |
8505 | + SetI18DlgStrs("TTSSH", hDlgWnd, text_info, _countof(text_info), pvar->ts->UILanguageFile); | |
8506 | + | |
8475 | 8507 | c->scp.progress_window = hDlgWnd; |
8476 | - SetWindowText(hDlgWnd, "TTSSH: SCP receiving file"); | |
8477 | 8508 | SendMessage(GetDlgItem(hDlgWnd, IDC_FILENAME), WM_SETTEXT, 0, (LPARAM)c->scp.localfilefull); |
8478 | 8509 | ShowWindow(hDlgWnd, SW_SHOW); |
8479 | 8510 | } |
@@ -8495,8 +8526,10 @@ | ||
8495 | 8526 | copylen = min(buflen, sizeof(msg)); |
8496 | 8527 | memcpy(msg, data, copylen); |
8497 | 8528 | msg[copylen - 1] = 0; |
8498 | - MessageBox(NULL, msg, "TTSSH: SCP error(SCP_INIT)", MB_OK | MB_ICONEXCLAMATION); | |
8499 | 8529 | |
8530 | + UTIL_get_lang_msg("MSG_SSH_SCP_ERROR_INIT_TITLE", pvar, | |
8531 | + "TTSSH: SCP error (SCP_INIT)"); | |
8532 | + MessageBox(NULL, msg, pvar->ts->UIMsg, MB_OK | MB_ICONEXCLAMATION); | |
8500 | 8533 | } |
8501 | 8534 | |
8502 | 8535 | } else if (c->scp.state == SCP_DATA) { // payloadの受信 |
@@ -8577,7 +8610,9 @@ | ||
8577 | 8610 | //ssh2_channel_send_close(pvar, c); |
8578 | 8611 | } |
8579 | 8612 | |
8580 | - MessageBox(NULL, msg, "TTSSH: SCP error", MB_OK | MB_ICONEXCLAMATION); | |
8613 | + UTIL_get_lang_msg("MSG_SSH_SCP_ERROR_TITLE", pvar, | |
8614 | + "TTSSH: SCP error"); | |
8615 | + MessageBox(NULL, msg, pvar->ts->UIMsg, MB_OK | MB_ICONEXCLAMATION); | |
8581 | 8616 | } |
8582 | 8617 | } |
8583 | 8618 |
@@ -3414,6 +3414,21 @@ | ||
3414 | 3414 | |
3415 | 3415 | switch (msg) { |
3416 | 3416 | case WM_INITDIALOG: |
3417 | + { | |
3418 | + const static DlgTextInfo text_info[] = { | |
3419 | + { 0, "DLG_SCP_TITLE" }, | |
3420 | + { IDC_SENDFILE_FROM_LABEL, "DLG_SCP_SENDFILE_FROM" }, | |
3421 | + { IDC_SENDFILE_TO_LABEL, "DLG_SCP_SENDFILE_TO" }, | |
3422 | + { IDC_SENDFILE_NOTE, "DLG_SCP_SENDFILE_DRAG" }, | |
3423 | + { IDOK, "DLG_SCP_SENDFILE_SEND" }, | |
3424 | + { IDCANCEL, "DLG_SCP_SENDFILE_CANCEL" }, | |
3425 | + { IDC_RECEIVEFILE_FROM_LABEL, "DLG_SCP_RECEIVEFILE_FROM" }, | |
3426 | + { IDC_RECVFILE_TO_LABEL, "DLG_SCP_RECEIVEFILE_TO" }, | |
3427 | + { IDC_RECV, "DLG_SCP_RECEIVEFILE_RECEIVE" }, | |
3428 | + }; | |
3429 | + SetI18DlgStrs("TTSSH", dlg, text_info, _countof(text_info), pvar->ts->UILanguageFile); | |
3430 | + } | |
3431 | + | |
3417 | 3432 | DragAcceptFiles(dlg, TRUE); |
3418 | 3433 | |
3419 | 3434 | // SCPファイル送信先を表示する |
@@ -3470,7 +3485,9 @@ | ||
3470 | 3485 | get_lang_msg("FILEDLG_SELECT_LOGVIEW_APP_TITLE", uimsg, sizeof(uimsg), |
3471 | 3486 | "Choose a executing file with launching logging file", ts.UILanguageFile); |
3472 | 3487 | #endif |
3473 | - ofn.lpstrTitle = "Choose a sending file with SCP"; | |
3488 | + UTIL_get_lang_msg("DLG_SCP_SELECT_FILE_TITLE", pvar, | |
3489 | + "Choose a sending file with SCP"); | |
3490 | + ofn.lpstrTitle = pvar->ts->UIMsg; | |
3474 | 3491 | |
3475 | 3492 | ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; |
3476 | 3493 | ofn.Flags |= OFN_FORCESHOWHIDDEN; |
@@ -3485,7 +3502,9 @@ | ||
3485 | 3502 | char buf[MAX_PATH], buf2[MAX_PATH]; |
3486 | 3503 | hWnd = GetDlgItem(dlg, IDC_RECVFILE_TO); |
3487 | 3504 | SendMessage(hWnd, WM_GETTEXT , sizeof(buf), (LPARAM)buf); |
3488 | - if (doSelectFolder(dlg, buf2, sizeof(buf2), buf, "Choose destination directory")) { | |
3505 | + UTIL_get_lang_msg("DLG_SCP_SELECT_DEST_TITLE", pvar, | |
3506 | + "Choose destination directory"); | |
3507 | + if (doSelectFolder(dlg, buf2, sizeof(buf2), buf, pvar->ts->UIMsg)) { | |
3489 | 3508 | strncpy_s(recvdir, sizeof(recvdir), buf2, _TRUNCATE); |
3490 | 3509 | SendMessage(GetDlgItem(dlg, IDC_RECVFILE_TO), WM_SETTEXT, 0, (LPARAM)recvdir); |
3491 | 3510 | } |