1
1

Merge branch '1646_i18n_spaces'

* 1646_i18n_spaces:
  "Chown command" dialog: applied WGroupbox widget to draw frames.
  "Chmod command" dialog: applied WGroupbox widget to draw frames.
  Ticket #1646: removed leading and trailing spaces in i18n resources.
Этот коммит содержится в:
Andrew Borodin 2010-06-07 21:43:04 +04:00
родитель da9af5a210 a6b7f3ffe1
Коммит 7d0a74a1a5
52 изменённых файлов: 409 добавлений и 416 удалений

Просмотреть файл

@ -448,7 +448,7 @@ close_error_pipe (int error, const char *text)
{ {
if (dup2 (old_error, 2) == -1) if (dup2 (old_error, 2) == -1)
{ {
message (error, MSG_ERROR, "%s", _("Error dup'ing old error pipe")); message (error, MSG_ERROR, _("Error dup'ing old error pipe"));
return 1; return 1;
} }
close (old_error); close (old_error);

Просмотреть файл

@ -461,7 +461,7 @@ vfs_s_free_super (struct vfs_class *me, struct vfs_s_super *super)
"Super ino_usage is %d, memory leak", super->ino_usage); "Super ino_usage is %d, memory leak", super->ino_usage);
if (super->want_stale) if (super->want_stale)
message (D_ERROR, " Direntry warning ", "Super has want_stale set"); message (D_ERROR, "Direntry warning", "%s", "Super has want_stale set");
#endif #endif
if (super->prevp) if (super->prevp)

Просмотреть файл

@ -304,13 +304,14 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
if (!SUP.password) if (!SUP.password)
{ {
char *p, *op; char *p, *op;
p = g_strconcat (_(" fish: Password required for "), SUP.user, " ", (char *) NULL); p = g_strdup_printf (_("fish: Password is required for %s"), SUP.user);
op = vfs_get_password (p); op = vfs_get_password (p);
g_free (p); g_free (p);
if (op == NULL) if (op == NULL)
ERRNOR (EPERM, -1); ERRNOR (EPERM, -1);
SUP.password = op; SUP.password = op;
} }
print_vfs_message (_("fish: Sending password...")); print_vfs_message (_("fish: Sending password..."));
{ {

Просмотреть файл

@ -507,7 +507,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, const char
{ /* ask user */ { /* ask user */
char *p; char *p;
p = g_strconcat (_(" FTP: Password required for "), SUP.user, " ", (char *) NULL); p = g_strdup_printf (_("FTP: Password required for %s"), SUP.user);
op = vfs_get_password (p); op = vfs_get_password (p);
g_free (p); g_free (p);
if (op == NULL) if (op == NULL)
@ -2104,7 +2104,7 @@ ftpfs_netrc_bad_mode (const char *netrcname)
if (be_angry) if (be_angry)
{ {
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_("~/.netrc file has incorrect mode.\n" "Remove password or correct mode.")); _("~/.netrc file has incorrect mode\nRemove password or correct mode"));
be_angry = 0; be_angry = 0;
} }
return 1; return 1;

Просмотреть файл

@ -619,7 +619,7 @@ smbfs_reconnect(smbfs_connection *conn, int *retries)
if (!(conn->cli = smbfs_do_connect(host, conn->service))) { if (!(conn->cli = smbfs_do_connect(host, conn->service))) {
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_(" reconnect to %s failed\n "), conn->host); _("reconnect to %s failed"), conn->host);
g_free(host); g_free(host);
return False; return False;
} }

Просмотреть файл

@ -697,7 +697,7 @@ tar_open_archive (struct vfs_class *me, struct vfs_s_super *archive,
case STATUS_EOFMARK: case STATUS_EOFMARK:
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_ _
("Hmm,...\n%s\ndoesn't look like a tar archive."), ("%s\ndoesn't look like a tar archive."),
name); name);
/* FALL THRU */ /* FALL THRU */

Просмотреть файл

@ -342,13 +342,13 @@ undelfs_opendir (struct vfs_class *me, const char *dirname)
print_vfs_message (_("undelfs: reading inode bitmap...")); print_vfs_message (_("undelfs: reading inode bitmap..."));
if (ext2fs_read_inode_bitmap (fs)) if (ext2fs_read_inode_bitmap (fs))
{ {
message (D_ERROR, undelfserr, _(" Cannot load inode bitmap from: \n %s \n"), ext2_fname); message (D_ERROR, undelfserr, _("Cannot load inode bitmap from:\n%s"), ext2_fname);
goto quit_opendir; goto quit_opendir;
} }
print_vfs_message (_("undelfs: reading block bitmap...")); print_vfs_message (_("undelfs: reading block bitmap..."));
if (ext2fs_read_block_bitmap (fs)) if (ext2fs_read_block_bitmap (fs))
{ {
message (D_ERROR, undelfserr, _(" Cannot load block bitmap from: \n %s \n"), ext2_fname); message (D_ERROR, undelfserr, _("Cannot load block bitmap from:\n%s"), ext2_fname);
goto quit_opendir; goto quit_opendir;
} }
/* Now load the deleted information */ /* Now load the deleted information */
@ -678,7 +678,7 @@ undelfs_chdir (struct vfs_class *me, const char *path)
fd = open (file, O_RDONLY); fd = open (file, O_RDONLY);
if (fd == -1) if (fd == -1)
{ {
message (D_ERROR, undelfserr, _(" Cannot open file %s "), file); message (D_ERROR, undelfserr, _("Cannot open file \"%s\""), file);
g_free (f); g_free (f);
g_free (file); g_free (file);
return -1; return -1;

Просмотреть файл

@ -311,7 +311,7 @@ background_attention (int fd, void *closure)
{ {
message (D_ERROR, _("Background protocol error"), message (D_ERROR, _("Background protocol error"),
_("Background process sent us a request for more arguments\n" _("Background process sent us a request for more arguments\n"
" than we can handle. \n")); "than we can handle."));
} }
if (have_ctx) if (have_ctx)

Просмотреть файл

@ -139,9 +139,6 @@ chmod_refresh (Dlg_head * h)
tty_setcolor (COLOR_NORMAL); tty_setcolor (COLOR_NORMAL);
draw_box (h, PY, PX, PERMISSIONS + 2, 33, TRUE);
draw_box (h, FY, FX, 10, 25, TRUE);
dlg_move (h, FY + 1, FX + 2); dlg_move (h, FY + 1, FX + 2);
tty_print_string (_("Name")); tty_print_string (_("Name"));
dlg_move (h, FY + 3, FX + 2); dlg_move (h, FY + 3, FX + 2);
@ -159,20 +156,13 @@ chmod_refresh (Dlg_head * h)
tty_print_string (_("to move between options")); tty_print_string (_("to move between options"));
dlg_move (h, TY + 3, TX); dlg_move (h, TY + 3, TX);
tty_print_string (_("and T or INS to mark")); tty_print_string (_("and T or INS to mark"));
tty_setcolor (COLOR_HOT_NORMAL);
dlg_move (h, PY, PX + 1);
tty_print_string (_(" Permission "));
dlg_move (h, FY, FX + 1);
tty_print_string (_(" File "));
} }
static cb_ret_t static cb_ret_t
chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data) chmod_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int parm, void *data)
{ {
char buffer[BUF_TINY]; char buffer[BUF_TINY];
int id = h->current->dlg_id - BUTTONS + single_set * 2; int id = h->current->dlg_id - BUTTONS + single_set * 2 - 1;
switch (msg) switch (msg)
{ {
@ -232,12 +222,16 @@ init_chmod (void)
chmod_but[i].flags, _(chmod_but[i].text), 0)); chmod_but[i].flags, _(chmod_but[i].text), 0));
} }
add_widget (ch_dlg, groupbox_new (FY, FX, 10, 25, _("File")));
for (i = 0; i < PERMISSIONS; i++) for (i = 0; i < PERMISSIONS; i++)
{ {
check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2, 0, _(check_perm[i].text)); check_perm[i].check = check_new (PY + (PERMISSIONS - i), PX + 2, 0, _(check_perm[i].text));
add_widget (ch_dlg, check_perm[i].check); add_widget (ch_dlg, check_perm[i].check);
} }
add_widget (ch_dlg, groupbox_new ( PY, PX, PERMISSIONS + 2, 33, _("Permission")));
return ch_dlg; return ch_dlg;
} }
@ -382,6 +376,7 @@ chmod_cmd (void)
apply_mask (&sf_stat); apply_mask (&sf_stat);
break; break;
case B_CLRMRK: case B_CLRMRK:
and_mask = or_mask = 0; and_mask = or_mask = 0;
and_mask = ~and_mask; and_mask = ~and_mask;
@ -401,8 +396,10 @@ chmod_cmd (void)
do_file_mark (current_panel, c_file, 0); do_file_mark (current_panel, c_file, 0);
need_update = 1; need_update = 1;
} }
destroy_dlg (ch_dlg); destroy_dlg (ch_dlg);
} }
while (current_panel->marked && !end_chmod); while (current_panel->marked && !end_chmod);
chmod_done (); chmod_done ();
} }

