Remove gettext marks from debug messages.
Add translator comments for short statusbar messages. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1512 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
4f5335d93e
commit
f9390afbd1
|
@ -4,6 +4,10 @@ CVS code -
|
||||||
- Change uncast nrealloc()s assigned to char pointers/arrays to
|
- Change uncast nrealloc()s assigned to char pointers/arrays to
|
||||||
charealloc()s, and cast all other nrealloc()s and all
|
charealloc()s, and cast all other nrealloc()s and all
|
||||||
nmalloc()s. (David Benbennick and DLR)
|
nmalloc()s. (David Benbennick and DLR)
|
||||||
|
- Remove gettext marks from all debug messages. Good for developers,
|
||||||
|
better for translators. (Jordi)
|
||||||
|
- Add translator comments on strings that should be short, like in
|
||||||
|
status bar strings, etc. (Jordi)
|
||||||
- utils.c:
|
- utils.c:
|
||||||
align()
|
align()
|
||||||
- Tweak to avoid a potential problem when strp is non-NULL but
|
- Tweak to avoid a potential problem when strp is non-NULL but
|
||||||
|
|
2
color.c
2
color.c
|
@ -91,7 +91,7 @@ void do_colorinit(void)
|
||||||
init_pair(tmpcolor->pairnum, tmpcolor->fg, background);
|
init_pair(tmpcolor->pairnum, tmpcolor->fg, background);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Running %s with fg = %d and bg = %d\n"),
|
fprintf(stderr, "Running %s with fg = %d and bg = %d\n",
|
||||||
"init_pair()", tmpcolor->fg, tmpcolor->bg);
|
"init_pair()", tmpcolor->fg, tmpcolor->bg);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
4
cut.c
4
cut.c
|
@ -46,7 +46,7 @@ filestruct *get_cutbottom(void)
|
||||||
void add_to_cutbuffer(filestruct *inptr)
|
void add_to_cutbuffer(filestruct *inptr)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("add_to_cutbuffer() called with inptr->data = %s\n"),
|
fprintf(stderr, "add_to_cutbuffer() called with inptr->data = %s\n",
|
||||||
inptr->data);
|
inptr->data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ int do_cut_text(void)
|
||||||
concatenate_cut = 0;
|
concatenate_cut = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Blew away cutbuffer =)\n"));
|
fprintf(stderr, "Blew away cutbuffer =)\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
24
files.c
24
files.c
|
@ -476,7 +476,7 @@ int do_insertfile(int loading_file)
|
||||||
if (i != -1) {
|
if (i != -1) {
|
||||||
inspath = mallocstrcpy(inspath, answer);
|
inspath = mallocstrcpy(inspath, answer);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), answer);
|
fprintf(stderr, "filename is %s\n", answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
@ -701,12 +701,12 @@ void free_openfilestruct(openfilestruct *src)
|
||||||
src = src->next;
|
src = src->next;
|
||||||
delete_opennode(src->prev);
|
delete_opennode(src->prev);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: free'd a node, YAY!\n"), "delete_opennode()");
|
fprintf(stderr, "%s: free'd a node, YAY!\n", "delete_opennode()");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
delete_opennode(src);
|
delete_opennode(src);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: free'd last node.\n"), "delete_opennode()");
|
fprintf(stderr, "%s: free'd last node.\n", "delete_opennode()");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -733,7 +733,7 @@ int add_open_file(int update)
|
||||||
open_files and splice it in after the current one */
|
open_files and splice it in after the current one */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tmp = make_new_opennode(NULL);
|
tmp = make_new_opennode(NULL);
|
||||||
|
@ -790,7 +790,7 @@ int add_open_file(int update)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -878,7 +878,7 @@ int open_prevfile(int closing_file)
|
||||||
open_files = open_files->prev;
|
open_files = open_files->prev;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ int open_prevfile(int closing_file)
|
||||||
open_files = open_files->next;
|
open_files = open_files->next;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -941,7 +941,7 @@ int open_nextfile(int closing_file)
|
||||||
open_files = open_files->next;
|
open_files = open_files->next;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -952,7 +952,7 @@ int open_nextfile(int closing_file)
|
||||||
open_files = open_files->prev;
|
open_files = open_files->prev;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), open_files->filename);
|
fprintf(stderr, "filename is %s\n", open_files->filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1398,7 +1398,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Backing up %s to %s\n"), realname, backupname);
|
fprintf(stderr, "Backing up %s to %s\n", realname, backupname);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* copy the file */
|
/* copy the file */
|
||||||
|
@ -1513,7 +1513,7 @@ int write_file(const char *name, int tmp, int append, int nonamechange)
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else
|
else
|
||||||
fprintf(stderr, _("Wrote >%s\n"), fileptr->data);
|
fprintf(stderr, "Wrote >%s\n", fileptr->data);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
if (ISSET(DOS_FILE) || ISSET(MAC_FILE))
|
if (ISSET(DOS_FILE) || ISSET(MAC_FILE))
|
||||||
|
@ -1812,7 +1812,7 @@ int do_writeout(const char *path, int exiting, int append)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s\n"), answer);
|
fprintf(stderr, "filename is %s\n", answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NANO_EXTRA
|
#ifdef NANO_EXTRA
|
||||||
|
|
34
global.c
34
global.c
|
@ -414,32 +414,37 @@ void shortcut_init(int unjustify)
|
||||||
#else
|
#else
|
||||||
# define IFHELP(help, nextvar) help, nextvar
|
# define IFHELP(help, nextvar) help, nextvar
|
||||||
#endif
|
#endif
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_HELP_KEY, _("Get Help"),
|
sc_init_one(&main_list, NANO_HELP_KEY, _("Get Help"),
|
||||||
IFHELP(nano_help_msg, 0), NANO_HELP_FKEY, 0, VIEW,
|
IFHELP(nano_help_msg, 0), NANO_HELP_FKEY, 0, VIEW,
|
||||||
do_help);
|
do_help);
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
if (open_files != NULL && (open_files->prev != NULL || open_files->next != NULL))
|
if (open_files != NULL && (open_files->prev != NULL || open_files->next != NULL))
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_EXIT_KEY, _("Close"),
|
sc_init_one(&main_list, NANO_EXIT_KEY, _("Close"),
|
||||||
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
||||||
do_exit);
|
do_exit);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_EXIT_KEY, _("Exit"),
|
sc_init_one(&main_list, NANO_EXIT_KEY, _("Exit"),
|
||||||
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
||||||
do_exit);
|
do_exit);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_WRITEOUT_KEY, _("WriteOut"),
|
sc_init_one(&main_list, NANO_WRITEOUT_KEY, _("WriteOut"),
|
||||||
IFHELP(nano_writeout_msg, 0),
|
IFHELP(nano_writeout_msg, 0),
|
||||||
NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
|
NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_JUSTIFY_KEY, _("Justify"),
|
sc_init_one(&main_list, NANO_JUSTIFY_KEY, _("Justify"),
|
||||||
IFHELP(nano_justify_msg, 0), NANO_JUSTIFY_FKEY, 0,
|
IFHELP(nano_justify_msg, 0), NANO_JUSTIFY_FKEY, 0,
|
||||||
NOVIEW, do_justify);
|
NOVIEW, do_justify);
|
||||||
|
|
||||||
/* this is so we can view multiple files */
|
/* this is so we can view multiple files */
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
||||||
IFHELP(nano_insert_msg, 0), NANO_INSERTFILE_FKEY, 0,
|
IFHELP(nano_insert_msg, 0), NANO_INSERTFILE_FKEY, 0,
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
|
@ -449,35 +454,43 @@ void shortcut_init(int unjustify)
|
||||||
#endif
|
#endif
|
||||||
, do_insertfile_void);
|
, do_insertfile_void);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_WHEREIS_KEY, _("Where Is"),
|
sc_init_one(&main_list, NANO_WHEREIS_KEY, _("Where Is"),
|
||||||
IFHELP(nano_whereis_msg, 0),
|
IFHELP(nano_whereis_msg, 0),
|
||||||
NANO_WHEREIS_FKEY, 0, VIEW, do_search);
|
NANO_WHEREIS_FKEY, 0, VIEW, do_search);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_PREVPAGE_KEY, _("Prev Page"),
|
sc_init_one(&main_list, NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||||
IFHELP(nano_prevpage_msg, 0),
|
IFHELP(nano_prevpage_msg, 0),
|
||||||
NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
|
NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_NEXTPAGE_KEY, _("Next Page"),
|
sc_init_one(&main_list, NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||||
IFHELP(nano_nextpage_msg, 0),
|
IFHELP(nano_nextpage_msg, 0),
|
||||||
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_CUT_KEY, _("Cut Text"),
|
sc_init_one(&main_list, NANO_CUT_KEY, _("Cut Text"),
|
||||||
IFHELP(nano_cut_msg, 0),
|
IFHELP(nano_cut_msg, 0),
|
||||||
NANO_CUT_FKEY, 0, NOVIEW, do_cut_text);
|
NANO_CUT_FKEY, 0, NOVIEW, do_cut_text);
|
||||||
|
|
||||||
if (unjustify)
|
if (unjustify)
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"),
|
sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"),
|
||||||
IFHELP(nano_unjustify_msg, 0),
|
IFHELP(nano_unjustify_msg, 0),
|
||||||
0, 0, NOVIEW, do_uncut_text);
|
0, 0, NOVIEW, do_uncut_text);
|
||||||
else
|
else
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_UNCUT_KEY, _("UnCut Txt"),
|
sc_init_one(&main_list, NANO_UNCUT_KEY, _("UnCut Txt"),
|
||||||
IFHELP(nano_uncut_msg, 0),
|
IFHELP(nano_uncut_msg, 0),
|
||||||
NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text);
|
NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_CURSORPOS_KEY, _("Cur Pos"),
|
sc_init_one(&main_list, NANO_CURSORPOS_KEY, _("Cur Pos"),
|
||||||
IFHELP(nano_cursorpos_msg, 0),
|
IFHELP(nano_cursorpos_msg, 0),
|
||||||
NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos_void);
|
NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos_void);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 10 characters long */
|
||||||
sc_init_one(&main_list, NANO_SPELL_KEY, _("To Spell"),
|
sc_init_one(&main_list, NANO_SPELL_KEY, _("To Spell"),
|
||||||
IFHELP(nano_spell_msg, 0),
|
IFHELP(nano_spell_msg, 0),
|
||||||
NANO_SPELL_FKEY, 0, NOVIEW, do_spell);
|
NANO_SPELL_FKEY, 0, NOVIEW, do_spell);
|
||||||
|
@ -565,35 +578,44 @@ void shortcut_init(int unjustify)
|
||||||
sc_init_one(&whereis_list, NANO_HELP_KEY, _("Get Help"),
|
sc_init_one(&whereis_list, NANO_HELP_KEY, _("Get Help"),
|
||||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, NANO_CANCEL_KEY, _("Cancel"),
|
sc_init_one(&whereis_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, _("First Line"),
|
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, _("First Line"),
|
||||||
IFHELP(nano_firstline_msg, 0),
|
IFHELP(nano_firstline_msg, 0),
|
||||||
0, 0, VIEW, do_first_line);
|
0, 0, VIEW, do_first_line);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, _("Last Line"),
|
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, _("Last Line"),
|
||||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, NANO_OTHERSEARCH_KEY, _("Replace"),
|
sc_init_one(&whereis_list, NANO_OTHERSEARCH_KEY, _("Replace"),
|
||||||
IFHELP(nano_replace_msg, 0), 0, 0, VIEW, do_replace);
|
IFHELP(nano_replace_msg, 0), 0, 0, VIEW, do_replace);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
|
sc_init_one(&whereis_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
|
||||||
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
|
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, TOGGLE_CASE_KEY, _("Case Sens"),
|
sc_init_one(&whereis_list, TOGGLE_CASE_KEY, _("Case Sens"),
|
||||||
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
|
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
|
sc_init_one(&whereis_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
|
||||||
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
|
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
|
||||||
|
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, TOGGLE_REGEXP_KEY, _("Regexp"),
|
sc_init_one(&whereis_list, TOGGLE_REGEXP_KEY, _("Regexp"),
|
||||||
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
|
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&whereis_list, KEY_UP, _("History"),
|
sc_init_one(&whereis_list, KEY_UP, _("History"),
|
||||||
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
|
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -614,6 +636,7 @@ void shortcut_init(int unjustify)
|
||||||
sc_init_one(&replace_list, NANO_LASTLINE_KEY, _("Last Line"),
|
sc_init_one(&replace_list, NANO_LASTLINE_KEY, _("Last Line"),
|
||||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 12 characters long */
|
||||||
sc_init_one(&replace_list, NANO_OTHERSEARCH_KEY, _("No Replace"),
|
sc_init_one(&replace_list, NANO_OTHERSEARCH_KEY, _("No Replace"),
|
||||||
IFHELP(nano_whereis_msg, 0), 0, 0, VIEW, do_search);
|
IFHELP(nano_whereis_msg, 0), 0, 0, VIEW, do_search);
|
||||||
|
|
||||||
|
@ -691,25 +714,31 @@ void shortcut_init(int unjustify)
|
||||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||||
|
|
||||||
#ifndef DISABLE_BROWSER
|
#ifndef DISABLE_BROWSER
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, NANO_TOFILES_KEY, _("To Files"),
|
sc_init_one(&writefile_list, NANO_TOFILES_KEY, _("To Files"),
|
||||||
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, TOGGLE_DOS_KEY, _("DOS Format"),
|
sc_init_one(&writefile_list, TOGGLE_DOS_KEY, _("DOS Format"),
|
||||||
IFHELP(nano_dos_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_dos_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, TOGGLE_MAC_KEY, _("Mac Format"),
|
sc_init_one(&writefile_list, TOGGLE_MAC_KEY, _("Mac Format"),
|
||||||
IFHELP(nano_mac_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_mac_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, NANO_APPEND_KEY, _("Append"),
|
sc_init_one(&writefile_list, NANO_APPEND_KEY, _("Append"),
|
||||||
IFHELP(nano_append_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_append_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, NANO_PREPEND_KEY, _("Prepend"),
|
sc_init_one(&writefile_list, NANO_PREPEND_KEY, _("Prepend"),
|
||||||
IFHELP(nano_prepend_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_prepend_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
/* Translators: try to keep this string under 16 characters long */
|
||||||
sc_init_one(&writefile_list, TOGGLE_BACKUP_KEY, _("Backup File"),
|
sc_init_one(&writefile_list, TOGGLE_BACKUP_KEY, _("Backup File"),
|
||||||
IFHELP(nano_backup_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_backup_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -730,9 +759,11 @@ void shortcut_init(int unjustify)
|
||||||
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
/* Translators: try to keep this string under 22 characters long */
|
||||||
sc_init_one(&insertfile_list, NANO_EXTCMD_KEY, _("Execute Command"),
|
sc_init_one(&insertfile_list, NANO_EXTCMD_KEY, _("Execute Command"),
|
||||||
IFHELP(nano_execute_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_execute_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
|
/* Translators: try to keep this string under 22 characters long */
|
||||||
sc_init_one(&insertfile_list, TOGGLE_LOAD_KEY, _("New Buffer"),
|
sc_init_one(&insertfile_list, TOGGLE_LOAD_KEY, _("New Buffer"),
|
||||||
IFHELP(nano_multibuffer_msg, 0), 0, 0, NOVIEW, 0);
|
IFHELP(nano_multibuffer_msg, 0), 0, 0, NOVIEW, 0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -775,6 +806,7 @@ void shortcut_init(int unjustify)
|
||||||
IFHELP(nano_nextpage_msg, 0), NANO_NEXTPAGE_FKEY,
|
IFHELP(nano_nextpage_msg, 0), NANO_NEXTPAGE_FKEY,
|
||||||
KEY_NPAGE, VIEW, 0);
|
KEY_NPAGE, VIEW, 0);
|
||||||
|
|
||||||
|
/* Translators: try to keep this string under 22 characters long */
|
||||||
sc_init_one(&browser_list, NANO_GOTO_KEY, _("Go To Dir"),
|
sc_init_one(&browser_list, NANO_GOTO_KEY, _("Go To Dir"),
|
||||||
IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY),
|
IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY),
|
||||||
NANO_GOTO_FKEY, 0, VIEW, 0);
|
NANO_GOTO_FKEY, 0, VIEW, 0);
|
||||||
|
|
28
nano.c
28
nano.c
|
@ -562,12 +562,12 @@ void free_filestruct(filestruct *src)
|
||||||
src = src->next;
|
src = src->next;
|
||||||
delete_node(src->prev);
|
delete_node(src->prev);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: free'd a node, YAY!\n"), "delete_node()");
|
fprintf(stderr, "%s: free'd a node, YAY!\n", "delete_node()");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
delete_node(src);
|
delete_node(src);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: free'd last node.\n"), "delete_node()");
|
fprintf(stderr, "%s: free'd last node.\n", "delete_node()");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1029,7 +1029,7 @@ int do_backspace(void)
|
||||||
memmove(¤t->data[current_x - 1], ¤t->data[current_x],
|
memmove(¤t->data[current_x - 1], ¤t->data[current_x],
|
||||||
strlen(current->data) - current_x + 1);
|
strlen(current->data) - current_x + 1);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("current->data now = \"%s\"\n"), current->data);
|
fprintf(stderr, "current->data now = \"%s\"\n", current->data);
|
||||||
#endif
|
#endif
|
||||||
align(¤t->data);
|
align(¤t->data);
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
@ -1089,7 +1089,7 @@ int do_backspace(void)
|
||||||
current_y--;
|
current_y--;
|
||||||
totlines--;
|
totlines--;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("After, data = \"%s\"\n"), current->data);
|
fprintf(stderr, "After, data = \"%s\"\n", current->data);
|
||||||
#endif
|
#endif
|
||||||
refresh = 1;
|
refresh = 1;
|
||||||
}
|
}
|
||||||
|
@ -3381,7 +3381,7 @@ int main(int argc, char *argv[])
|
||||||
signal_init();
|
signal_init();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Main: set up windows\n"));
|
fprintf(stderr, "Main: set up windows\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
window_init();
|
window_init();
|
||||||
|
@ -3395,13 +3395,13 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Main: bottom win\n"));
|
fprintf(stderr, "Main: bottom win\n");
|
||||||
#endif
|
#endif
|
||||||
/* Set up bottom of window */
|
/* Set up bottom of window */
|
||||||
display_main_list();
|
display_main_list();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Main: open file\n"));
|
fprintf(stderr, "Main: open file\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
open_file(filename, 0, 1);
|
open_file(filename, 0, 1);
|
||||||
|
@ -3458,7 +3458,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
kbinput = wgetch(edit);
|
kbinput = wgetch(edit);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("AHA! %c (%d)\n"), kbinput, kbinput);
|
fprintf(stderr, "AHA! %c (%d)\n", kbinput, kbinput);
|
||||||
#endif
|
#endif
|
||||||
if (kbinput == 27) { /* Grab Alt-key stuff first */
|
if (kbinput == 27) { /* Grab Alt-key stuff first */
|
||||||
kbinput = wgetch(edit);
|
kbinput = wgetch(edit);
|
||||||
|
@ -3478,7 +3478,7 @@ int main(int argc, char *argv[])
|
||||||
kbinput = KEY_F(kbinput - 79);
|
kbinput = KEY_F(kbinput - 79);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, _("I got Alt-O-%c! (%d)\n"),
|
fprintf(stderr, "I got Alt-O-%c! (%d)\n",
|
||||||
kbinput, kbinput);
|
kbinput, kbinput);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3505,7 +3505,7 @@ int main(int argc, char *argv[])
|
||||||
kbinput = KEY_HOME;
|
kbinput = KEY_HOME;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, _("I got Alt-[-1-%c! (%d)\n"),
|
fprintf(stderr, "I got Alt-[-1-%c! (%d)\n",
|
||||||
kbinput, kbinput);
|
kbinput, kbinput);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3535,7 +3535,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, _("I got Alt-[-2-%c! (%d)\n"),
|
fprintf(stderr, "I got Alt-[-2-%c! (%d)\n",
|
||||||
kbinput, kbinput);
|
kbinput, kbinput);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -3604,7 +3604,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("I got Alt-[-%c! (%d)\n"),
|
fprintf(stderr, "I got Alt-[-%c! (%d)\n",
|
||||||
kbinput, kbinput);
|
kbinput, kbinput);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -3650,7 +3650,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("I got Alt-%c! (%d)\n"), kbinput,
|
fprintf(stderr, "I got Alt-%c! (%d)\n", kbinput,
|
||||||
kbinput);
|
kbinput);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -3749,7 +3749,7 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("I got %c (%d)!\n"), kbinput, kbinput);
|
fprintf(stderr, "I got %c (%d)!\n", kbinput, kbinput);
|
||||||
#endif
|
#endif
|
||||||
/* We no longer stop unhandled sequences so that people with
|
/* We no longer stop unhandled sequences so that people with
|
||||||
odd character sets can type... */
|
odd character sets can type... */
|
||||||
|
|
16
rcfile.c
16
rcfile.c
|
@ -295,7 +295,7 @@ void parse_syntax(char *ptr)
|
||||||
tmpsyntax->next = (syntaxtype *)nmalloc(sizeof(syntaxtype));
|
tmpsyntax->next = (syntaxtype *)nmalloc(sizeof(syntaxtype));
|
||||||
tmpsyntax = tmpsyntax->next;
|
tmpsyntax = tmpsyntax->next;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Adding new syntax after 1st\n"));
|
fprintf(stderr, "Adding new syntax after 1st\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
tmpsyntax->desc = mallocstrcpy(NULL, nameptr);
|
tmpsyntax->desc = mallocstrcpy(NULL, nameptr);
|
||||||
|
@ -303,7 +303,7 @@ void parse_syntax(char *ptr)
|
||||||
tmpsyntax->extensions = NULL;
|
tmpsyntax->extensions = NULL;
|
||||||
tmpsyntax->next = NULL;
|
tmpsyntax->next = NULL;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Starting a new syntax type\n"));
|
fprintf(stderr, "Starting a new syntax type\n");
|
||||||
fprintf(stderr, "string val=%s\n", nameptr);
|
fprintf(stderr, "string val=%s\n", nameptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ void parse_colors(char *ptr)
|
||||||
if (tmpsyntax->color == NULL) {
|
if (tmpsyntax->color == NULL) {
|
||||||
tmpsyntax->color = newcolor;
|
tmpsyntax->color = newcolor;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Starting a new colorstring for fg %d bg %d\n"),
|
fprintf(stderr, "Starting a new colorstring for fg %d bg %d\n",
|
||||||
fg, bg);
|
fg, bg);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
@ -425,7 +425,7 @@ void parse_colors(char *ptr)
|
||||||
tmpcolor = tmpcolor->next)
|
tmpcolor = tmpcolor->next)
|
||||||
;
|
;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Adding new entry for fg %d bg %d\n"), fg, bg);
|
fprintf(stderr, "Adding new entry for fg %d bg %d\n", fg, bg);
|
||||||
#endif
|
#endif
|
||||||
tmpcolor->next = newcolor;
|
tmpcolor->next = newcolor;
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ void parse_rcfile(FILE *rcstream)
|
||||||
|
|
||||||
if (*ptr == '#') {
|
if (*ptr == '#') {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: Read a comment\n"), "parse_rcfile()");
|
fprintf(stderr, "%s: Read a comment\n", "parse_rcfile()");
|
||||||
#endif
|
#endif
|
||||||
continue; /* Skip past commented lines */
|
continue; /* Skip past commented lines */
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ void parse_rcfile(FILE *rcstream)
|
||||||
for (i = 0; rcopts[i].name != NULL; i++) {
|
for (i = 0; rcopts[i].name != NULL; i++) {
|
||||||
if (!strcasecmp(option, rcopts[i].name)) {
|
if (!strcasecmp(option, rcopts[i].name)) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("%s: Parsing option %s\n"),
|
fprintf(stderr, "%s: Parsing option %s\n",
|
||||||
"parse_rcfile()", rcopts[i].name);
|
"parse_rcfile()", rcopts[i].name);
|
||||||
#endif
|
#endif
|
||||||
if (set == 1) {
|
if (set == 1) {
|
||||||
|
@ -595,13 +595,13 @@ void parse_rcfile(FILE *rcstream)
|
||||||
} else
|
} else
|
||||||
SET(rcopts[i].flag);
|
SET(rcopts[i].flag);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("set flag %d!\n"),
|
fprintf(stderr, "set flag %d!\n",
|
||||||
rcopts[i].flag);
|
rcopts[i].flag);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
UNSET(rcopts[i].flag);
|
UNSET(rcopts[i].flag);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("unset flag %d!\n"),
|
fprintf(stderr, "unset flag %d!\n",
|
||||||
rcopts[i].flag);
|
rcopts[i].flag);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
18
winio.c
18
winio.c
|
@ -87,7 +87,7 @@ size_t actual_x(const filestruct *fileptr, size_t xplus)
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("actual_x for xplus=%d returns %d\n"), xplus, i);
|
fprintf(stderr, "actual_x for xplus=%d returns %d\n", xplus, i);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
|
@ -250,7 +250,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||||
while ((kbinput = wgetch(bottomwin)) != 13) {
|
while ((kbinput = wgetch(bottomwin)) != 13) {
|
||||||
for (t = s; t != NULL; t = t->next) {
|
for (t = s; t != NULL; t = t->next) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Aha! \'%c\' (%d)\n"), kbinput, kbinput);
|
fprintf(stderr, "Aha! \'%c\' (%d)\n", kbinput, kbinput);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (kbinput == t->val && kbinput < 32) {
|
if (kbinput == t->val && kbinput < 32) {
|
||||||
|
@ -518,7 +518,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||||
|
|
||||||
for (t = s; t != NULL; t = t->next) {
|
for (t = s; t != NULL; t = t->next) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Aha! \'%c\' (%d)\n"), kbinput,
|
fprintf(stderr, "Aha! \'%c\' (%d)\n", kbinput,
|
||||||
kbinput);
|
kbinput);
|
||||||
#endif
|
#endif
|
||||||
if (kbinput == t->val || kbinput == t->val - 32)
|
if (kbinput == t->val || kbinput == t->val - 32)
|
||||||
|
@ -541,7 +541,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("input \'%c\' (%d)\n"), kbinput, kbinput);
|
fprintf(stderr, "input \'%c\' (%d)\n", kbinput, kbinput);
|
||||||
#endif
|
#endif
|
||||||
} /* switch (kbinput) */
|
} /* switch (kbinput) */
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
@ -1109,7 +1109,7 @@ void update_cursor(void)
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("Moved to (%d, %d) in edit buffer\n"), current_y,
|
fprintf(stderr, "Moved to (%d, %d) in edit buffer\n", current_y,
|
||||||
current_x);
|
current_x);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1260,7 +1260,7 @@ int statusq(int tabs, const shortcut *s, const char *def,
|
||||||
blank_statusbar();
|
blank_statusbar();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("I got \"%s\"\n"), answer);
|
fprintf(stderr, "I got \"%s\"\n", answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DISABLE_TABCOMP
|
#ifndef DISABLE_TABCOMP
|
||||||
|
@ -1747,11 +1747,11 @@ void fix_editbot(void)
|
||||||
/* Dump the current file structure to stderr */
|
/* Dump the current file structure to stderr */
|
||||||
void dump_buffer(const filestruct *inptr) {
|
void dump_buffer(const filestruct *inptr) {
|
||||||
if (inptr == fileage)
|
if (inptr == fileage)
|
||||||
fprintf(stderr, _("Dumping file buffer to stderr...\n"));
|
fprintf(stderr, "Dumping file buffer to stderr...\n");
|
||||||
else if (inptr == cutbuffer)
|
else if (inptr == cutbuffer)
|
||||||
fprintf(stderr, _("Dumping cutbuffer to stderr...\n"));
|
fprintf(stderr, "Dumping cutbuffer to stderr...\n");
|
||||||
else
|
else
|
||||||
fprintf(stderr, _("Dumping a buffer to stderr...\n"));
|
fprintf(stderr, "Dumping a buffer to stderr...\n");
|
||||||
|
|
||||||
while (inptr != NULL) {
|
while (inptr != NULL) {
|
||||||
fprintf(stderr, "(%d) %s\n", inptr->lineno, inptr->data);
|
fprintf(stderr, "(%d) %s\n", inptr->lineno, inptr->data);
|
||||||
|
|
Loading…
Reference in New Issue