Split help lines to help translators
To assist translators, the help lines are split so that each translation chunk has one option. This gives bonus of if we add or change an option, only that option remains untranslated rather than the entire help block. Reference: http://www.freelists.org/post/procps/procpsng-for-Translation-Project,1 Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
parent
7f6efed9bb
commit
8a38cd5eb4
8
pidof.c
8
pidof.c
@ -60,10 +60,10 @@ static int __attribute__ ((__noreturn__)) usage(int opt)
|
|||||||
fputs(USAGE_HEADER, fp);
|
fputs(USAGE_HEADER, fp);
|
||||||
fprintf(fp, _(" %s [options] [program [...]]\n"), program_invocation_short_name);
|
fprintf(fp, _(" %s [options] [program [...]]\n"), program_invocation_short_name);
|
||||||
fputs(USAGE_OPTIONS, fp);
|
fputs(USAGE_OPTIONS, fp);
|
||||||
fputs(_(" -s, --single-shot return one PID only\n"
|
fputs(_(" -s, --single-shot return one PID only\n"), fp);
|
||||||
" -c, --check-root omit processes with different root\n"
|
fputs(_(" -c, --check-root omit processes with different root\n"), fp);
|
||||||
" -x scripts too\n"
|
fputs(_(" -x scripts too\n"), fp);
|
||||||
" -o, --omit-pid <PID,...> omit processes with PID\n"), fp);
|
fputs(_(" -o, --omit-pid <PID,...> omit processes with PID\n"), fp);
|
||||||
fputs(USAGE_SEPARATOR, fp);
|
fputs(USAGE_SEPARATOR, fp);
|
||||||
fputs(USAGE_HELP, fp);
|
fputs(USAGE_HELP, fp);
|
||||||
fputs(USAGE_VERSION, fp);
|
fputs(USAGE_VERSION, fp);
|
||||||
|
26
pmap.c
26
pmap.c
@ -108,19 +108,19 @@ usage(FILE * out)
|
|||||||
fprintf(out,
|
fprintf(out,
|
||||||
_(" %s [options] pid [pid ...]\n"), program_invocation_short_name);
|
_(" %s [options] pid [pid ...]\n"), program_invocation_short_name);
|
||||||
fputs(USAGE_OPTIONS, out);
|
fputs(USAGE_OPTIONS, out);
|
||||||
fputs(_(" -x, --extended show details\n"
|
fputs(_(" -x, --extended show details\n"), out);
|
||||||
" -X show even more details\n"
|
fputs(_(" -X show even more details\n"), out);
|
||||||
" WARNING: format changes according to /proc/PID/smaps\n"
|
fputs(_(" WARNING: format changes according to /proc/PID/smaps\n"), out);
|
||||||
" -XX show everything the kernel provides\n"
|
fputs(_(" -XX show everything the kernel provides\n"), out);
|
||||||
" -c, --read-rc read the default rc\n"
|
fputs(_(" -c, --read-rc read the default rc\n"), out);
|
||||||
" -C, --read-rc-from=<file> read the rc from file\n"
|
fputs(_(" -C, --read-rc-from=<file> read the rc from file\n"), out);
|
||||||
" -n, --create-rc create new default rc\n"
|
fputs(_(" -n, --create-rc create new default rc\n"), out);
|
||||||
" -N, --create-rc-to=<file> create new rc to file\n"
|
fputs(_(" -N, --create-rc-to=<file> create new rc to file\n"), out);
|
||||||
" NOTE: pid arguments are not allowed with -n, -N\n"
|
fputs(_(" NOTE: pid arguments are not allowed with -n, -N\n"), out);
|
||||||
" -d, --device show the device format\n"
|
fputs(_(" -d, --device show the device format\n"), out);
|
||||||
" -q, --quiet do not display header and footer\n"
|
fputs(_(" -q, --quiet do not display header and footer\n"), out);
|
||||||
" -p, --show-path show path in the mapping\n"
|
fputs(_(" -p, --show-path show path in the mapping\n"), out);
|
||||||
" -A, --range=<low>[,<high>] limit results to the given range\n"), out);
|
fputs(_(" -A, --range=<low>[,<high>] limit results to the given range\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(USAGE_HELP, out);
|
fputs(USAGE_HELP, out);
|
||||||
fputs(USAGE_VERSION, out);
|
fputs(USAGE_VERSION, out);
|
||||||
|
131
ps/help.c
131
ps/help.c
@ -96,85 +96,80 @@ void do_help (const char *opt, int rc) {
|
|||||||
" %s [options]\n"), myname);
|
" %s [options]\n"), myname);
|
||||||
|
|
||||||
if (section == HELP_SMP || section == HELP_ALL) {
|
if (section == HELP_SMP || section == HELP_ALL) {
|
||||||
fprintf(out, _("\n"
|
fputs(_("\nBasic options:\n"), out);
|
||||||
"Basic options:\n"
|
fputs(_(" -A, -e all processes\n"), out);
|
||||||
" -A, -e all processes\n"
|
fputs(_(" -a all with tty, except session leaders\n"), out);
|
||||||
" -a all with tty, except session leaders\n"
|
fputs(_(" a all with tty, including other users\n"), out);
|
||||||
" a all with tty, including other users\n"
|
fputs(_(" -d all except session leaders\n"), out);
|
||||||
" -d all except session leaders\n"
|
fputs(_(" -N, --deselect negate selection\n"), out);
|
||||||
" -N, --deselect negate selection\n"
|
fputs(_(" r only running processes\n"), out);
|
||||||
" r only running processes\n"
|
fputs(_(" T all processes on this terminal\n"), out);
|
||||||
" T all processes on this terminal\n"
|
fputs(_(" x processes without controlling ttys\n"), out);
|
||||||
" x processes without controlling ttys\n"));
|
|
||||||
}
|
}
|
||||||
if (section == HELP_LST || section == HELP_ALL) {
|
if (section == HELP_LST || section == HELP_ALL) {
|
||||||
fprintf(out, _("\n"
|
fputs(_("\nSelection by list:\n"), out);
|
||||||
"Selection by list:\n"
|
fputs(_(" -C <command> command name\n"), out);
|
||||||
" -C <command> command name\n"
|
fputs(_(" -G, --Group <gid> real group id or name\n"), out);
|
||||||
" -G, --Group <gid> real group id or name\n"
|
fputs(_(" -g, --group <group> session or effective group name\n"), out);
|
||||||
" -g, --group <group> session or effective group name\n"
|
fputs(_(" -p, --pid <pid> process id\n"), out);
|
||||||
" -p, --pid <pid> process id\n"
|
fputs(_(" --ppid <pid> select by parent process id\n"), out);
|
||||||
" --ppid <pid> select by parent process id\n"
|
fputs(_(" -s, --sid <session> session id\n"), out);
|
||||||
" -s, --sid <session> session id\n"
|
fputs(_(" -t, t, --tty <tty> terminal\n"), out);
|
||||||
" -t, t, --tty <tty> terminal\n"
|
fputs(_(" -u, U, --user <uid> effective user id or name\n"), out);
|
||||||
" -u, U, --user <uid> effective user id or name\n"
|
fputs(_(" -U, --User <uid> real user id or name\n"), out);
|
||||||
" -U, --User <uid> real user id or name\n"
|
fputs(_("\n"
|
||||||
"\n"
|
|
||||||
" selection <arguments> take either:\n"
|
" selection <arguments> take either:\n"
|
||||||
" comma-separated list e.g. '-u root,nobody' or\n"
|
" comma-separated list e.g. '-u root,nobody' or\n"
|
||||||
" blank-separated list e.g. '-p 123 4567'\n"));
|
" blank-separated list e.g. '-p 123 4567'\n"), out);
|
||||||
}
|
}
|
||||||
if (section == HELP_OUT || section == HELP_ALL) {
|
if (section == HELP_OUT || section == HELP_ALL) {
|
||||||
fprintf(out, _("\n"
|
fputs(_("\nOutput formats:\n"), out);
|
||||||
"Output formats:\n"
|
fputs(_(" -F extra full\n"), out);
|
||||||
" -F extra full\n"
|
fputs(_(" -f full-format, including command lines\n"), out);
|
||||||
" -f full-format, including command lines\n"
|
fputs(_(" f, --forest ascii art process tree\n"), out);
|
||||||
" f, --forest ascii art process tree\n"
|
fputs(_(" -H show process hierarchy\n"), out);
|
||||||
" -H show process hierarchy\n"
|
fputs(_(" -j jobs format\n"), out);
|
||||||
" -j jobs format\n"
|
fputs(_(" j BSD job control format\n"), out);
|
||||||
" j BSD job control format\n"
|
fputs(_(" -l long format\n"), out);
|
||||||
" -l long format\n"
|
fputs(_(" l BSD long format\n"), out);
|
||||||
" l BSD long format\n"
|
fputs(_(" -M, Z add security data (for SELinux)\n"), out);
|
||||||
" -M, Z add security data (for SELinux)\n"
|
fputs(_(" -O <format> preloaded with default columns\n"), out);
|
||||||
" -O <format> preloaded with default columns\n"
|
fputs(_(" O <format> as -O, with BSD personality\n"), out);
|
||||||
" O <format> as -O, with BSD personality\n"
|
fputs(_(" -o, o, --format <format>\n"
|
||||||
" -o, o, --format <format>\n"
|
" user defined format\n"), out);
|
||||||
" user defined format\n"
|
fputs(_(" s signal format\n"), out);
|
||||||
" s signal format\n"
|
fputs(_(" u user-oriented format\n"), out);
|
||||||
" u user-oriented format\n"
|
fputs(_(" v virtual memory format\n"), out);
|
||||||
" v virtual memory format\n"
|
fputs(_(" X register format\n"), out);
|
||||||
" X register format\n"
|
fputs(_(" -y do not show flags, show rrs vs. addr (used with -l)\n"), out);
|
||||||
" -y do not show flags, show rrs vs. addr (used with -l)\n"
|
fputs(_(" --context display security context (for SELinux)\n"), out);
|
||||||
" --context display security context (for SELinux)\n"
|
fputs(_(" --headers repeat header lines, one per page\n"), out);
|
||||||
" --headers repeat header lines, one per page\n"
|
fputs(_(" --no-headers do not print header at all\n"), out);
|
||||||
" --no-headers do not print header at all\n"
|
fputs(_(" --cols, --columns, --width <num>\n"
|
||||||
" --cols, --columns, --width <num>\n"
|
" set screen width\n"), out);
|
||||||
" set screen width\n"
|
fputs(_(" --rows, --lines <num>\n"
|
||||||
" --rows, --lines <num>\n"
|
" set screen height\n"), out);
|
||||||
" set screen height\n"));
|
|
||||||
}
|
}
|
||||||
if (section == HELP_THD || section == HELP_ALL) {
|
if (section == HELP_THD || section == HELP_ALL) {
|
||||||
fprintf(out, _("\n"
|
fputs(_("\nShow threads:\n"), out);
|
||||||
"Show threads:\n"
|
fputs(_(" H as if they where processes\n"), out);
|
||||||
" H as if they where processes\n"
|
fputs(_(" -L possibly with LWP and NLWP columns\n"), out);
|
||||||
" -L possibly with LWP and NLWP columns\n"
|
fputs(_(" -m, m after processes\n"), out);
|
||||||
" -m, m after processes\n"
|
fputs(_(" -T possibly with SPID column\n"), out);
|
||||||
" -T possibly with SPID column\n"));
|
|
||||||
}
|
}
|
||||||
if (section == HELP_MSC || section == HELP_ALL) {
|
if (section == HELP_MSC || section == HELP_ALL) {
|
||||||
|
fputs(_("\nMiscellaneous options:\n"), out);
|
||||||
|
fputs(_(" -c show scheduling class with -l option\n"), out);
|
||||||
|
fputs(_(" c show true command name\n"), out);
|
||||||
|
fputs(_(" e show the environment after command\n"), out);
|
||||||
|
fputs(_(" k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]]\n"), out);
|
||||||
|
fputs(_(" L list format specifiers\n"), out);
|
||||||
|
fputs(_(" n display numeric uid and wchan\n"), out);
|
||||||
|
fputs(_(" S, --cumulative include some dead child process data\n"), out);
|
||||||
|
fputs(_(" -y do not show flags, show rss (only with -l)\n"), out);
|
||||||
|
fputs(_(" -V, V, --version display version information and exit\n"), out);
|
||||||
|
fputs(_(" -w, w unlimited output width\n"), out);
|
||||||
fprintf(out, _("\n"
|
fprintf(out, _("\n"
|
||||||
"Miscellaneous options:\n"
|
|
||||||
" -c show scheduling class with -l option\n"
|
|
||||||
" c show true command name\n"
|
|
||||||
" e show the environment after command\n"
|
|
||||||
" k, --sort specify sort order as: [+|-]key[,[+|-]key[,...]]\n"
|
|
||||||
" L list format specifiers\n"
|
|
||||||
" n display numeric uid and wchan\n"
|
|
||||||
" S, --cumulative include some dead child process data\n"
|
|
||||||
" -y do not show flags, show rss (only with -l)\n"
|
|
||||||
" -V, V, --version display version information and exit\n"
|
|
||||||
" -w, w unlimited output width\n"
|
|
||||||
"\n"
|
|
||||||
" --%s <%s|%s|%s|%s|%s|%s>\n"
|
" --%s <%s|%s|%s|%s|%s|%s>\n"
|
||||||
" display help and exit\n")
|
" display help and exit\n")
|
||||||
, the_word_help
|
, the_word_help
|
||||||
|
42
skill.c
42
skill.c
@ -324,11 +324,11 @@ static void __attribute__ ((__noreturn__)) kill_usage(FILE * out)
|
|||||||
fprintf(out,
|
fprintf(out,
|
||||||
_(" %s [options] <pid> [...]\n"), program_invocation_short_name);
|
_(" %s [options] <pid> [...]\n"), program_invocation_short_name);
|
||||||
fputs(USAGE_OPTIONS, out);
|
fputs(USAGE_OPTIONS, out);
|
||||||
fputs(_(" <pid> [...] send signal to every <pid> listed\n"
|
fputs(_(" <pid> [...] send signal to every <pid> listed\n"), out);
|
||||||
" -<signal>, -s, --signal <signal>\n"
|
fputs(_(" -<signal>, -s, --signal <signal>\n"
|
||||||
" specify the <signal> to be sent\n"
|
" specify the <signal> to be sent\n"), out);
|
||||||
" -l, --list=[<signal>] list all signal names, or convert one to a name\n"
|
fputs(_(" -l, --list=[<signal>] list all signal names, or convert one to a name\n"), out);
|
||||||
" -L, --table list all signal names in a nice table\n"), out);
|
fputs(_(" -L, --table list all signal names in a nice table\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(USAGE_HELP, out);
|
fputs(USAGE_HELP, out);
|
||||||
fputs(USAGE_VERSION, out);
|
fputs(USAGE_VERSION, out);
|
||||||
@ -351,25 +351,25 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out)
|
|||||||
program_invocation_short_name);
|
program_invocation_short_name);
|
||||||
}
|
}
|
||||||
fputs(USAGE_OPTIONS, out);
|
fputs(USAGE_OPTIONS, out);
|
||||||
fputs(_(" -f, --fast fast mode (not implemented)\n"
|
fputs(_(" -f, --fast fast mode (not implemented)\n"), out);
|
||||||
" -i, --interactive interactive\n"
|
fputs(_(" -i, --interactive interactive\n"), out);
|
||||||
" -l, --list list all signal names\n"
|
fputs(_(" -l, --list list all signal names\n"), out);
|
||||||
" -L, --table list all signal names in a nice table\n"
|
fputs(_(" -L, --table list all signal names in a nice table\n"), out);
|
||||||
" -n, --no-action no action\n"
|
fputs(_(" -n, --no-action no action\n"), out);
|
||||||
" -v, --verbose explain what is being done\n"
|
fputs(_(" -v, --verbose explain what is being done\n"), out);
|
||||||
" -w, --warnings enable warnings (not implemented)\n"), out);
|
fputs(_(" -w, --warnings enable warnings (not implemented)\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(_("Expression can be: terminal, user, pid, command.\n"
|
fputs(_("Expression can be: terminal, user, pid, command.\n"
|
||||||
"The options below may be used to ensure correct interpretation.\n"
|
"The options below may be used to ensure correct interpretation.\n"), out);
|
||||||
" -c, --command <command> expression is a command name\n"
|
fputs(_(" -c, --command <command> expression is a command name\n"), out);
|
||||||
" -p, --pid <pid> expression is a process id number\n"
|
fputs(_(" -p, --pid <pid> expression is a process id number\n"), out);
|
||||||
" -t, --tty <tty> expression is a terminal\n"
|
fputs(_(" -t, --tty <tty> expression is a terminal\n"), out);
|
||||||
" -u, --user <username> expression is a username\n"), out);
|
fputs(_(" -u, --user <username> expression is a username\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(_("Alternatively, expression can be:\n"
|
fputs(_("Alternatively, expression can be:\n"), out);
|
||||||
" --ns <pid> match the processes that belong to the same\n"
|
fputs(_(" --ns <pid> match the processes that belong to the same\n"
|
||||||
" namespace as <pid>\n"
|
" namespace as <pid>\n"), out);
|
||||||
" --nslist <ns,...> list which namespaces will be considered for\n"
|
fputs(_(" --nslist <ns,...> list which namespaces will be considered for\n"
|
||||||
" the --ns option.\n"
|
" the --ns option.\n"
|
||||||
" Available namespaces: ipc, mnt, net, pid, user, uts\n"), out);
|
" Available namespaces: ipc, mnt, net, pid, user, uts\n"), out);
|
||||||
|
|
||||||
|
28
slabtop.c
28
slabtop.c
@ -188,24 +188,24 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
|
|||||||
fputs(USAGE_HEADER, out);
|
fputs(USAGE_HEADER, out);
|
||||||
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
|
||||||
fputs(USAGE_OPTIONS, out);
|
fputs(USAGE_OPTIONS, out);
|
||||||
fputs(_(" -d, --delay <secs> delay updates\n"
|
fputs(_(" -d, --delay <secs> delay updates\n"), out);
|
||||||
" -o, --once only display once, then exit\n"
|
fputs(_(" -o, --once only display once, then exit\n"), out);
|
||||||
" -s, --sort <char> specify sort criteria by character (see below)\n"), out);
|
fputs(_(" -s, --sort <char> specify sort criteria by character (see below)\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(USAGE_HELP, out);
|
fputs(USAGE_HELP, out);
|
||||||
fputs(USAGE_VERSION, out);
|
fputs(USAGE_VERSION, out);
|
||||||
|
|
||||||
fputs(_("\nThe following are valid sort criteria:\n"
|
fputs(_("\nThe following are valid sort criteria:\n"), out);
|
||||||
" a: sort by number of active objects\n"
|
fputs(_(" a: sort by number of active objects\n"), out);
|
||||||
" b: sort by objects per slab\n"
|
fputs(_(" b: sort by objects per slab\n"), out);
|
||||||
" c: sort by cache size\n"
|
fputs(_(" c: sort by cache size\n"), out);
|
||||||
" l: sort by number of slabs\n"
|
fputs(_(" l: sort by number of slabs\n"), out);
|
||||||
" v: sort by number of active slabs\n"
|
fputs(_(" v: sort by number of active slabs\n"), out);
|
||||||
" n: sort by name\n"
|
fputs(_(" n: sort by name\n"), out);
|
||||||
" o: sort by number of objects (the default)\n"
|
fputs(_(" o: sort by number of objects (the default)\n"), out);
|
||||||
" p: sort by pages per slab\n"
|
fputs(_(" p: sort by pages per slab\n"), out);
|
||||||
" s: sort by object size\n"
|
fputs(_(" s: sort by object size\n"), out);
|
||||||
" u: sort by cache utilization\n"), out);
|
fputs(_(" u: sort by cache utilization\n"), out);
|
||||||
fprintf(out, USAGE_MAN_TAIL("slabtop(1)"));
|
fprintf(out, USAGE_MAN_TAIL("slabtop(1)"));
|
||||||
|
|
||||||
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||||
|
20
watch.c
20
watch.c
@ -88,16 +88,16 @@ static void __attribute__ ((__noreturn__))
|
|||||||
fprintf(out,
|
fprintf(out,
|
||||||
_(" %s [options] command\n"), program_invocation_short_name);
|
_(" %s [options] command\n"), program_invocation_short_name);
|
||||||
fputs(USAGE_OPTIONS, out);
|
fputs(USAGE_OPTIONS, out);
|
||||||
fputs(_(" -b, --beep beep if command has a non-zero exit\n"
|
fputs(_(" -b, --beep beep if command has a non-zero exit\n"), out);
|
||||||
" -c, --color interpret ANSI color sequences\n"
|
fputs(_(" -c, --color interpret ANSI color sequences\n"), out);
|
||||||
" -d, --differences[=<permanent>]\n"
|
fputs(_(" -d, --differences[=<permanent>]\n"
|
||||||
" highlight changes between updates\n"
|
" highlight changes between updates\n"), out);
|
||||||
" -e, --errexit exit if command has a non-zero exit\n"
|
fputs(_(" -e, --errexit exit if command has a non-zero exit\n"), out);
|
||||||
" -g, --chgexit exit when output from command changes\n"
|
fputs(_(" -g, --chgexit exit when output from command changes\n"), out);
|
||||||
" -n, --interval <secs> seconds to wait between updates\n"
|
fputs(_(" -n, --interval <secs> seconds to wait between updates\n"), out);
|
||||||
" -p, --precise attempt run command in precise intervals\n"
|
fputs(_(" -p, --precise attempt run command in precise intervals\n"), out);
|
||||||
" -t, --no-title turn off header\n"
|
fputs(_(" -t, --no-title turn off header\n"), out);
|
||||||
" -x, --exec pass command to exec instead of \"sh -c\"\n"), out);
|
fputs(_(" -x, --exec pass command to exec instead of \"sh -c\"\n"), out);
|
||||||
fputs(USAGE_SEPARATOR, out);
|
fputs(USAGE_SEPARATOR, out);
|
||||||
fputs(USAGE_HELP, out);
|
fputs(USAGE_HELP, out);
|
||||||
fputs(_(" -v, --version output version information and exit\n"), out);
|
fputs(_(" -v, --version output version information and exit\n"), out);
|
||||||
|
Loading…
Reference in New Issue
Block a user