Просмотреть файл

@ -106,28 +106,16 @@ chown_refresh (Dlg_head * h)
tty_setcolor (COLOR_NORMAL); tty_setcolor (COLOR_NORMAL);
draw_box (h, UY, UX, 12, 21, TRUE); dlg_move (h, TY + 1, TX + 2);
draw_box (h, GY, GX, 12, 21, TRUE);
draw_box (h, TY, TX, 12, 19, TRUE);
dlg_move (h, TY + 1, TX + 1);
tty_print_string (_("Name")); tty_print_string (_("Name"));
dlg_move (h, TY + 3, TX + 1); dlg_move (h, TY + 3, TX + 2);
tty_print_string (_("Owner name")); tty_print_string (_("Owner name"));
dlg_move (h, TY + 5, TX + 1); dlg_move (h, TY + 5, TX + 2);
tty_print_string (_("Group name")); tty_print_string (_("Group name"));
dlg_move (h, TY + 7, TX + 1); dlg_move (h, TY + 7, TX + 2);
tty_print_string (_("Size")); tty_print_string (_("Size"));
dlg_move (h, TY + 9, TX + 1); dlg_move (h, TY + 9, TX + 2);
tty_print_string (_("Permission")); tty_print_string (_("Permission"));
tty_setcolor (COLOR_HOT_NORMAL);
dlg_move (h, UY, UX + 1);
tty_print_string (_(" User name "));
dlg_move (h, GY, GX + 1);
tty_print_string (_(" Group name "));
dlg_move (h, TY, TX + 1);
tty_print_string (_(" File "));
} }
static char * static char *
@ -191,7 +179,7 @@ init_chown (void)
/* get and put user names in the listbox */ /* get and put user names in the listbox */
setpwent (); setpwent ();
while ((l_pass = getpwent ())) while ((l_pass = getpwent ()) != NULL)
{ {
listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL); listbox_add_item (l_user, LISTBOX_APPEND_SORTED, 0, l_pass->pw_name, NULL);
} }
@ -199,15 +187,19 @@ init_chown (void)
/* get and put group names in the listbox */ /* get and put group names in the listbox */
setgrent (); setgrent ();
while ((l_grp = getgrent ())) while ((l_grp = getgrent ()) != NULL)
{ {
listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL); listbox_add_item (l_group, LISTBOX_APPEND_SORTED, 0, l_grp->gr_name, NULL);
} }
endgrent (); endgrent ();
add_widget (ch_dlg, groupbox_new (TY, TX, 12, 19, _("File")));
/* add listboxes to the dialogs */ /* add listboxes to the dialogs */
add_widget (ch_dlg, l_group); add_widget (ch_dlg, l_group);
add_widget (ch_dlg, groupbox_new (GY, GX, 12, 21, _("Group name")));
add_widget (ch_dlg, l_user); add_widget (ch_dlg, l_user);
add_widget (ch_dlg, groupbox_new (UY, UX, 12, 21, _("User name")));
return ch_dlg; return ch_dlg;
} }
@ -306,6 +298,7 @@ chown_cmd (void)
} }
break; break;
} }
case B_SETGRP: case B_SETGRP:
{ {
struct group *grp; struct group *grp;
@ -320,6 +313,7 @@ chown_cmd (void)
} }
break; break;
} }
case B_SETALL: case B_SETALL:
case B_ENTER: case B_ENTER:
{ {
@ -353,6 +347,7 @@ chown_cmd (void)
do_file_mark (current_panel, current_file, 0); do_file_mark (current_panel, current_file, 0);
need_update = 1; need_update = 1;
} }
destroy_dlg (ch_dlg); destroy_dlg (ch_dlg);
} }
while (current_panel->marked && !end_chown); while (current_panel->marked && !end_chown);

Просмотреть файл

@ -948,7 +948,7 @@ compare_dirs_cmd (void)
else else
{ {
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_(" Both panels should be in the " "listing mode to use this command ")); _("Both panels should be in the listing mode\nto use this command"));
} }
} }
@ -990,7 +990,7 @@ view_other_cmd (void)
{ {
if (message_flag) if (message_flag)
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_(" Not an xterm or Linux console; \n" " the panels cannot be toggled. ")); _("Not an xterm or Linux console;\nthe panels cannot be toggled."));
message_flag = FALSE; message_flag = FALSE;
} }
else else
@ -1259,8 +1259,7 @@ void
undelete_cmd (void) undelete_cmd (void)
{ {
nice_cd (_("Undelete files on an ext2 file system"), nice_cd (_("Undelete files on an ext2 file system"),
_(" Enter device (without /dev/) to undelete\n " _("Enter device (without /dev/) to undelete\nfiles on: (F1 for details)"),
" files on: (F1 for details)"),
"[Undelete File System]", ":undelete_cmd: Undel on ext2 fs ", "/#undel:", 0); "[Undelete File System]", ":undelete_cmd: Undel on ext2 fs ", "/#undel:", 0);
} }
#endif /* USE_EXT2FSLIB */ #endif /* USE_EXT2FSLIB */

Просмотреть файл

@ -232,8 +232,7 @@ enter (WInput *lc_cmdline)
} }
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_ _("Cannot execute commands on non-local filesystems"));
(" Cannot execute commands on non-local filesystems"));
return MSG_NOT_HANDLED; return MSG_NOT_HANDLED;
} }

Просмотреть файл

@ -130,7 +130,7 @@ mcdiffview_dialog_search (WDiff * dview)
MC_HISTORY_SHARED_SEARCH, MC_HISTORY_SHARED_SEARCH,
&exp), &exp),
/* 7 */ /* 7 */
QUICK_LABEL (2, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_(" Enter search string:")), QUICK_LABEL (3, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_("Enter search string:")),
QUICK_END QUICK_END
}; };

Просмотреть файл

@ -2767,7 +2767,7 @@ dview_edit (WDiff * dview, int ord)
static void static void
dview_goto_cmd (WDiff * dview, int ord) dview_goto_cmd (WDiff * dview, int ord)
{ {
static const char *title[2] = { " Goto line (left) ", " Goto line (right) " }; static const char *title[2] = { N_("Goto line (left)"), N_("Goto line (right)") };
static char prev[256]; static char prev[256];
/* XXX some statics here, to be remembered between runs */ /* XXX some statics here, to be remembered between runs */

Просмотреть файл

@ -663,7 +663,7 @@ check_file_access (WEdit * edit, const char *filename, struct stat *st)
/* We want to open regular files only */ /* We want to open regular files only */
if (!S_ISREG (st->st_mode)) if (!S_ISREG (st->st_mode))
{ {
g_string_sprintf (errmsg = g_string_new (NULL), _(" %s is not a regular file "), filename); g_string_sprintf (errmsg = g_string_new (NULL), _("\"%s\" is not a regular file"), filename);
goto cleanup; goto cleanup;
} }
@ -678,7 +678,7 @@ check_file_access (WEdit * edit, const char *filename, struct stat *st)
if (st->st_size >= SIZE_LIMIT) if (st->st_size >= SIZE_LIMIT)
{ {
g_string_sprintf (errmsg = g_string_new (NULL), _(" File %s is too large "), filename); g_string_sprintf (errmsg = g_string_new (NULL), _("File \"%s\" is too large"), filename);
} }
cleanup: cleanup:

Просмотреть файл

@ -300,7 +300,7 @@ edit_save_file (WEdit * edit, const char *filename)
#else #else
if (pclose (file) != 0) if (pclose (file) != 0)
{ {
tmp = g_strconcat (_(" Error writing to pipe: "), p, " ", (char *) NULL); tmp = g_strdup_printf (_("Error writing to pipe: %s"), p);
edit_error_dialog (_("Error"), tmp); edit_error_dialog (_("Error"), tmp);
g_free (tmp); g_free (tmp);
g_free (p); g_free (p);
@ -310,8 +310,7 @@ edit_save_file (WEdit * edit, const char *filename)
} }
else else
{ {
tmp = g_strconcat (_(" Cannot open pipe for writing: "), p, " ", (char *) NULL); tmp = g_strdup_printf (_("Cannot open pipe for writing: %s"), p);
edit_error_dialog (_("Error"), get_sys_error (tmp)); edit_error_dialog (_("Error"), get_sys_error (tmp));
g_free (p); g_free (p);
g_free (tmp); g_free (tmp);
@ -548,7 +547,7 @@ edit_get_save_file_as (WEdit * edit)
QUICK_LABEL (3, DLG_WIDTH, DLG_HEIGHT - 9, DLG_HEIGHT, N_("Change line breaks to:")), QUICK_LABEL (3, DLG_WIDTH, DLG_HEIGHT - 9, DLG_HEIGHT, N_("Change line breaks to:")),
QUICK_INPUT (3, DLG_WIDTH, DLG_HEIGHT - 11, DLG_HEIGHT, filename, DLG_WIDTH - 6, 0, QUICK_INPUT (3, DLG_WIDTH, DLG_HEIGHT - 11, DLG_HEIGHT, filename, DLG_WIDTH - 6, 0,
"save-as", &filename), "save-as", &filename),
QUICK_LABEL (2, DLG_WIDTH, DLG_HEIGHT - 12, DLG_HEIGHT, N_(" Enter file name: ")), QUICK_LABEL (3, DLG_WIDTH, DLG_HEIGHT - 12, DLG_HEIGHT, N_("Enter file name:")),
QUICK_END QUICK_END
}; };
@ -610,7 +609,7 @@ edit_save_as_cmd (WEdit * edit)
/* Overwrite the current file or cancel the operation */ /* Overwrite the current file or cancel the operation */
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_(" A file already exists with this name. "), _("A file already exists with this name"),
_("&Overwrite"), _("&Cancel"))) _("&Overwrite"), _("&Cancel")))
{ {
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
@ -669,7 +668,7 @@ edit_save_as_cmd (WEdit * edit)
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
return 1; return 1;
default: default:
edit_error_dialog (_(" Save As "), get_sys_error (_(" Cannot save file. "))); edit_error_dialog (_("Save as"), get_sys_error (_("Cannot save file")));
/* fallthrough */ /* fallthrough */
case -1: case -1:
/* Failed, so maintain modify (not save) lock */ /* Failed, so maintain modify (not save) lock */
@ -912,7 +911,7 @@ edit_save_confirm_cmd (WEdit * edit)
if (edit_confirm_save) if (edit_confirm_save)
{ {
f = g_strconcat (_(" Confirm save file? : "), edit->filename, " ", (char *) NULL); f = g_strdup_printf (_("Confirm save file: \"%s\""), edit->filename);
if (edit_query_dialog2 (_("Save file"), f, _("&Save"), _("&Cancel"))) if (edit_query_dialog2 (_("Save file"), f, _("&Save"), _("&Cancel")))
{ {
g_free (f); g_free (f);
@ -961,7 +960,7 @@ edit_new_cmd (WEdit * edit)
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_ _
(" Current text was modified without a file save. \n Continue discards these changes. "), ("Current text was modified without a file save.\nContinue discards these changes"),
_("C&ontinue"), _("&Cancel"))) _("C&ontinue"), _("&Cancel")))
{ {
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
@ -1036,7 +1035,7 @@ edit_load_menu_file (WEdit * edit)
dir = query_dialog (_("Menu edit"), dir = query_dialog (_("Menu edit"),
_("Which menu file do you want to edit?"), D_NORMAL, _("Which menu file do you want to edit?"), D_NORMAL,
geteuid ()? 2 : 3, _("&Local"), _("&User"), _("&System Wide")); geteuid () != 0 ? 2 : 3, _("&Local"), _("&User"), _("&System Wide"));
menufile = concat_dir_and_file (mc_home, EDIT_GLOBAL_MENU); menufile = concat_dir_and_file (mc_home, EDIT_GLOBAL_MENU);
@ -1088,7 +1087,7 @@ edit_load_cmd (WEdit * edit, edit_current_file_t what)
&& (edit_query_dialog2 && (edit_query_dialog2
(_("Warning"), (_("Warning"),
_("Current text was modified without a file save.\n" _("Current text was modified without a file save.\n"
" Continue discards these changes. "), _("C&ontinue"), _("&Cancel")) == 1)) "Continue discards these changes"), _("C&ontinue"), _("&Cancel")) == 1))
{ {
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
return 0; return 0;
@ -1374,7 +1373,7 @@ edit_block_move_cmd (WEdit * edit)
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_ _
(" Block is large, you may not be able to undo this action. "), ("Block is large, you may not be able to undo this action"),
_("C&ontinue"), _("&Cancel"))) _("C&ontinue"), _("&Cancel")))
return; return;
@ -1496,7 +1495,7 @@ edit_block_delete (WEdit * edit)
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_ _
(" Block is large, you may not be able to undo this action. "), ("Block is large, you may not be able to undo this action"),
_("C&ontinue"), _("&Cancel"))) _("C&ontinue"), _("&Cancel")))
{ {
return 1; return 1;
@ -1875,7 +1874,7 @@ edit_replace_cmd (WEdit * edit, int again)
edit_render_keypress (edit); edit_render_keypress (edit);
if (times_replaced) if (times_replaced)
{ {
message (D_NORMAL, msg, _(" %ld replacements made. "), times_replaced); message (D_NORMAL, msg, _("%ld replacements made"), times_replaced);
} }
else else
query_dialog (msg, _("Search string not found"), D_NORMAL, 1, _("&OK")); query_dialog (msg, _("Search string not found"), D_NORMAL, 1, _("&OK"));
@ -2048,7 +2047,7 @@ edit_ok_to_exit (WEdit * edit)
return 0; return 0;
switch (edit_query_dialog3 switch (edit_query_dialog3
(_("Quit"), _(" File was modified, Save with exit? "), (_("Quit"), _("File was modified, save with exit?"),
_("&Cancel quit"), _("&Yes"), _("&No"))) _("&Cancel quit"), _("&Yes"), _("&No")))
{ {
case 1: case 1:
@ -2171,7 +2170,7 @@ void
edit_paste_from_history (WEdit * edit) edit_paste_from_history (WEdit * edit)
{ {
(void) edit; (void) edit;
edit_error_dialog (_(" Error "), _(" This function is not implemented. ")); edit_error_dialog (_("Error"), _("This function is not implemented"));
} }
int int
@ -2183,7 +2182,7 @@ edit_copy_to_X_buf_cmd (WEdit * edit)
if (!edit_save_block_to_clip_file (edit, start_mark, end_mark)) if (!edit_save_block_to_clip_file (edit, start_mark, end_mark))
{ {
edit_error_dialog (_("Copy to clipboard"), edit_error_dialog (_("Copy to clipboard"),
get_sys_error (_(" Unable to save to file. "))); get_sys_error (_("Unable to save to file")));
return 1; return 1;
} }
edit_mark_cmd (edit, 1); edit_mark_cmd (edit, 1);
@ -2198,7 +2197,7 @@ edit_cut_to_X_buf_cmd (WEdit * edit)
return 0; return 0;
if (!edit_save_block_to_clip_file (edit, start_mark, end_mark)) if (!edit_save_block_to_clip_file (edit, start_mark, end_mark))
{ {
edit_error_dialog (_(" Cut to clipboard "), _(" Unable to save to file. ")); edit_error_dialog (_("Cut to clipboard"), _("Unable to save to file"));
return 1; return 1;
} }
edit_block_delete_cmd (edit); edit_block_delete_cmd (edit);
@ -2270,7 +2269,7 @@ edit_save_block_cmd (WEdit * edit)
tmp = concat_dir_and_file (home_dir, EDIT_CLIP_FILE); tmp = concat_dir_and_file (home_dir, EDIT_CLIP_FILE);
exp = exp =
input_expand_dialog (_(" Save Block "), _(" Enter file name: "), input_expand_dialog (_("Save block"), _("Enter file name:"),
MC_HISTORY_EDIT_SAVE_BLOCK, tmp); MC_HISTORY_EDIT_SAVE_BLOCK, tmp);
g_free (tmp); g_free (tmp);
edit_push_action (edit, KEY_PRESS + edit->start_display); edit_push_action (edit, KEY_PRESS + edit->start_display);
@ -2292,7 +2291,7 @@ edit_save_block_cmd (WEdit * edit)
else else
{ {
g_free (exp); g_free (exp);
edit_error_dialog (_(" Save Block "), get_sys_error (_(" Cannot save file. "))); edit_error_dialog (_("Save block"), get_sys_error (_("Cannot save file")));
} }
} }
} }
@ -2309,7 +2308,7 @@ edit_insert_file_cmd (WEdit * edit)
char *exp; char *exp;
tmp = concat_dir_and_file (home_dir, EDIT_CLIP_FILE); tmp = concat_dir_and_file (home_dir, EDIT_CLIP_FILE);
exp = input_expand_dialog (_(" Insert File "), _(" Enter file name: "), exp = input_expand_dialog (_("Insert file"), _("Enter file name:"),
MC_HISTORY_EDIT_INSERT_FILE, tmp); MC_HISTORY_EDIT_INSERT_FILE, tmp);
g_free (tmp); g_free (tmp);
edit_push_action (edit, KEY_PRESS + edit->start_display); edit_push_action (edit, KEY_PRESS + edit->start_display);
@ -2331,7 +2330,7 @@ edit_insert_file_cmd (WEdit * edit)
else else
{ {
g_free (exp); g_free (exp);
edit_error_dialog (_(" Insert File "), get_sys_error (_(" Cannot insert file. "))); edit_error_dialog (_("Insert file"), get_sys_error (_("Cannot insert file")));
} }
} }
} }
@ -2350,7 +2349,7 @@ edit_sort_cmd (WEdit * edit)
if (eval_marks (edit, &start_mark, &end_mark)) if (eval_marks (edit, &start_mark, &end_mark))
{ {
edit_error_dialog (_(" Sort block "), _(" You must first highlight a block of text. ")); edit_error_dialog (_("Sort block"), _("You must first highlight a block of text"));
return 0; return 0;
} }
@ -2358,7 +2357,7 @@ edit_sort_cmd (WEdit * edit)
edit_save_block (edit, tmp, start_mark, end_mark); edit_save_block (edit, tmp, start_mark, end_mark);
g_free (tmp); g_free (tmp);
exp = input_dialog (_(" Run Sort "), exp = input_dialog (_("Run sort"),
_("Enter sort options (see manpage) separated by whitespace:"), _("Enter sort options (see manpage) separated by whitespace:"),
MC_HISTORY_EDIT_SORT, (old != NULL) ? old : ""); MC_HISTORY_EDIT_SORT, (old != NULL) ? old : "");
@ -2380,7 +2379,7 @@ edit_sort_cmd (WEdit * edit)
{ {
char q[8]; char q[8];
sprintf (q, "%d ", e); sprintf (q, "%d ", e);
tmp = g_strconcat (_(" Sort returned non-zero: "), q, (char *) NULL); tmp = g_strdup_printf (_("Sort returned non-zero: %s"), q);
edit_error_dialog (_("Sort"), tmp); edit_error_dialog (_("Sort"), tmp);
g_free (tmp); g_free (tmp);
} }
@ -2502,7 +2501,7 @@ edit_block_process_cmd (WEdit * edit, const char *shell_cmd, int block)
if (eval_marks (edit, &start_mark, &end_mark)) if (eval_marks (edit, &start_mark, &end_mark))
{ {
edit_error_dialog (_("Process block"), edit_error_dialog (_("Process block"),
_(" You must first highlight a block of text. ")); _("You must first highlight a block of text"));
goto edit_block_process_cmd__EXIT; goto edit_block_process_cmd__EXIT;
} }
edit_save_block (edit, b, start_mark, end_mark); edit_save_block (edit, b, start_mark, end_mark);
@ -2620,13 +2619,13 @@ edit_mail_dialog (WEdit * edit)
/* 0 */ QUICK_BUTTON (6, 10, 9, MAIL_DLG_HEIGHT, N_("&Cancel"), B_CANCEL, NULL), /* 0 */ QUICK_BUTTON (6, 10, 9, MAIL_DLG_HEIGHT, N_("&Cancel"), B_CANCEL, NULL),
/* 1 */ QUICK_BUTTON (2, 10, 9, MAIL_DLG_HEIGHT, N_("&OK"), B_ENTER, NULL), /* 1 */ QUICK_BUTTON (2, 10, 9, MAIL_DLG_HEIGHT, N_("&OK"), B_ENTER, NULL),
/* 2 */ QUICK_INPUT (3, 50, 8, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input", &tmail_cc), /* 2 */ QUICK_INPUT (3, 50, 8, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input", &tmail_cc),
/* 3 */ QUICK_LABEL (2, 50, 7, MAIL_DLG_HEIGHT, N_(" Copies to")), /* 3 */ QUICK_LABEL (3, 50, 7, MAIL_DLG_HEIGHT, N_("Copies to")),
/* 4 */ QUICK_INPUT (3, 50, 6, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input-2", /* 4 */ QUICK_INPUT (3, 50, 6, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input-2",
&tmail_subject), &tmail_subject),
/* 5 */ QUICK_LABEL (2, 50, 5, MAIL_DLG_HEIGHT, N_(" Subject")), /* 5 */ QUICK_LABEL (3, 50, 5, MAIL_DLG_HEIGHT, N_("Subject")),
/* 6 */ QUICK_INPUT (3, 50, 4, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input-3", &tmail_to), /* 6 */ QUICK_INPUT (3, 50, 4, MAIL_DLG_HEIGHT, "", 44, 0, "mail-dlg-input-3", &tmail_to),
/* 7 */ QUICK_LABEL (2, 50, 3, MAIL_DLG_HEIGHT, N_(" To")), /* 7 */ QUICK_LABEL (3, 50, 3, MAIL_DLG_HEIGHT, N_("To")),
/* 8 */ QUICK_LABEL (2, 50, 2, MAIL_DLG_HEIGHT, N_(" mail -s <subject> -c <cc> <to>")), /* 8 */ QUICK_LABEL (3, 50, 2, MAIL_DLG_HEIGHT, N_("mail -s <subject> -c <cc> <to>")),
QUICK_END QUICK_END
}; };
@ -2893,7 +2892,7 @@ edit_select_codepage_cmd (WEdit * edit)
void void
edit_insert_literal_cmd (WEdit * edit) edit_insert_literal_cmd (WEdit * edit)
{ {
int char_for_insertion = editcmd_dialog_raw_key_query (_(" Insert Literal "), int char_for_insertion = editcmd_dialog_raw_key_query (_("Insert literal"),
_("Press any key:"), 0); _("Press any key:"), 0);
edit_execute_key_command (edit, -1, ascii_alpha_to_cntrl (char_for_insertion)); edit_execute_key_command (edit, -1, ascii_alpha_to_cntrl (char_for_insertion));
} }
@ -2902,7 +2901,7 @@ void
edit_execute_macro_cmd (WEdit * edit) edit_execute_macro_cmd (WEdit * edit)
{ {
int command = int command =
CK_Macro (editcmd_dialog_raw_key_query (_(" Execute Macro "), _(" Press macro hotkey: "), CK_Macro (editcmd_dialog_raw_key_query (_("Execute macro"), _("Press macro hotkey:"),
1)); 1));
if (command == CK_Macro (0)) if (command == CK_Macro (0))
command = CK_Insert_Char; command = CK_Insert_Char;
@ -2928,8 +2927,8 @@ edit_load_forward_cmd (WEdit * edit)
{ {
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_(" Current text was modified without a file save. \n" _("Current text was modified without a file save\n"
" Continue discards these changes. "), _("C&ontinue"), _("&Cancel"))) "Continue discards these changes"), _("C&ontinue"), _("&Cancel")))
{ {
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
return 0; return 0;
@ -2966,8 +2965,8 @@ edit_load_back_cmd (WEdit * edit)
{ {
if (edit_query_dialog2 if (edit_query_dialog2
(_("Warning"), (_("Warning"),
_(" Current text was modified without a file save. \n" _("Current text was modified without a file save\n"
" Continue discards these changes. "), _("C&ontinue"), _("&Cancel"))) "Continue discards these changes"), _("C&ontinue"), _("&Cancel")))
{ {
edit->force |= REDRAW_COMPLETELY; edit->force |= REDRAW_COMPLETELY;
return 0; return 0;

Просмотреть файл

@ -123,12 +123,12 @@ editcmd_dialog_replace_show (WEdit * edit, const char *search_default, const cha
/* 7 */ QUICK_RADIO (3, REPLACE_DLG_WIDTH, 7, REPLACE_DLG_HEIGHT, /* 7 */ QUICK_RADIO (3, REPLACE_DLG_WIDTH, 7, REPLACE_DLG_HEIGHT,
num_of_types, (const char **) list_of_types, num_of_types, (const char **) list_of_types,
(int *) &edit_search_options.type), (int *) &edit_search_options.type),
/* 8 */ QUICK_LABEL (2, REPLACE_DLG_WIDTH, 4, REPLACE_DLG_HEIGHT, /* 8 */ QUICK_LABEL (3, REPLACE_DLG_WIDTH, 4, REPLACE_DLG_HEIGHT,
N_("Enter replacement string:")), N_("Enter replacement string:")),
/* 9 */ QUICK_INPUT (3, REPLACE_DLG_WIDTH, 5, REPLACE_DLG_HEIGHT, /* 9 */ QUICK_INPUT (3, REPLACE_DLG_WIDTH, 5, REPLACE_DLG_HEIGHT,
replace_default, REPLACE_DLG_WIDTH - 6, 0, "replace", replace_default, REPLACE_DLG_WIDTH - 6, 0, "replace",
replace_text), replace_text),
/* 10 */ QUICK_LABEL (2, REPLACE_DLG_WIDTH, 2, REPLACE_DLG_HEIGHT, /* 10 */ QUICK_LABEL (3, REPLACE_DLG_WIDTH, 2, REPLACE_DLG_HEIGHT,
N_("Enter search string:")), N_("Enter search string:")),
/* 11 */ QUICK_INPUT (3, REPLACE_DLG_WIDTH, 3, REPLACE_DLG_HEIGHT, /* 11 */ QUICK_INPUT (3, REPLACE_DLG_WIDTH, 3, REPLACE_DLG_HEIGHT,
search_default, REPLACE_DLG_WIDTH - 6, 0, search_default, REPLACE_DLG_WIDTH - 6, 0,
@ -206,7 +206,7 @@ editcmd_dialog_search_show (WEdit * edit, char **search_text)
*search_text, SEARCH_DLG_WIDTH - 6, 0, *search_text, SEARCH_DLG_WIDTH - 6, 0,
MC_HISTORY_SHARED_SEARCH, search_text), MC_HISTORY_SHARED_SEARCH, search_text),
/* 10 */ /* 10 */
QUICK_LABEL (2, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_(" Enter search string:")), QUICK_LABEL (3, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_("Enter search string:")),
QUICK_END QUICK_END
}; };
@ -567,7 +567,7 @@ editcmd_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text
/* 2 */ QUICK_BUTTON (21, dlg_width, 6, dlg_height, N_("A&ll"), B_REPLACE_ALL, NULL), /* 2 */ QUICK_BUTTON (21, dlg_width, 6, dlg_height, N_("A&ll"), B_REPLACE_ALL, NULL),
/* 3 */ QUICK_BUTTON (4, dlg_width, 6, dlg_height, N_("&Replace"), B_ENTER, NULL), /* 3 */ QUICK_BUTTON (4, dlg_width, 6, dlg_height, N_("&Replace"), B_ENTER, NULL),
/* 4 */ QUICK_LABEL (3, dlg_width, 2, dlg_height, NULL), /* 4 */ QUICK_LABEL (3, dlg_width, 2, dlg_height, NULL),
/* 5 */ QUICK_LABEL (2, dlg_width, 3, dlg_height, N_(" Replace with: ")), /* 5 */ QUICK_LABEL (3, dlg_width, 3, dlg_height, N_("Replace with:")),
/* 6 */ QUICK_LABEL (3, dlg_width, 4, dlg_height, NULL), /* 6 */ QUICK_LABEL (3, dlg_width, 4, dlg_height, NULL),
QUICK_END QUICK_END
}; };
@ -594,10 +594,10 @@ editcmd_dialog_replace_prompt_show (WEdit * edit, char *from_text, char *to_text
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
quick_widgets[i].x_divisions = dlg_width; quick_widgets[i].x_divisions = dlg_width;
g_snprintf (tmp, sizeof (tmp), " '%s'", from_text); g_snprintf (tmp, sizeof (tmp), "\"%s\"", from_text);
repl_from = g_strdup (str_fit_to_term (tmp, dlg_width - 7, J_LEFT)); repl_from = g_strdup (str_fit_to_term (tmp, dlg_width - 7, J_LEFT));
g_snprintf (tmp, sizeof (tmp), " '%s'", to_text); g_snprintf (tmp, sizeof (tmp), "\"%s\"", to_text);
repl_to = g_strdup (str_fit_to_term (tmp, dlg_width - 7, J_LEFT)); repl_to = g_strdup (str_fit_to_term (tmp, dlg_width - 7, J_LEFT));
quick_widgets[4].u.label.text = repl_from; quick_widgets[4].u.label.text = repl_from;

Просмотреть файл

@ -195,7 +195,7 @@ edit_lock_file (const char *fname)
|| !(kill (lockinfo->pid, 0) == -1 && errno == ESRCH)) { || !(kill (lockinfo->pid, 0) == -1 && errno == ESRCH)) {
msg = msg =
g_strdup_printf (_ g_strdup_printf (_
("File \"%s\" is already being edited\n" ("File \"%s\" is already being edited.\n"
"User: %s\nProcess ID: %d"), x_basename (lockfname) + 2, "User: %s\nProcess ID: %d"), x_basename (lockfname) + 2,
lockinfo->who, (int) lockinfo->pid); lockinfo->who, (int) lockinfo->pid);
/* TODO: Implement "Abort" - needs to rewind undo stack */ /* TODO: Implement "Abort" - needs to rewind undo stack */

Просмотреть файл

@ -643,7 +643,7 @@ regex_command (const char *filename, const char *action, int *move_dir)
message (D_ERROR, title, message (D_ERROR, title,
_("The format of the ~/%s file has " _("The format of the ~/%s file has "
"changed with version 3.0. You may either want to copy " "changed with version 3.0. You may either want to copy "
"it from %smc.ext or use that file as an example of how " "to write it."), "it from %smc.ext or use that file as an example of how to write it."),
MC_USERCONF_DIR PATH_SEP_STR MC_FILEBIND_FILE, mc_home); MC_USERCONF_DIR PATH_SEP_STR MC_FILEBIND_FILE, mc_home);
g_free (title); g_free (title);
} }

Просмотреть файл

@ -299,7 +299,7 @@ make_symlink (FileOpContext * ctx, const char *src_path, const char *dst_path)
{ {
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_("Cannot make stable symlinks across" _("Cannot make stable symlinks across"
"non-local filesystems: \n\n" " Option Stable Symlinks will be disabled ")); "non-local filesystems:\n\nOption Stable Symlinks will be disabled"));
ctx->stable_symlinks = FALSE; ctx->stable_symlinks = FALSE;
} }
@ -540,7 +540,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
{ {
/* Destination already exists */ /* Destination already exists */
if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino) if (sb.st_dev == sb2.st_dev && sb.st_ino == sb2.st_ino)
return warn_same_file (_(" `%s' \n and \n `%s' \n are the same file "), return warn_same_file (_("\"%s\"\nand\n\"%s\"\nare the same file"),
src_path, dst_path); src_path, dst_path);
/* Should we replace destination? */ /* Should we replace destination? */
if (tctx->ask_overwrite) if (tctx->ask_overwrite)
@ -919,7 +919,7 @@ copy_dir_dir (FileOpTotalContext * tctx, FileOpContext * ctx, const char *s, con
if (is_in_linklist (parent_dirs, s, &cbuf)) if (is_in_linklist (parent_dirs, s, &cbuf))
{ {
/* we found a cyclic symbolic link */ /* we found a cyclic symbolic link */
message (D_ERROR, MSG_ERROR, _(" Cannot copy cyclic symbolic link \n `%s' "), s); message (D_ERROR, MSG_ERROR, _("Cannot copy cyclic symbolic link\n\"%s\""), s);
return_status = FILE_SKIP; return_status = FILE_SKIP;
goto ret_fast; goto ret_fast;
} }
@ -1131,11 +1131,11 @@ move_file_file (FileOpTotalContext * tctx, FileOpContext * ctx, const char *s, c
if (mc_lstat (d, &dst_stats) == 0) if (mc_lstat (d, &dst_stats) == 0)
{ {
if (src_stats.st_dev == dst_stats.st_dev && src_stats.st_ino == dst_stats.st_ino) if (src_stats.st_dev == dst_stats.st_dev && src_stats.st_ino == dst_stats.st_ino)
return warn_same_file (_(" `%s' \n and \n `%s' \n are the same file "), s, d); return warn_same_file (_("\"%s\"\nand\n\"%s\"\nare the same file"), s, d);
if (S_ISDIR (dst_stats.st_mode)) if (S_ISDIR (dst_stats.st_mode))
{ {
message (D_ERROR, MSG_ERROR, _(" Cannot overwrite directory `%s' "), d); message (D_ERROR, MSG_ERROR, _("Cannot overwrite directory \"%s\""), d);
do_refresh (); do_refresh ();
return FILE_SKIP; return FILE_SKIP;
} }
@ -1235,7 +1235,7 @@ move_dir_dir (FileOpTotalContext * tctx, FileOpContext * ctx, const char *s, con
dstat_ok = (mc_stat (d, &dbuf) == 0); dstat_ok = (mc_stat (d, &dbuf) == 0);
if (dstat_ok && sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino) if (dstat_ok && sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino)
return warn_same_file (_(" `%s' \n and \n `%s' \n are the same directory "), s, d); return warn_same_file (_("\"%s\"\nand\n\"%s\"\nare the same directory"), s, d);
if (!dstat_ok) if (!dstat_ok)
destdir = g_strdup (d); /* destination doesn't exist */ destdir = g_strdup (d); /* destination doesn't exist */
@ -1262,9 +1262,9 @@ move_dir_dir (FileOpTotalContext * tctx, FileOpContext * ctx, const char *s, con
else else
{ {
if (S_ISDIR (destbuf.st_mode)) if (S_ISDIR (destbuf.st_mode))
return_status = file_error (_(" Cannot overwrite directory \"%s\" %s "), destdir); return_status = file_error (_("Cannot overwrite directory \"%s\"\n%s"), destdir);
else else
return_status = file_error (_(" Cannot overwrite file \"%s\" %s "), destdir); return_status = file_error (_("Cannot overwrite file \"%s\"\n%s"), destdir);
if (return_status == FILE_RETRY) if (return_status == FILE_RETRY)
goto retry_dst_stat; goto retry_dst_stat;
} }
@ -1853,6 +1853,7 @@ static const char *prompt_parts[] = {
N_("directory"), N_("directory"),
N_("directories"), N_("directories"),
N_("files/directories"), N_("files/directories"),
/* TRANSLATORS: keep leading space here to split words in Copy/Move dialog */
N_(" with source mask:"), N_(" with source mask:"),
N_("to:") N_("to:")
}; };
@ -2492,10 +2493,9 @@ real_query_recursive (FileOpContext * ctx, enum OperationMode mode, const char *
if (ctx->recursive_result < RECURSIVE_ALWAYS) if (ctx->recursive_result < RECURSIVE_ALWAYS)
{ {
const char *msg = mode == Foreground const char *msg = mode == Foreground
? _("\n Directory not empty. \n" ? _("\nDirectory not empty.\nDelete it recursively?")
" Delete it recursively? ") : _("\nBackground process: Directory not empty.\nDelete it recursively?");
: _("\n Background process: Directory not empty \n" " Delete it recursively? "); text = g_strconcat (_("Delete:"), " ", path_trunc (s, 30), (char *) NULL);
text = g_strconcat (_(" Delete: "), path_trunc (s, 30), " ", (char *) NULL);
if (safe_delete) if (safe_delete)
query_set_sel (1); query_set_sel (1);

Просмотреть файл

@ -538,8 +538,6 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, double
file_eta_prepare_for_show (buffer3, tctx->eta_secs, TRUE); file_eta_prepare_for_show (buffer3, tctx->eta_secs, TRUE);
file_bps_prepare_for_show (buffer4, (long) tctx->bps); file_bps_prepare_for_show (buffer4, (long) tctx->bps);
g_snprintf (buffer, BUF_TINY, _("Time: %s %s (%s)"), buffer2, buffer3, buffer4); g_snprintf (buffer, BUF_TINY, _("Time: %s %s (%s)"), buffer2, buffer3, buffer4);
label_set_text (ui->time_label, buffer); label_set_text (ui->time_label, buffer);

Просмотреть файл

@ -184,6 +184,7 @@ static void add_dotdot_to_list (void);
static void static void
hotlist_refresh (Dlg_head * dlg) hotlist_refresh (Dlg_head * dlg)
{ {
/* TODO: use groupboxes here */
common_dialog_repaint (dlg); common_dialog_repaint (dlg);
tty_setcolor (COLOR_NORMAL); tty_setcolor (COLOR_NORMAL);
draw_box (dlg, 2, 5, dlg->lines - (hotlist_state.moving ? 6 : 10), dlg->cols - (UX * 2), TRUE); draw_box (dlg, 2, 5, dlg->lines - (hotlist_state.moving ? 6 : 10), dlg->cols - (UX * 2), TRUE);
@ -721,12 +722,15 @@ init_hotlist (int list_type)
add_widget_autopos (hotlist_dlg, pname, WPOS_KEEP_BOTTOM | WPOS_KEEP_LEFT); add_widget_autopos (hotlist_dlg, pname, WPOS_KEEP_BOTTOM | WPOS_KEEP_LEFT);
if (!hotlist_state.moving) if (!hotlist_state.moving)
{ {
char label_text[BUF_TINY];
g_snprintf (label_text, sizeof (label_text), " %s ", _("Directory path"));
add_widget_autopos (hotlist_dlg, add_widget_autopos (hotlist_dlg,
label_new (UY - 12 + LINES, UX + 1, label_new (UY - 12 + LINES, UX + 2,
_(" Directory path ")), WPOS_KEEP_BOTTOM | WPOS_KEEP_LEFT); label_text), WPOS_KEEP_BOTTOM | WPOS_KEEP_LEFT);
/* This one holds the displayed pathname */ /* This one holds the displayed pathname */
pname_group = label_new (UY, UX + 1, _(" Directory label ")); pname_group = label_new (UY, UX + 2, _("Directory label"));
add_widget (hotlist_dlg, pname_group); add_widget (hotlist_dlg, pname_group);
} }
/* get new listbox */ /* get new listbox */
@ -775,7 +779,7 @@ init_movelist (int list_type, struct hotlist *item)
/* We add the labels. We are interested in the last one, /* We add the labels. We are interested in the last one,
* that one will hold the path name label * that one will hold the path name label
*/ */
movelist_group = label_new (UY, UX + 1, _(" Directory label ")); movelist_group = label_new (UY, UX + 2, _("Directory label"));
add_widget (movelist_dlg, movelist_group); add_widget (movelist_dlg, movelist_group);
/* get new listbox */ /* get new listbox */
l_movelist = l_movelist =
@ -936,9 +940,9 @@ add_new_entry_input (const char *header, const char *text1, const char *text2,
/* 1 */ QUICK_BUTTON (30, 80, RELATIVE_Y_BUTTONS, 0, N_("&Insert"), B_INSERT, NULL), /* 1 */ QUICK_BUTTON (30, 80, RELATIVE_Y_BUTTONS, 0, N_("&Insert"), B_INSERT, NULL),
/* 2 */ QUICK_BUTTON (10, 80, RELATIVE_Y_BUTTONS, 0, N_("&Append"), B_APPEND, NULL), /* 2 */ QUICK_BUTTON (10, 80, RELATIVE_Y_BUTTONS, 0, N_("&Append"), B_APPEND, NULL),
/* 3 */ QUICK_INPUT (4, 80, RELATIVE_Y_INPUT_PTH, 0, *r2, 58, 2, "input-pth", r2), /* 3 */ QUICK_INPUT (4, 80, RELATIVE_Y_INPUT_PTH, 0, *r2, 58, 2, "input-pth", r2),
/* 4 */ QUICK_LABEL (RELATIVE_Y_LABEL_PTH, 80, 3, 0, text2), /* 4 */ QUICK_LABEL (4, 80, 3, 0, text2),
/* 5 */ QUICK_INPUT (4, 80, 3, 0, *r1, 58, 0, "input-lbl", r1), /* 5 */ QUICK_INPUT (4, 80, 3, 0, *r1, 58, 0, "input-lbl", r1),
/* 6 */ QUICK_LABEL (3, 80, 2, 0, text1), /* 6 */ QUICK_LABEL (4, 80, 2, 0, text1),
QUICK_END QUICK_END
}; };
@ -998,8 +1002,8 @@ add_new_entry_cmd (void)
/* Take current directory as default value for input fields */ /* Take current directory as default value for input fields */
to_free = title = url = strip_password (g_strdup (current_panel->cwd), 1); to_free = title = url = strip_password (g_strdup (current_panel->cwd), 1);
ret = add_new_entry_input (_("New hotlist entry"), _("Directory label"), ret = add_new_entry_input (_("New hotlist entry"), _("Directory label:"),
_("Directory path"), "[Hotlist]", &title, &url); _("Directory path:"), "[Hotlist]", &title, &url);
g_free (to_free); g_free (to_free);
if (!ret) if (!ret)
@ -1027,7 +1031,7 @@ add_new_group_input (const char *header, const char *label, char **result)
/* 1 */ QUICK_BUTTON (30, 80, 1, 0, N_("&Insert"), B_INSERT, NULL), /* 1 */ QUICK_BUTTON (30, 80, 1, 0, N_("&Insert"), B_INSERT, NULL),
/* 2 */ QUICK_BUTTON (10, 80, 1, 0, N_("&Append"), B_APPEND, NULL), /* 2 */ QUICK_BUTTON (10, 80, 1, 0, N_("&Append"), B_APPEND, NULL),
/* 3 */ QUICK_INPUT (4, 80, 0, 0, "", 58, 0, "input", result), /* 3 */ QUICK_INPUT (4, 80, 0, 0, "", 58, 0, "input", result),
/* 4 */ QUICK_LABEL (3, 80, 2, 0, label), /* 4 */ QUICK_LABEL (4, 80, 2, 0, label),
QUICK_END QUICK_END
}; };
@ -1078,7 +1082,7 @@ add_new_group_cmd (void)
char *label; char *label;
int ret; int ret;
ret = add_new_group_input (_(" New hotlist group "), _("Name of new group"), &label); ret = add_new_group_input (_("New hotlist group"), _("Name of new group:"), &label);
if (!ret || !label || !*label) if (!ret || !label || !*label)
return; return;
@ -1149,12 +1153,12 @@ remove_from_hotlist (struct hotlist *entry)
char *title; char *title;
int result; int result;
title = g_strconcat (_(" Remove: "), str_trunc (entry->label, 30), " ", (char *) NULL); title = g_strconcat (_("Remove:"), " ", str_trunc (entry->label, 30), (char *) NULL);
if (safe_delete) if (safe_delete)
query_set_sel (1); query_set_sel (1);
result = query_dialog (title, result = query_dialog (title,
_("\n Are you sure you want to remove this entry?"), _("Are you sure you want to remove this entry?"),
D_ERROR, 2, _("&Yes"), _("&No")); D_ERROR, 2, _("&Yes"), _("&No"));
g_free (title); g_free (title);
@ -1170,8 +1174,8 @@ remove_from_hotlist (struct hotlist *entry)
char *header; char *header;
int result; int result;
header = g_strconcat (_(" Remove: "), str_trunc (entry->label, 30), " ", (char *) NULL); header = g_strconcat (_("Remove:"), " ", str_trunc (entry->label, 30), (char *) NULL);
result = query_dialog (header, _("\n Group not empty.\n Remove it?"), result = query_dialog (header, _("Group not empty.\nRemove it?"),
D_ERROR, 2, _("&Yes"), _("&No")); D_ERROR, 2, _("&Yes"), _("&No"));
g_free (header); g_free (header);
@ -1559,8 +1563,7 @@ load_hotlist (void)
remove_old_list = 1; remove_old_list = 1;
else else
message (D_ERROR, _("Hotlist Load"), message (D_ERROR, _("Hotlist Load"),
_ _("MC was unable to write ~/%s file,\nyour old hotlist entries were not deleted"),
("MC was unable to write ~/%s file, your old hotlist entries were not deleted"),
MC_USERCONF_DIR PATH_SEP_STR MC_HOTLIST_FILE); MC_USERCONF_DIR PATH_SEP_STR MC_HOTLIST_FILE);
} }
else else

Просмотреть файл

@ -1738,7 +1738,7 @@ parse_display_format (WPanel * panel, const char *format, char **error, int isst
int pos = min (8, strlen (format)); int pos = min (8, strlen (format));
delete_format (home); delete_format (home);
tmp_format[pos] = 0; tmp_format[pos] = 0;
*error = g_strconcat (_("Unknown tag on display format: "), tmp_format, (char *) NULL); *error = g_strconcat (_("Unknown tag on display format:"), " ", tmp_format, (char *) NULL);
g_free (tmp_format); g_free (tmp_format);
return 0; return 0;
} }
@ -3454,7 +3454,7 @@ set_panel_encoding (WPanel * panel)
{ {
cd_path = add_encoding_to_path (panel->cwd, encoding); cd_path = add_encoding_to_path (panel->cwd, encoding);
if (!do_panel_cd (panel, cd_path, 0)) if (!do_panel_cd (panel, cd_path, 0))
message (D_ERROR, MSG_ERROR, _(" Cannot chdir to %s "), cd_path); message (D_ERROR, MSG_ERROR, _("Cannot chdir to \"%s\""), cd_path);
g_free (cd_path); g_free (cd_path);
} }
} }

Просмотреть файл

@ -759,7 +759,7 @@ user_menu_cmd (struct WEdit *edit_widget)
if (!vfs_current_is_local ()){ if (!vfs_current_is_local ()){
message (D_ERROR, MSG_ERROR, message (D_ERROR, MSG_ERROR,
_(" Cannot execute commands on non-local filesystems")); "%s", _("Cannot execute commands on non-local filesystems"));
return; return;
} }

Просмотреть файл

@ -105,7 +105,7 @@ mcview_dialog_search (mcview_t * view)
(int *) &mcview_search_options.type), (int *) &mcview_search_options.type),
QUICK_INPUT (3, SEARCH_DLG_WIDTH, 3, SEARCH_DLG_HEIGHT, QUICK_INPUT (3, SEARCH_DLG_WIDTH, 3, SEARCH_DLG_HEIGHT,
INPUT_LAST_TEXT, SEARCH_DLG_WIDTH - 6, 0, MC_HISTORY_SHARED_SEARCH, &exp), INPUT_LAST_TEXT, SEARCH_DLG_WIDTH - 6, 0, MC_HISTORY_SHARED_SEARCH, &exp),
QUICK_LABEL (2, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_(" Enter search string:")), QUICK_LABEL (3, SEARCH_DLG_WIDTH, 2, SEARCH_DLG_HEIGHT, N_("Enter search string:")),
QUICK_END QUICK_END
}; };

