Fixes from Benno Schulenberg.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2008-03-16 23:57:14 +00:00
parent 3b97e76aa5
commit d3659f8284
4 changed files with 41 additions and 36 deletions

View File

@ -1,3 +1,9 @@
2008-03-16 Benno Schulenberg <bensberg@justemail.net>
* src/help.c, src/global. - Fix help strings no longer being
translated properly.
* src/global.c, doc/man/nanorc.5 - Fix typos and poorlly worded lines
in the source and man pages.
2008-03-04 Chris Allegretta <chrisa@asty.org 2008-03-04 Chris Allegretta <chrisa@asty.org
* everything - New shortcut backend. New structs subnfunc * everything - New shortcut backend. New structs subnfunc
for menu functions and toggles and sc for shortcut keys, old for menu functions and toggles and sc for shortcut keys, old

View File

@ -266,7 +266,7 @@ followed by a prinable character or the word "Space".
Example: M-C Example: M-C
.TP .TP
.B F .B F
followed by a numeric value from 1-16 followed by a numeric value from 1 to 16.
Example: F10 Example: F10
.TP .TP
Valid function names to be bound include: Valid function names to be bound include:
@ -287,13 +287,14 @@ Write the current buffer to disk.
Justify the current text. Justify the current text.
.TP .TP
.B insert .B insert
Insert a file into the current buffer (or a new buffer with multi-buffer enbled). Insert a file into the current buffer (or into a new buffer when multibuffer
is enabled).
.TP .TP
.B whereis .B whereis
Search for text in the program. Search for text in the current buffer.
.TP .TP
.B searchagain .B searchagain
Repat the last search command. Repeat the last search command.
.TP .TP
.B up .B up
Move up in the editor or browser. Move up in the editor or browser.
@ -311,13 +312,13 @@ Move right in the editor or browser.
Cut the current line of text and store it. Cut the current line of text and store it.
.TP .TP
.B uncut .B uncut
Copy the currently stored text into the current file location. Copy the currently stored text into the current buffer position.
.TP .TP
.B curpos .B curpos
Show the current line, column, word positions in the file. Show the current line, column, word positions in the file.
.TP .TP
.B firstline .B firstline
Move to the first line of the file Move to the first line of the file.
.TP .TP
.B lastline .B lastline
Move to the last line of the file. Move to the last line of the file.
@ -326,7 +327,7 @@ Move to the last line of the file.
Move to a specific line (and column if specified). Move to a specific line (and column if specified).
.TP .TP
.B replace .B replace
Interactively replace text within the editor. Interactively replace text within the current buffer.
.TP .TP
.B mark .B mark
Begin selecting text for cutting or pasting at the current position. Begin selecting text for cutting or pasting at the current position.
@ -353,13 +354,14 @@ Move the cursor to the beginning of the current line.
Move the cursor to the end of the current line. Move the cursor to the end of the current line.
.TP .TP
.B beginpara .B beginpara
Move the cursor to the beginning of the current paragraph
.TP
.B endpara
Move the cursor to the beginning of the current paragraph. Move the cursor to the beginning of the current paragraph.
.TP .TP
.B endpara
Move the cursor to the end of the current paragraph.
.TP
.B findbracket .B findbracket
Move the cursor to the matching bracket (brace, etc) of the one under the cursor. Move the cursor to the matching bracket (brace, parenthesis, etc.) of the one
under the cursor.
.TP .TP
.B scrollup .B scrollup
Scroll up one line of text from the current position. Scroll up one line of text from the current position.
@ -392,17 +394,17 @@ Justify the entire current file.
Count the number of words in the current buffer. Count the number of words in the current buffer.
.TP .TP
.B refresh .B refresh
Refresh the screen Refresh the screen.
.TP .TP
.B suspend .B suspend
Suspend the editor (if the suspend functino is enabled, see the Suspend the editor (if the suspend function is enabled, see the
"suspendenable" entry below. "suspendenable" entry below).
.TP .TP
.B casesens .B casesens
Toggle case sensitivity in searching (search/replace menus only). Toggle case sensitivity in searching (search/replace menus only).
.TP .TP
.B regexp .B regexp
Toggle whether searches/replaces are based on literal strings or regular expressions. Toggle whether searching/replacing is based on literal strings or regular expressions.
.TP .TP
.B prevhistory .B prevhistory
Show the previous history entry in the prompt menus (e.g. search). Show the previous history entry in the prompt menus (e.g. search).
@ -414,7 +416,7 @@ Show the next history entry in the prompt menus (e.g. search).
Switch back to searching instead of replacing. Switch back to searching instead of replacing.
.TP .TP
.B gototext .B gototext
Search for files matching a string in the file browser (reading or writing files) Search for files matching a string in the file browser (reading or writing files).
.TP .TP
.B dosformat .B dosformat
When writing a file, switch to writing a DOS format (CR/LF). When writing a file, switch to writing a DOS format (CR/LF).
@ -438,28 +440,29 @@ Move to the first file when using the file browser (reading or writing files).
Move to the last file when using the file browser (reading or writing files). Move to the last file when using the file browser (reading or writing files).
.TP .TP
.B nohelp .B nohelp
Toggle showing/hiding the two line list of key bindings at the bottom of the screen. Toggle showing/hiding the two-line list of key bindings at the bottom of the screen.
.TP .TP
.B constupdate .B constupdate
Constantly display the current line, column, etc position. Constantly display the current line, column, word positions.
.TP .TP
.B morespace .B morespace
Toggle showing/hiding the blank space which 'seperates' the 'title' from the file text. Toggle showing/hiding the blank line which 'separates' the 'title' from the file text.
.TP .TP
.B smoothscroll .B smoothscroll
Toggle smooth scrolling when moving via the arrow keys. Toggle smooth scrolling when moving via the arrow keys.
.TP .TP
.B whitesplacedisplay .B whitespacedisplay
Toggle whether whitespace is shown.
.TP .TP
.B smarthome .B smarthome
Toggle whether the smart home key function is enabled. Toggle whether the smart home key function is enabled.
.TP .TP
.B autoindent .B autoindent
Toggle whether new lines will conain the same amount of whitespace as the line above. Toggle whether new lines will contain the same amount of whitespace as the line above.
.TP .TP
.B cuttoend .B cuttoend
Toggle whether cutting text will cut the whole line or just from the current cursor. Toggle whether cutting text will cut the whole line or just from the current cursor
position to the end of the line position to the end of the line.
.TP .TP
.B nowrap .B nowrap
Toggle whether long lines will be wrapped to the next line. Toggle whether long lines will be wrapped to the next line.
@ -507,10 +510,10 @@ The file browser for inserting or writing a file.
The 'search for a file' menu in the file browser. The 'search for a file' menu in the file browser.
.TP .TP
.B gotodir .B gotodir
The 'go to directory' menu The 'go to directory' menu.
.TP .TP
.B all .B all
Special name meaning apply to all menus where this function exists. A special name meaning: apply to all menus where this function exists.
.SH FILES .SH FILES
.TP .TP
.I SYSCONFDIR/nanorc .I SYSCONFDIR/nanorc

View File

@ -354,8 +354,6 @@ void assign_keyinfo(sc *s)
s->seq = 0; s->seq = 0;
else if (s->type == META && (!strcasecmp(&s->keystr[2], "space"))) else if (s->type == META && (!strcasecmp(&s->keystr[2], "space")))
s->seq = (int) ' '; s->seq = (int) ' ';
/* Note to translators: these strings are internal sentinel values,
and aren't presented to the user. Don't translate them */
else if (s->type == RAW && (!strcasecmp(s->keystr, "kup"))) else if (s->type == RAW && (!strcasecmp(s->keystr, "kup")))
s->seq = KEY_UP; s->seq = KEY_UP;
else if (s->type == RAW && (!strcasecmp(s->keystr, "kdown"))) else if (s->type == RAW && (!strcasecmp(s->keystr, "kdown")))
@ -434,14 +432,13 @@ const char *backup_file_msg = "";
const char *to_files_msg = ""; const char *to_files_msg = "";
const char *first_file_msg = ""; const char *first_file_msg = "";
const char *whereis_next_msg = ""; const char *whereis_next_msg = "";
/* TRANSLATORS: Try to keep this at most 12 characters. */
const char *last_file_msg = ""; const char *last_file_msg = "";
const char *new_buffer_msg = ""; const char *new_buffer_msg = "";
const char *goto_dir_msg; const char *goto_dir_msg;
const char *ext_cmd_msg = ""; const char *ext_cmd_msg = "";
#else #else
/* TRANSLATORS: Try to keep this and previous strings at most 10 /* TRANSLATORS: Try to keep the following five strings at most 10
* characters. */ * characters. */
const char *prev_history_msg = N_("PrevHstory"); const char *prev_history_msg = N_("PrevHstory");
const char *next_history_msg = N_("NextHstory"); const char *next_history_msg = N_("NextHstory");
@ -468,6 +465,7 @@ const char *append_msg = N_("Append");
const char *prepend_msg = N_("Prepend"); const char *prepend_msg = N_("Prepend");
/* TRANSLATORS: Try to keep this at most 16 characters. */ /* TRANSLATORS: Try to keep this at most 16 characters. */
const char *backup_file_msg = N_("Backup File"); const char *backup_file_msg = N_("Backup File");
/* TRANSLATORS: Try to keep this at most 16 characters. */
const char *ext_cmd_msg = N_("Execute Command"); const char *ext_cmd_msg = N_("Execute Command");
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
@ -489,10 +487,6 @@ void shortcut_init(bool unjustify)
const char *whereis_msg = N_("Where Is"); const char *whereis_msg = N_("Where Is");
const char *prev_page_msg = N_("Prev Page"); const char *prev_page_msg = N_("Prev Page");
const char *next_page_msg = N_("Next Page"); const char *next_page_msg = N_("Next Page");
/* TRANSLATORS: Try to keep this string at most 10 characters. */
/* TRANSLATORS: Try to keep this and following strings at most 10
* characters. */
const char *first_line_msg = N_("First Line"); const char *first_line_msg = N_("First Line");
const char *last_line_msg = N_("Last Line"); const char *last_line_msg = N_("Last Line");
const char *suspend_msg = N_("Suspend"); const char *suspend_msg = N_("Suspend");
@ -503,6 +497,8 @@ void shortcut_init(bool unjustify)
#endif #endif
const char *refresh_msg = N_("Refresh"); const char *refresh_msg = N_("Refresh");
const char *insert_file_msg = N_("Insert File"); const char *insert_file_msg = N_("Insert File");
/* TRANSLATORS: Try to keep this and previous strings at most 10
* characters. */
const char *go_to_line_msg = N_("Go To Line"); const char *go_to_line_msg = N_("Go To Line");
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
@ -1356,7 +1352,7 @@ sc *strtosc(int menu, char *input)
s->scfunc = (void *) do_toggle; s->scfunc = (void *) do_toggle;
s->execute = FALSE; s->execute = FALSE;
s->toggle = SMOOTH_SCROLL; s->toggle = SMOOTH_SCROLL;
} else if (!strcasecmp(input, "whitesplacedisplay")) { } else if (!strcasecmp(input, "whitespacedisplay")) {
s->scfunc = (void *) do_toggle; s->scfunc = (void *) do_toggle;
s->execute = FALSE; s->execute = FALSE;
s->toggle = WHITESPACE_DISPLAY; s->toggle = WHITESPACE_DISPLAY;

View File

@ -474,7 +474,7 @@ void help_init(void)
} }
/* The shortcut's help text. */ /* The shortcut's help text. */
ptr += sprintf(ptr, "%s\n", f->help); ptr += sprintf(ptr, "%s\n", _(f->help));
if (f->blank_after) if (f->blank_after)
ptr += sprintf(ptr, "\n"); ptr += sprintf(ptr, "\n");
@ -486,7 +486,7 @@ void help_init(void)
for (s = sclist; s != NULL; s = s->next) for (s = sclist; s != NULL; s = s->next)
if (s->scfunc == (void *) do_toggle) if (s->scfunc == (void *) do_toggle)
ptr += sprintf(ptr, "(%s)\t\t\t%s %s\n", ptr += sprintf(ptr, "(%s)\t\t\t%s %s\n",
s->keystr, flagtostr(s->toggle), _("enable/disable")); s->keystr, _(flagtostr(s->toggle)), _("enable/disable"));
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC