mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
More usage of gettext context.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
055bff485e
commit
562ad3e84b
@ -292,16 +292,16 @@ edit_labels (WEdit *edit)
|
||||
{
|
||||
Dlg_head *h = edit->widget.parent;
|
||||
|
||||
edit_my_define (h, 1, _("Help"), cmd_F1, edit);
|
||||
edit_my_define (h, 2, _("Save"), cmd_F2, edit);
|
||||
edit_my_define (h, 3, _("Mark"), cmd_F3, edit);
|
||||
edit_my_define (h, 4, _("Replac"), cmd_F4, edit);
|
||||
edit_my_define (h, 5, _("Copy"), cmd_F5, edit);
|
||||
edit_my_define (h, 6, _("Move"), cmd_F6, edit);
|
||||
edit_my_define (h, 7, _("Search"), cmd_F7, edit);
|
||||
edit_my_define (h, 8, _("Delete"), cmd_F8, edit);
|
||||
edit_my_define (h, 9, _("PullDn"), edit_menu_cmd, edit);
|
||||
edit_my_define (h, 10, _("Quit"), cmd_F10, edit);
|
||||
edit_my_define (h, 1, Q_("ButtonBar|Help"), cmd_F1, edit);
|
||||
edit_my_define (h, 2, Q_("ButtonBar|Save"), cmd_F2, edit);
|
||||
edit_my_define (h, 3, Q_("ButtonBar|Mark"), cmd_F3, edit);
|
||||
edit_my_define (h, 4, Q_("ButtonBar|Replac"), cmd_F4, edit);
|
||||
edit_my_define (h, 5, Q_("ButtonBar|Copy"), cmd_F5, edit);
|
||||
edit_my_define (h, 6, Q_("ButtonBar|Move"), cmd_F6, edit);
|
||||
edit_my_define (h, 7, Q_("ButtonBar|Search"), cmd_F7, edit);
|
||||
edit_my_define (h, 8, Q_("ButtonBar|Delete"), cmd_F8, edit);
|
||||
edit_my_define (h, 9, Q_("ButtonBar|PullDn"), edit_menu_cmd, edit);
|
||||
edit_my_define (h, 10, Q_("ButtonBar|Quit"), cmd_F10, edit);
|
||||
|
||||
buttonbar_redraw (h);
|
||||
}
|
||||
|
25
src/file.c
25
src/file.c
@ -123,12 +123,13 @@ static struct link *erase_list;
|
||||
* Both lists don't use the linkcount and name structure members of struct
|
||||
* link.
|
||||
*/
|
||||
static struct link *dest_dirs = 0;
|
||||
static struct link *dest_dirs = NULL;
|
||||
|
||||
/* TRANSLATORS: no need to translate 'DialogTitle', it's just a context prefix */
|
||||
const char *op_names[3] = {
|
||||
N_(" Copy "),
|
||||
N_(" Move "),
|
||||
N_(" Delete ")
|
||||
N_("DialogTitle|Copy"),
|
||||
N_("DialogTitle|Move"),
|
||||
N_("DialogTitle|Delete")
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@ -144,10 +145,6 @@ static FileProgressStatus erase_file (FileOpContext *ctx, const char *s,
|
||||
static FileProgressStatus files_error (const char *format, const char *file1,
|
||||
const char *file2);
|
||||
|
||||
|
||||
enum CaseConvs { NO_CONV = 0, UP_CHAR = 1, LOW_CHAR = 2, UP_SECT =
|
||||
4, LOW_SECT = 8 };
|
||||
|
||||
static FileProgressStatus transform_error = FILE_CONT;
|
||||
|
||||
static char *
|
||||
@ -715,7 +712,7 @@ copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path,
|
||||
if (dst_status == DEST_SHORT) {
|
||||
/* Remove short file */
|
||||
int result;
|
||||
result = query_dialog (_("Copy"),
|
||||
result = query_dialog (Q_("DialogTitle|Copy"),
|
||||
_("Incomplete file was retrieved. Keep it?"),
|
||||
D_ERROR, 2, _("&Delete"), _("&Keep"));
|
||||
if (!result)
|
||||
@ -1631,11 +1628,11 @@ panel_compute_totals (WPanel *panel, const void *ui,
|
||||
* dropped, when widgets get smarter)
|
||||
*/
|
||||
|
||||
/* TRANSLATORS: no need to translate 'fileop', it's just a context prefix */
|
||||
/* TRANSLATORS: no need to translate 'FileOperation', it's just a context prefix */
|
||||
static const char *op_names1[] = {
|
||||
N_("fileop|Copy"),
|
||||
N_("fileop|Move"),
|
||||
N_("fileop|Delete")
|
||||
N_("FileOperation|Copy"),
|
||||
N_("FileOperation|Move"),
|
||||
N_("FileOperation|Delete")
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1892,7 +1889,7 @@ panel_operate (void *source_panel, FileOperation operation,
|
||||
if (safe_delete)
|
||||
query_set_sel (1);
|
||||
|
||||
i = query_dialog (_(op_names[operation]), fmd_buf, D_ERROR, 2,
|
||||
i = query_dialog (Q_(op_names[operation]), fmd_buf, D_ERROR, 2,
|
||||
_("&Yes"), _("&No"));
|
||||
|
||||
if (i != 0) {
|
||||
|
@ -884,16 +884,16 @@ interactive_display (const char *filename, const char *node)
|
||||
add_widget (whelp, md);
|
||||
add_widget (whelp, help_bar);
|
||||
|
||||
buttonbar_set_label_data (whelp, 1, _("Help"), help_help_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 2, _("Index"), help_index_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 3, _("Prev"), prev_node_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 1, Q_("ButtonBar|Help"), help_help_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 2, Q_("ButtonBar|Index"), help_index_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 3, Q_("ButtonBar|Prev"), prev_node_cmd, whelp);
|
||||
buttonbar_clear_label (whelp, 4);
|
||||
buttonbar_clear_label (whelp, 5);
|
||||
buttonbar_clear_label (whelp, 6);
|
||||
buttonbar_clear_label (whelp, 7);
|
||||
buttonbar_clear_label (whelp, 8);
|
||||
buttonbar_clear_label (whelp, 9);
|
||||
buttonbar_set_label_data (whelp, 10, _("Quit"), help_quit_cmd, whelp);
|
||||
buttonbar_set_label_data (whelp, 10, Q_("ButtonBar|Quit"), help_quit_cmd, whelp);
|
||||
|
||||
run_dlg (whelp);
|
||||
interactive_display_finish ();
|
||||
|
@ -1101,10 +1101,10 @@ copy_other_tagged (void)
|
||||
static void
|
||||
init_labels (void)
|
||||
{
|
||||
buttonbar_set_label (midnight_dlg, 1, _("Help"), help_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 2, _("Menu"), user_file_menu_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 9, _("PullDn"), menu_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 10, _("Quit"), quit_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 1, Q_("ButtonBar|Help"), help_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 2, Q_("ButtonBar|Menu"), user_file_menu_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 9, Q_("ButtonBar|PullDn"), menu_cmd);
|
||||
buttonbar_set_label (midnight_dlg, 10, Q_("ButtonBar|Quit"), quit_cmd);
|
||||
}
|
||||
|
||||
static int ctl_x_map_enabled = 0;
|
||||
|
16
src/screen.c
16
src/screen.c
@ -2826,14 +2826,14 @@ panel_callback (Widget *w, widget_msg_t msg, int parm)
|
||||
paint_dir (panel);
|
||||
panel->dirty = 0;
|
||||
|
||||
buttonbar_set_label (h, 1, _("Help"), help_cmd);
|
||||
buttonbar_set_label (h, 2, _("Menu"), user_file_menu_cmd);
|
||||
buttonbar_set_label (h, 3, _("View"), view_cmd);
|
||||
buttonbar_set_label (h, 4, _("Edit"), edit_cmd);
|
||||
buttonbar_set_label (h, 5, _("Copy"), copy_cmd);
|
||||
buttonbar_set_label (h, 6, _("RenMov"), ren_cmd);
|
||||
buttonbar_set_label (h, 7, _("Mkdir"), mkdir_cmd);
|
||||
buttonbar_set_label (h, 8, _("Delete"), delete_cmd);
|
||||
buttonbar_set_label (h, 1, Q_("ButtonBar|Help"), help_cmd);
|
||||
buttonbar_set_label (h, 2, Q_("ButtonBar|Menu"), user_file_menu_cmd);
|
||||
buttonbar_set_label (h, 3, Q_("ButtonBar|View"), view_cmd);
|
||||
buttonbar_set_label (h, 4, Q_("ButtonBar|Edit"), edit_cmd);
|
||||
buttonbar_set_label (h, 5, Q_("ButtonBar|Copy"), copy_cmd);
|
||||
buttonbar_set_label (h, 6, Q_("ButtonBar|RenMov"), ren_cmd);
|
||||
buttonbar_set_label (h, 7, Q_("ButtonBar|Mkdir"), mkdir_cmd);
|
||||
buttonbar_set_label (h, 8, Q_("ButtonBar|Delete"), delete_cmd);
|
||||
buttonbar_redraw (h);
|
||||
return MSG_HANDLED;
|
||||
|
||||
|
22
src/tree.c
22
src/tree.c
@ -622,7 +622,7 @@ tree_copy (WTree *tree, const char *default_dest)
|
||||
|
||||
g_snprintf (msg, sizeof (msg), _("Copy \"%s\" directory to:"),
|
||||
str_trunc (tree->selected_ptr->name, 50));
|
||||
dest = input_expand_dialog (_(" Copy "), msg, MC_HISTORY_FM_TREE_COPY, default_dest);
|
||||
dest = input_expand_dialog (Q_("DialogTitle|Copy"), msg, MC_HISTORY_FM_TREE_COPY, default_dest);
|
||||
|
||||
if (dest != NULL && *dest != '\0') {
|
||||
ctx = file_op_context_new (OP_COPY);
|
||||
@ -662,7 +662,7 @@ tree_move (WTree *tree, const char *default_dest)
|
||||
|
||||
g_snprintf (msg, sizeof (msg), _("Move \"%s\" directory to:"),
|
||||
str_trunc (tree->selected_ptr->name, 50));
|
||||
dest = input_expand_dialog (_(" Move "), msg, MC_HISTORY_FM_TREE_MOVE, default_dest);
|
||||
dest = input_expand_dialog (Q_("DialogTitle|Move"), msg, MC_HISTORY_FM_TREE_MOVE, default_dest);
|
||||
|
||||
if (dest == NULL || *dest == '\0') {
|
||||
g_free (dest);
|
||||
@ -735,7 +735,7 @@ tree_rmdir_cmd (WTree *tree)
|
||||
g_strdup_printf (_(" Delete %s? "),
|
||||
tree->selected_ptr->name);
|
||||
result =
|
||||
query_dialog (_(" Delete "), buf, D_ERROR, 2, _("&Yes"), _("&No"));
|
||||
query_dialog (Q_("DialogTitle|Delete"), buf, D_ERROR, 2, _("&Yes"), _("&No"));
|
||||
g_free (buf);
|
||||
if (result != 0)
|
||||
return;
|
||||
@ -764,7 +764,7 @@ static void
|
||||
set_navig_label (WTree *tree)
|
||||
{
|
||||
buttonbar_set_label_data (tree->widget.parent, 4,
|
||||
tree_navigation_flag ? _("Static") : _("Dynamc"),
|
||||
tree_navigation_flag ? Q_("ButtonBar|Static") : Q_("ButtonBar|Dynamc"),
|
||||
tree_toggle_navig, tree);
|
||||
}
|
||||
|
||||
@ -1020,19 +1020,19 @@ tree_callback (Widget *w, widget_msg_t msg, int parm)
|
||||
|
||||
case WIDGET_FOCUS:
|
||||
tree->active = 1;
|
||||
buttonbar_set_label (h, 1, _("Help"), tree_help_cmd);
|
||||
buttonbar_set_label_data (h, 2, _("Rescan"),
|
||||
buttonbar_set_label (h, 1, Q_("ButtonBar|Help"), tree_help_cmd);
|
||||
buttonbar_set_label_data (h, 2, Q_("ButtonBar|Rescan"),
|
||||
tree_rescan_command, tree);
|
||||
buttonbar_set_label_data (h, 3, _("Forget"), tree_forget_cmd, tree);
|
||||
buttonbar_set_label_data (h, 5, _("Copy"), tree_copy_cmd, tree);
|
||||
buttonbar_set_label_data (h, 6, _("RenMov"), tree_move_cmd, tree);
|
||||
buttonbar_set_label_data (h, 3, Q_("ButtonBar|Forget"), tree_forget_cmd, tree);
|
||||
buttonbar_set_label_data (h, 5, Q_("ButtonBar|Copy"), tree_copy_cmd, tree);
|
||||
buttonbar_set_label_data (h, 6, Q_("ButtonBar|RenMov"), tree_move_cmd, tree);
|
||||
#if 0
|
||||
/* FIXME: mkdir is currently defunct */
|
||||
buttonbar_set_label_data (h, 7, _("Mkdir"), tree_mkdir_cmd, tree);
|
||||
buttonbar_set_label_data (h, 7, Q_("ButtonBar|Mkdir"), tree_mkdir_cmd, tree);
|
||||
#else
|
||||
buttonbar_clear_label (h, 7);
|
||||
#endif
|
||||
buttonbar_set_label_data (h, 8, _("Rmdir"), tree_rmdir_command, tree);
|
||||
buttonbar_set_label_data (h, 8, Q_("ButtonBar|Rmdir"), tree_rmdir_command, tree);
|
||||
set_navig_label (tree);
|
||||
buttonbar_redraw (h);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user