Просмотреть файл

@ -378,7 +378,7 @@ mcview_hexedit_save_changes (mcview_t * view)
if (mc_close (fp) == -1) if (mc_close (fp) == -1)
message (D_ERROR, _("Save file"), message (D_ERROR, _("Save file"),
_("Error while closing the file:\n%s\n" _("Error while closing the file:\n%s\n"
" Data may have been written or not. "), unix_error_string (errno)); "Data may have been written or not"), unix_error_string (errno));
view->dirty++; view->dirty++;
return TRUE; return TRUE;

Просмотреть файл

@ -1548,9 +1548,9 @@ push_history (WInput * in, const char *text)
/* input widget where urls with passwords are entered without any /* input widget where urls with passwords are entered without any
vfs prefix */ vfs prefix */
const char *password_input_fields[] = { const char *password_input_fields[] = {
N_(" Link to a remote machine "), " Link to a remote machine ",
N_(" FTP to machine "), " FTP to machine ",
N_(" SMB link to machine ") " SMB link to machine "
}; };
const size_t ELEMENTS = (sizeof (password_input_fields) / sizeof (password_input_fields[0])); const size_t ELEMENTS = (sizeof (password_input_fields) / sizeof (password_input_fields[0]));
@ -1573,6 +1573,8 @@ push_history (WInput * in, const char *text)
if (in->history_name != NULL) if (in->history_name != NULL)
{ {
/* FIXME: It is the strange code. Rewrite is needed. */
const char *p = in->history_name + 3; const char *p = in->history_name + 3;
for (i = 0; i < ELEMENTS; i++) for (i = 0; i < ELEMENTS; i++)