top: finalized top nls support (or so he thought)
summary of changes: . adopted relative paths to 'include' and 'proc' dirs so that stand alone compiles are made easier and no one need guess their locations . corrected several names for enums and macro usage reflecting fmt vs. txt . expanded all octal escape sequences to a full 3 digits since one already required 3 digits . finalized translator hints (for now) programming note: as an aside, by not including an argument for the gettext --add-comments, any preceeding c style comment will be propagated to the .pot file, if the gettext macro isn't empty. /* Need Not Say 'TRANSLATORS' ... snprintf(buf, sizeof(buf), "%s", _( // unseen /* Translator Hint: ... snprintf(buf, sizeof(buf), "%s", _("" // seen
This commit is contained in:
parent
32a9adbc13
commit
3f7468082a
26
top/top.c
26
top/top.c
@ -40,14 +40,14 @@
|
||||
#include <unistd.h>
|
||||
#include <values.h>
|
||||
|
||||
#include "devname.h"
|
||||
#include "procps.h"
|
||||
#include "readproc.h"
|
||||
#include "sig.h"
|
||||
#include "sysinfo.h"
|
||||
#include "version.h"
|
||||
#include "wchan.h"
|
||||
#include "whattime.h"
|
||||
#include "../proc/devname.h"
|
||||
#include "../proc/procps.h"
|
||||
#include "../proc/readproc.h"
|
||||
#include "../proc/sig.h"
|
||||
#include "../proc/sysinfo.h"
|
||||
#include "../proc/version.h"
|
||||
#include "../proc/wchan.h"
|
||||
#include "../proc/whattime.h"
|
||||
|
||||
#include "top.h"
|
||||
#include "top_nls.h"
|
||||
@ -1993,7 +1993,7 @@ static void procs_refresh (void) {
|
||||
|
||||
prochlp(NULL); // prep for a new frame
|
||||
if (NULL == (PT = openproc(Frames_libflags, Monpids)))
|
||||
error_exit(fmtmk(N_fmt(FAIL_openlib_txt), strerror(errno)));
|
||||
error_exit(fmtmk(N_fmt(FAIL_openlib_fmt), strerror(errno)));
|
||||
read_something = Thread_mode ? readeither : readproc;
|
||||
|
||||
for (;;) {
|
||||
@ -2289,14 +2289,14 @@ static void parse_args (char **args) {
|
||||
else if (*args) cp = *args++;
|
||||
else error_exit(fmtmk(N_fmt(MISSING_args_fmt), ch));
|
||||
if (1 != sscanf(cp, "%d", &Loops) || 1 > Loops)
|
||||
error_exit(fmtmk(N_fmt(BAD_niterate_arg), cp));
|
||||
error_exit(fmtmk(N_fmt(BAD_niterate_fmt), cp));
|
||||
break;
|
||||
case 'p':
|
||||
if (Curwin->usrseltyp) error_exit(N_txt(SELECT_clash_txt));
|
||||
do {
|
||||
if (cp[1]) cp++;
|
||||
else if (*args) cp = *args++;
|
||||
else error_exit(fmtmk(N_txt(MISSING_args_fmt), ch));
|
||||
else error_exit(fmtmk(N_fmt(MISSING_args_fmt), ch));
|
||||
if (Monpidsidx >= MONPIDMAX)
|
||||
error_exit(fmtmk(N_fmt(LIMIT_exceed_fmt), MONPIDMAX));
|
||||
if (1 != sscanf(cp, "%d", &Monpids[Monpidsidx])
|
||||
@ -2322,7 +2322,7 @@ static void parse_args (char **args) {
|
||||
if (Monpidsidx || Curwin->usrseltyp) error_exit(N_txt(SELECT_clash_txt));
|
||||
if (cp[1]) cp++;
|
||||
else if (*args) cp = *args++;
|
||||
else error_exit(fmtmk(N_txt(MISSING_args_fmt), ch));
|
||||
else error_exit(fmtmk(N_fmt(MISSING_args_fmt), ch));
|
||||
if ((err = user_certify(Curwin, cp, ch))) error_exit(err);
|
||||
cp += strlen(cp);
|
||||
break;
|
||||
@ -2463,7 +2463,7 @@ static WIN_t *win_select (char ch) {
|
||||
static int win_warn (int what) {
|
||||
switch (what) {
|
||||
case Warn_ALT:
|
||||
show_msg(N_txt(DISABLED_cmd_fmt));
|
||||
show_msg(N_txt(DISABLED_cmd_txt));
|
||||
break;
|
||||
case Warn_VIZ:
|
||||
show_msg(fmtmk(N_fmt(DISABLED_win_fmt), Curwin->grpname));
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef _Itop
|
||||
#define _Itop
|
||||
|
||||
#include "proc/readproc.h"
|
||||
#include "../proc/readproc.h"
|
||||
|
||||
/* Development/Debugging defines ----------------------------------- */
|
||||
//#define ATEOJ_RPTHSH /* report on hash specifics, at end-of-job */
|
||||
|
302
top/top_nls.c
302
top/top_nls.c
@ -23,6 +23,18 @@
|
||||
#include "top.h"
|
||||
#include "top_nls.h"
|
||||
|
||||
/* Programmer Note: Unless you have *something* following the gettext
|
||||
. macro, gettext will refuse to see any TRANSLATORS
|
||||
. comments. Thus empty strings have been added for
|
||||
. potential future comment additions.
|
||||
.
|
||||
. /* TRANSLATORS: ...
|
||||
. snprintf(buf, sizeof(buf), "%s", _( // unseen comment
|
||||
.
|
||||
. /* TRANSLATORS: ...
|
||||
. snprintf(buf, sizeof(buf), "%s", _("" // now it's seen!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* These are our three string tables with the following contents:
|
||||
@ -30,7 +42,7 @@
|
||||
* Norm : regular text possibly also containing c-format specifiers
|
||||
* Uniq : show_special specially formatted strings
|
||||
*
|
||||
* The latter table presents the greates translation challenge !
|
||||
* The latter table presents the greatest translation challenge !
|
||||
*/
|
||||
const char *Desc_nlstab[P_MAXPFLGS];
|
||||
const char *Norm_nlstab[norm_MAX];
|
||||
@ -44,15 +56,14 @@ const char *Uniq_nlstab[uniq_MAX];
|
||||
static void build_desc_nlstab (void) {
|
||||
char buf[SMLBUFSIZ];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"-------------------------------------------------------------------------------\n"
|
||||
"Note for Translators:\n"
|
||||
" This group of single lines contains plain text only used as the\n"
|
||||
" field descriptions. Each translated line MUST be kept to a length\n"
|
||||
" of 20 characters or less.\n"
|
||||
"\n"
|
||||
"( this text is for information only and need never be translated )\n"
|
||||
""));
|
||||
/* -----------------------------------------------------------------------
|
||||
. Note for Translators:
|
||||
. The following single lines contain only plain text used as
|
||||
. the descriptions under Field Management when the 'f' key is typed.
|
||||
.
|
||||
. To avoid truncation, each translated line MUST be kept to a length
|
||||
. of 20 characters or less.\n"
|
||||
. */
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("Process Id"));
|
||||
Desc_nlstab[P_PID] = strdup(buf);
|
||||
@ -147,31 +158,28 @@ static void build_desc_nlstab (void) {
|
||||
static void build_norm_nlstab (void) {
|
||||
char buf[MEDBUFSIZ];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"-------------------------------------------------------------------------------\n"
|
||||
"Note for Translators:\n"
|
||||
" This group of lines contains both plain text and c-format strings.\n"
|
||||
" Some strings reflect switches used to affect the running program\n"
|
||||
" and should not be translated without also making corresponding\n"
|
||||
" c-code logic changes.\n"
|
||||
"\n"
|
||||
"( this text is for information only and need never be translated )\n"
|
||||
""));
|
||||
/* -----------------------------------------------------------------------
|
||||
. Note for Translators:
|
||||
. This group of lines contains both plain text and c-format strings.
|
||||
.
|
||||
. Some strings reflect switches used to affect the running program
|
||||
. and should not be translated without also making corresponding
|
||||
. c-code logic changes.
|
||||
. */
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"\tsignal %d (%s) was caught by %s, please\n"
|
||||
"\tsee http://www.debian.org/Bugs/Reporting\n"
|
||||
""));
|
||||
Norm_nlstab[EXIT_signals_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"inappropriate '%s'\n"
|
||||
"usage:\t%s%s"
|
||||
""));
|
||||
Norm_nlstab[WRONG_switch_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"\t%s\n"
|
||||
"usage:\t%s%s"
|
||||
""));
|
||||
@ -181,13 +189,13 @@ static void build_norm_nlstab (void) {
|
||||
Norm_nlstab[FAIL_statopn_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("failed openproc: %s"));
|
||||
Norm_nlstab[FAIL_openlib_txt] = strdup(buf);
|
||||
Norm_nlstab[FAIL_openlib_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("bad delay interval '%s'"));
|
||||
Norm_nlstab[BAD_delayint_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("bad iterations argument '%s'"));
|
||||
Norm_nlstab[BAD_niterate_arg] = strdup(buf);
|
||||
Norm_nlstab[BAD_niterate_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("pid limit (%d) exceeded"));
|
||||
Norm_nlstab[LIMIT_exceed_fmt] = strdup(buf);
|
||||
@ -201,7 +209,7 @@ static void build_norm_nlstab (void) {
|
||||
snprintf(buf, sizeof(buf), "%s", _("bad width arg '%s', must > %d"));
|
||||
Norm_nlstab[BAD_widtharg_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"unknown option '%c'\n"
|
||||
"usage:\t%s%s"
|
||||
""));
|
||||
@ -219,6 +227,8 @@ static void build_norm_nlstab (void) {
|
||||
snprintf(buf, sizeof(buf), "%s", _("Off"));
|
||||
Norm_nlstab[OFF_one_word_txt] = strdup(buf);
|
||||
|
||||
/* Translation Hint: Only the following words should be translated
|
||||
. delay, limit, user, cols */
|
||||
snprintf(buf, sizeof(buf), "%s", _(" -hv | -bcHiSs -d delay -n limit -u|U user | -p pid[,pid] -w [cols]"));
|
||||
Norm_nlstab[USAGE_abbrev_txt] = strdup(buf);
|
||||
|
||||
@ -241,7 +251,7 @@ static void build_norm_nlstab (void) {
|
||||
Norm_nlstab[CHOOSE_group_txt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("Command disabled, 'A' mode required"));
|
||||
Norm_nlstab[DISABLED_cmd_fmt] = strdup(buf);
|
||||
Norm_nlstab[DISABLED_cmd_txt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("Command disabled, activate %s with '-' or '_'"));
|
||||
Norm_nlstab[DISABLED_win_fmt] = strdup(buf);
|
||||
@ -377,173 +387,181 @@ static void build_norm_nlstab (void) {
|
||||
static void build_uniq_nsltab (void) {
|
||||
char buf[BIGBUFSIZ];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"-------------------------------------------------------------------------------\n"
|
||||
"Note for Translators:\n"
|
||||
" The next 11 text groups contain unprintable characters used to\n"
|
||||
" index a capabilities table at run-time. You may need a special\n"
|
||||
" editor which can accomodate such data without altering it.\n"
|
||||
"\n"
|
||||
" Please see the comments in the source file for additional\n"
|
||||
" information and guidance regarding these strings.\n"
|
||||
"\n"
|
||||
"( this text is for information only and need never be translated )\n"
|
||||
""));
|
||||
/* -----------------------------------------------------------------------
|
||||
. Note for Translators:
|
||||
. The next several text groups contain special escape sequences
|
||||
. representing values used to index a table at run-time.
|
||||
.
|
||||
. Each such sequence consists of a slash and exactly 3 numbers.
|
||||
. Examples would be '\002', '\020', etc. In at least one case,
|
||||
. another number follows those 3 numbers, making it appear as
|
||||
. though the escape sequence is \0011.
|
||||
.
|
||||
. If you remove those escape sequences, it would make translation
|
||||
. easier. However, the ability to display colors and bold text at
|
||||
. run-time will have been lost.
|
||||
.
|
||||
. Additionally, each of these text groups was designed to display
|
||||
. in a 80x24 terminal window. Hopefully, any translations will
|
||||
. adhere to that goal lest the translated text be truncated.
|
||||
.
|
||||
. If you would like additional information regarding these strings,
|
||||
. please see the prolog to the show_special function in the top.c
|
||||
. source file.
|
||||
. */
|
||||
|
||||
/*
|
||||
* These lines contain special formatting elements and are very
|
||||
* carefully designed to fit within a 80x24 terminal window.
|
||||
* The special formatting consists of:
|
||||
* "some text <_delimiter_> some more text <_delimiter_>...\n"
|
||||
* Where <_delimiter_> is a single byte in the range of:
|
||||
* \01 through \10 (in decimalizee, 1 - 8)
|
||||
* and is used to select an 'attribute' from a capabilities table
|
||||
* which is then applied to the *preceding* substring.
|
||||
* Once recognized, the delimiter is replaced with a null character
|
||||
* and viola, we've got a substring ready to output! Strings or
|
||||
* substrings without delimiters will receive the Cap_norm attribute.
|
||||
*
|
||||
* note: the following is an example of the capabilities
|
||||
* table for which the unprintable characters are
|
||||
* used as an index.
|
||||
* +------------------------------------------------------+
|
||||
* | char *captab[] = { : Cap's/Delim's |
|
||||
* | Cap_norm, Cap_norm, = \00, \01, |
|
||||
* | cap_bold, capclr_sum, = \02, \03, |
|
||||
* | capclr_msg, capclr_pmt, = \04, \05, |
|
||||
* | capclr_hdr, = \06, |
|
||||
* | capclr_rowhigh, = \07, |
|
||||
* | capclr_rownorm }; = \10 [octal!] |
|
||||
* +------------------------------------------------------+ */
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"Help for Interactive Commands\02 - %s\n"
|
||||
"Window \01%s\06: \01Cumulative mode \03%s\02. \01System\06: \01Delay \03%.1f secs\02; \01Secure mode \03%s\02.\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"Help for Interactive Commands\002 - %s\n"
|
||||
"Window \001%s\006: \001Cumulative mode \003%s\002. \001System\006: \001Delay \003%.1f secs\002; \001Secure mode \003%s\002.\n"
|
||||
"\n"
|
||||
" Z\05,\01B\05 Global: '\01Z\02' change color mappings; '\01B\02' disable/enable bold\n"
|
||||
" l,t,m Toggle Summaries: '\01l\02' load avg; '\01t\02' task/cpu stats; '\01m\02' mem info\n"
|
||||
" 1,I Toggle SMP view: '\0011\02' single/separate states; '\01I\02' Irix/Solaris mode\n"
|
||||
" Z\005,\001B\005 Global: '\001Z\002' change color mappings; '\001B\002' disable/enable bold\n"
|
||||
" l,t,m Toggle Summaries: '\001l\002' load avg; '\001t\002' task/cpu stats; '\001m\002' mem info\n"
|
||||
" 1,I Toggle SMP view: '\0011\002' single/separate states; '\001I\002' Irix/Solaris mode\n"
|
||||
" f,F Manage Fields: add/remove; change order; select sort field\n"
|
||||
"\n"
|
||||
" <,> . Move sort field: '\01<\02' next col left; '\01>\02' next col right\n"
|
||||
" R,H,V . Toggle: '\01R\02' norm/rev sort; '\01H\02' show threads; '\01V\02' forest view\n"
|
||||
" c,i,S . Toggle: '\01c\02' cmd name/line; '\01i\02' idle tasks; '\01S\02' cumulative time\n"
|
||||
" x\05,\01y\05 . Toggle highlights: '\01x\02' sort field; '\01y\02' running tasks\n"
|
||||
" z\05,\01b\05 . Toggle: '\01z\02' color/mono; '\01b\02' bold/reverse (only if 'x' or 'y')\n"
|
||||
" u,U . Show: '\01u\02' effective user; '\01U\02' real, saved, file or effective user\n"
|
||||
" <,> . Move sort field: '\001<\002' next col left; '\001>\002' next col right\n"
|
||||
" R,H,V . Toggle: '\001R\002' norm/rev sort; '\001H\002' show threads; '\001V\002' forest view\n"
|
||||
" c,i,S . Toggle: '\001c\002' cmd name/line; '\001i\002' idle tasks; '\001S\002' cumulative time\n"
|
||||
" x\005,\001y\005 . Toggle highlights: '\001x\002' sort field; '\001y\002' running tasks\n"
|
||||
" z\005,\001b\005 . Toggle: '\001z\002' color/mono; '\001b\002' bold/reverse (only if 'x' or 'y')\n"
|
||||
" u,U . Show: '\001u\002' effective user; '\001U\002' real, saved, file or effective user\n"
|
||||
" n or # . Set maximum tasks displayed\n"
|
||||
" C,... . Toggle scroll coordinates msg for: \01up\02,\01down\02,\01left\02,right\02,\01home\02,\01end\02\n"
|
||||
" C,... . Toggle scroll coordinates msg for: \001up\002,\001down\002,\001left\002,right\002,\001home\002,\001end\002\n"
|
||||
"\n"
|
||||
"%s"
|
||||
" W Write configuration file\n"
|
||||
" q Quit\n"
|
||||
" ( commands shown with '.' require a \01visible\02 task display \01window\02 ) \n"
|
||||
"Press '\01h\02' or '\01?\02' for help with \01Windows\02,\n"
|
||||
" ( commands shown with '.' require a \001visible\002 task display \001window\002 ) \n"
|
||||
"Press '\001h\002' or '\001?\002' for help with \001Windows\002,\n"
|
||||
"any other key to continue "
|
||||
""));
|
||||
Uniq_nlstab[KEYS_helpbas_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
" k,r Manipulate tasks: '\01k\02' kill; '\01r\02' renice\n"
|
||||
/* Translation Hint: As is true for the text above, the "keys" shown to the left and
|
||||
. also imbedded in the translatable text (along with escape seqs)
|
||||
. should never themselves be translated. */
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
" k,r Manipulate tasks: '\001k\002' kill; '\001r\002' renice\n"
|
||||
" d or s Set update interval\n"
|
||||
""));
|
||||
Uniq_nlstab[KEYS_helpext_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"Help for Windows / Field Groups\02 - \"Current Window\" = \01 %s \06\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"Help for Windows / Field Groups\002 - \"Current Window\" = \001 %s \006\n"
|
||||
"\n"
|
||||
". Use multiple \01windows\02, each with separate config opts (color,fields,sort,etc)\n"
|
||||
". The 'current' window controls the \01Summary Area\02 and responds to your \01Commands\02\n"
|
||||
" . that window's \01task display\02 can be turned \01Off\02 & \01On\02, growing/shrinking others\n"
|
||||
" . with \01NO\02 task display, some commands will be \01disabled\02 ('i','R','n','c', etc)\n"
|
||||
" until a \01different window\02 has been activated, making it the 'current' window\n"
|
||||
". You \01change\02 the 'current' window by: \01 1\02) cycling forward/backward;\01 2\02) choosing\n"
|
||||
" a specific field group; or\01 3\02) exiting the color mapping or fields screens\n"
|
||||
". Commands \01available anytime -------------\02\n"
|
||||
" A . Alternate display mode toggle, show \01Single\02 / \01Multiple\02 windows\n"
|
||||
". Use multiple \001windows\002, each with separate config opts (color,fields,sort,etc)\n"
|
||||
". The 'current' window controls the \001Summary Area\002 and responds to your \001Commands\002\n"
|
||||
" . that window's \001task display\002 can be turned \001Off\002 & \001On\002, growing/shrinking others\n"
|
||||
" . with \001NO\002 task display, some commands will be \001disabled\002 ('i','R','n','c', etc)\n"
|
||||
" until a \001different window\002 has been activated, making it the 'current' window\n"
|
||||
". You \001change\002 the 'current' window by: \001 1\002) cycling forward/backward;\001 2\002) choosing\n"
|
||||
" a specific field group; or\001 3\002) exiting the color mapping or fields screens\n"
|
||||
". Commands \001available anytime -------------\002\n"
|
||||
" A . Alternate display mode toggle, show \001Single\002 / \001Multiple\002 windows\n"
|
||||
" g . Choose another field group and make it 'current', or change now\n"
|
||||
" by selecting a number from: \01 1\02 =%s;\01 2\02 =%s;\01 3\02 =%s; or\01 4\02 =%s\n"
|
||||
". Commands \01requiring\02 '\01A\02' mode\01 -------------\02\n"
|
||||
" G . Change the \01Name\05 of the 'current' window/field group\n"
|
||||
" \01*\04 a , w . Cycle through all four windows: '\01a\05' Forward; '\01w\05' Backward\n"
|
||||
" \01*\04 - , _ . Show/Hide: '\01-\05' \01Current\02 window; '\01_\05' all \01Visible\02/\01Invisible\02\n"
|
||||
" by selecting a number from: \001 1\002 =%s;\001 2\002 =%s;\001 3\002 =%s; or\001 4\002 =%s\n"
|
||||
". Commands \001requiring\002 '\001A\002' mode\001 -------------\002\n"
|
||||
" G . Change the \001Name\005 of the 'current' window/field group\n"
|
||||
" \001*\004 a , w . Cycle through all four windows: '\001a\005' Forward; '\001w\005' Backward\n"
|
||||
" \001*\004 - , _ . Show/Hide: '\001-\005' \001Current\002 window; '\001_\005' all \001Visible\002/\001Invisible\002\n"
|
||||
" The screen will be divided evenly between task displays. But you can make\n"
|
||||
" some \01larger\02 or \01smaller\02, using '\01n\02' and '\01i\02' commands. Then later you could:\n"
|
||||
" \01*\04 = , + . Rebalance tasks: '\01=\05' \01Current\02 window; '\01+\05' \01Every\02 window\n"
|
||||
" (this also forces the \01current\02 or \01every\02 window to become visible)\n"
|
||||
" some \001larger\002 or \001smaller\002, using '\001n\002' and '\001i\002' commands. Then later you could:\n"
|
||||
" \001*\004 = , + . Rebalance tasks: '\001=\005' \001Current\002 window; '\001+\005' \001Every\002 window\n"
|
||||
" (this also forces the \001current\002 or \001every\002 window to become visible)\n"
|
||||
"\n"
|
||||
"In '\01A\02' mode, '\01*\04' keys are your \01essential\02 commands. Please try the '\01a\02' and '\01w\02'\n"
|
||||
"In '\001A\002' mode, '\001*\004' keys are your \001essential\002 commands. Please try the '\001a\002' and '\001w\002'\n"
|
||||
"commands plus the 'g' sub-commands NOW. Press <Enter> to make 'Current' "
|
||||
""));
|
||||
Uniq_nlstab[WINDOWS_help_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"Help for color mapping\02 - %s\n"
|
||||
"current window: \01%s\06\n"
|
||||
/* -----------------------------------------------------------------------
|
||||
. Note for Translators:
|
||||
. The following 'Help for color mapping' simulated screen should
|
||||
. probably NOT be translated due to complications caused by the
|
||||
. xgettext program.
|
||||
.
|
||||
. Some escape sequences will be converted as follows and there is
|
||||
. unfortunately NO way to prevent it.
|
||||
. \007 --> \a
|
||||
. \010 --> \b
|
||||
.
|
||||
. This means they will be lost in the clutter of other text. Besides,
|
||||
. the simulated screen is terribly hard to follow in this form and any
|
||||
. translation will likely produce extremly unpleasing results that are
|
||||
. unlikely to parallel the running top program.
|
||||
. */
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"Help for color mapping\002 - %s\n"
|
||||
"current window: \001%s\006\n"
|
||||
"\n"
|
||||
" color - 04:25:44 up 8 days, 50 min, 7 users, load average:\n"
|
||||
" Tasks:\03 64 \02total,\03 2 \03running,\03 62 \02sleeping,\03 0 \02stopped,\03\n"
|
||||
" %%Cpu(s):\03 76.5 \02user,\03 11.2 \02system,\03 0.0 \02nice,\03 12.3 \02idle\03\n"
|
||||
" \01 Nasty Message! \04 -or- \01Input Prompt\05\n"
|
||||
" \01 PID TTY PR NI %%CPU TIME+ VIRT SWAP S COMMAND \06\n"
|
||||
" 17284 \10pts/2 \07 8 0 0.0 0:00.75 1380 0 S /bin/bash \10\n"
|
||||
" \01 8601 pts/1 7 -10 0.4 0:00.03 916 0 R color -b -z\07\n"
|
||||
" 11005 \10? \07 9 0 0.0 0:02.50 2852 1008 S amor -sessi\10\n"
|
||||
" available toggles: \01B\02 =disable bold globally (\01%s\02),\n"
|
||||
" \01z\02 =color/mono (\01%s\02), \01b\02 =tasks \"bold\"/reverse (\01%s\02)\n"
|
||||
" Tasks:\003 64 \002total,\003 2 \003running,\003 62 \002sleeping,\003 0 \002stopped,\003\n"
|
||||
" %%Cpu(s):\003 76.5 \002user,\003 11.2 \002system,\003 0.0 \002nice,\003 12.3 \002idle\003\n"
|
||||
" \001 Nasty Message! \004 -or- \001Input Prompt\005\n"
|
||||
" \001 PID TTY PR NI %%CPU TIME+ VIRT SWAP S COMMAND \006\n"
|
||||
" 17284 \010pts/2 \007 8 0 0.0 0:00.75 1380 0 S /bin/bash \010\n"
|
||||
" \001 8601 pts/1 7 -10 0.4 0:00.03 916 0 R color -b -z\007\n"
|
||||
" 11005 \010? \007 9 0 0.0 0:02.50 2852 1008 S amor -sessi\010\n"
|
||||
" available toggles: \001B\002 =disable bold globally (\001%s\002),\n"
|
||||
" \001z\002 =color/mono (\001%s\002), \001b\002 =tasks \"bold\"/reverse (\001%s\002)\n"
|
||||
"\n"
|
||||
"Select \01target\02 as upper case letter:\n"
|
||||
" S\02 = Summary Data,\01 M\02 = Messages/Prompts,\n"
|
||||
" H\02 = Column Heads,\01 T\02 = Task Information\n"
|
||||
"Select \01color\02 as number:\n"
|
||||
" 0\02 = black,\01 1\02 = red, \01 2\02 = green,\01 3\02 = yellow,\n"
|
||||
" 4\02 = blue, \01 5\02 = magenta,\01 6\02 = cyan, \01 7\02 = white\n"
|
||||
"Select \001target\002 as upper case letter:\n"
|
||||
" S\002 = Summary Data,\001 M\002 = Messages/Prompts,\n"
|
||||
" H\002 = Column Heads,\001 T\002 = Task Information\n"
|
||||
"Select \001color\002 as number:\n"
|
||||
" 0\002 = black,\001 1\002 = red, \001 2\002 = green,\001 3\002 = yellow,\n"
|
||||
" 4\002 = blue, \001 5\002 = magenta,\001 6\002 = cyan, \001 7\002 = white\n"
|
||||
"\n"
|
||||
"Selected: \01target\02 \01 %c \04; \01color\02 \01 %d \04\n"
|
||||
" press 'q' to abort changes to window '\01%s\02'\n"
|
||||
"Selected: \001target\002 \001 %c \004; \001color\002 \001 %d \004\n"
|
||||
" press 'q' to abort changes to window '\001%s\002'\n"
|
||||
" press 'a' or 'w' to commit & change another, <Enter> to commit and end "
|
||||
""));
|
||||
Uniq_nlstab[COLOR_custom_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"Fields Management\02 for window \01%s\06, whose current sort field is \01%s\02\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"Fields Management\002 for window \001%s\006, whose current sort field is \001%s\002\n"
|
||||
" Navigate with Up/Dn, Right selects for move then <Enter> or Left commits,\n"
|
||||
" 'd' or <Space> toggles display, 's' sets sort. Use 'q' or <Esc> to end! "
|
||||
""));
|
||||
Uniq_nlstab[FIELD_header_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("%s:\03"
|
||||
" %3u \02total,\03 %3u \02running,\03 %3u \02sleeping,\03 %3u \02stopped,\03 %3u \02zombie\03\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _("%s:\003"
|
||||
" %3u \002total,\003 %3u \002running,\003 %3u \002sleeping,\003 %3u \002stopped,\003 %3u \002zombie\003\n"
|
||||
""));
|
||||
Uniq_nlstab[STATE_line_1_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\03"
|
||||
" %#5.1f \02user,\03 %#5.1f \02system,\03 %#5.1f \02nice,\03 %#5.1f \02idle\03\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\003"
|
||||
" %#5.1f \002user,\003 %#5.1f \002system,\003 %#5.1f \002nice,\003 %#5.1f \002idle\003\n"
|
||||
""));
|
||||
Uniq_nlstab[STATE_lin2x4_fmt] = strdup(buf);
|
||||
|
||||
/* These are the meanings for abbreviations used below:
|
||||
* lnx 2.5.x, procps-3.0.5 : IO-wait = i/o wait time
|
||||
* lnx 2.6.x, procps-3.1.12 : IO-wait now wa, hi = hard irq, si = soft irq
|
||||
* lnx 2.7.x, procps-3.2.7 : st = steal time */
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\03"
|
||||
" %#5.1f \02user,\03 %#5.1f \02system,\03 %#5.1f \02nice,\03 %#5.1f \02idle,\03 %#5.1f \02IO-wait\03\n"
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\003"
|
||||
" %#5.1f \002user,\003 %#5.1f \002system,\003 %#5.1f \002nice,\003 %#5.1f \002idle,\003 %#5.1f \002IO-wait\003\n"
|
||||
""));
|
||||
Uniq_nlstab[STATE_lin2x5_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\03"
|
||||
" %#5.1f \02us,\03 %#5.1f \02sy,\03 %#5.1f \02ni,\03 %#5.1f \02id,\03 %#5.1f \02wa,\03 %#5.1f \02hi,\03 %#5.1f \02si\03\n"
|
||||
/* Translation Hint: Only the following abbreviations need be translated
|
||||
. us = user, sy = system, ni = nice, id = idle, wa = wait,
|
||||
. hi hardware interrupt, si = software interrupt */
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\003"
|
||||
" %#5.1f \002us,\003 %#5.1f \002sy,\003 %#5.1f \002ni,\003 %#5.1f \002id,\003 %#5.1f \002wa,\003 %#5.1f \002hi,\003 %#5.1f \002si\003\n"
|
||||
""));
|
||||
Uniq_nlstab[STATE_lin2x6_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\03"
|
||||
"%#5.1f \02us,\03%#5.1f \02sy,\03%#5.1f \02ni,\03%#5.1f \02id,\03%#5.1f \02wa,\03%#5.1f \02hi,\03%#5.1f \02si,\03%#5.1f \02st\03\n"
|
||||
/* Translation Hint: Only the following abbreviations need be translated
|
||||
. us = user, sy = system, ni = nice, id = idle, wa = wait,
|
||||
. hi hardware interrupt, si = software interrupt, st = steal time */
|
||||
snprintf(buf, sizeof(buf), "%s", _("%%%s\003"
|
||||
"%#5.1f \002us,\003%#5.1f \002sy,\003%#5.1f \002ni,\003%#5.1f \002id,\003%#5.1f \002wa,\003%#5.1f \002hi,\003%#5.1f \002si,\003%#5.1f \002st\003\n"
|
||||
""));
|
||||
Uniq_nlstab[STATE_lin2x7_fmt] = strdup(buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s", _(
|
||||
"%s Mem: \03 %8lu \02total,\03 %8lu \02used,\03 %8lu \02free,\03 %8lu \02buffers\03\n"
|
||||
"%s Swap:\03 %8lu \02total,\03 %8lu \02used,\03 %8lu \02free,\03 %8lu \02cached\03\n"
|
||||
/* Translation Hint: Only the following need be translated
|
||||
. abbreviations: Mem = physical memory/ram, Swap = the linux swap file
|
||||
. words: total, used, free, buffers, cached */
|
||||
snprintf(buf, sizeof(buf), "%s", _(""
|
||||
"%s Mem: \003 %8lu \002total,\003 %8lu \002used,\003 %8lu \002free,\003 %8lu \002buffers\003\n"
|
||||
"%s Swap:\003 %8lu \002total,\003 %8lu \002used,\003 %8lu \002free,\003 %8lu \002cached\003\n"
|
||||
""));
|
||||
Uniq_nlstab[MEMORY_lines_fmt] = strdup(buf);
|
||||
}
|
||||
|
@ -19,8 +19,7 @@
|
||||
#ifndef _Itop_nls
|
||||
#define _Itop_nls
|
||||
|
||||
//#include "../include/c.h"
|
||||
#include "nls.h"
|
||||
#include "../include/nls.h"
|
||||
|
||||
/*
|
||||
* These are our three string tables with the following contents:
|
||||
@ -52,11 +51,11 @@ extern const char *Uniq_nlstab[];
|
||||
*/
|
||||
enum norm_nls {
|
||||
AMT_kilobyte_txt, AMT_megabyte_txt, AMT_gigabyte_txt, BAD_delayint_fmt,
|
||||
BAD_integers_txt, BAD_max_task_txt, BAD_mon_pids_fmt, BAD_niterate_arg,
|
||||
BAD_integers_txt, BAD_max_task_txt, BAD_mon_pids_fmt, BAD_niterate_fmt,
|
||||
BAD_numfloat_txt, BAD_signalid_txt, BAD_username_txt, BAD_widtharg_fmt,
|
||||
CHOOSE_group_txt, COLORS_nomap_txt, DELAY_badarg_txt, DELAY_change_fmt,
|
||||
DELAY_secure_txt, DISABLED_cmd_fmt, DISABLED_win_fmt, EXIT_signals_fmt,
|
||||
FAIL_alloc_c_txt, FAIL_alloc_r_txt, FAIL_openlib_txt, FAIL_rc_open_fmt,
|
||||
DELAY_secure_txt, DISABLED_cmd_txt, DISABLED_win_fmt, EXIT_signals_fmt,
|
||||
FAIL_alloc_c_txt, FAIL_alloc_r_txt, FAIL_openlib_fmt, FAIL_rc_open_fmt,
|
||||
FAIL_re_nice_fmt, FAIL_sigmask_fmt, FAIL_signals_fmt, FAIL_sigstop_fmt,
|
||||
FAIL_statget_txt, FAIL_statopn_fmt, FAIL_tty_get_txt, FAIL_tty_mod_fmt,
|
||||
FAIL_tty_raw_fmt, FAIL_widecpu_txt, FAIL_widepid_txt, FOREST_modes_fmt,
|
||||
|
Loading…
Reference in New Issue
Block a user