Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:42.2
procps
0025-Split-help-lines-to-help-translators.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0025-Split-help-lines-to-help-translators.patch of Package procps
From 8a38cd5eb449c47450e31aa093635e8cfaaf2f73 Mon Sep 17 00:00:00 2001 From: Craig Small <csmall@enc.com.au> Date: Sat, 28 Dec 2013 09:25:39 +1100 Subject: [PATCH] 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> --- pidof.c | 8 ++-- pmap.c | 26 ++++++------ ps/help.c | 131 +++++++++++++++++++++++++++++-------------------------------- skill.c | 42 ++++++++++---------- slabtop.c | 28 ++++++------- watch.c | 20 +++++----- 6 files changed, 125 insertions(+), 130 deletions(-) diff --git pidof.c pidof.c index 2e0911d..6a38675 100644 --- pidof.c +++ pidof.c @@ -60,10 +60,10 @@ static int __attribute__ ((__noreturn__)) usage(int opt) fputs(USAGE_HEADER, fp); fprintf(fp, _(" %s [options] [program [...]]\n"), program_invocation_short_name); fputs(USAGE_OPTIONS, fp); - fputs(_(" -s, --single-shot return one PID only\n" - " -c, --check-root omit processes with different root\n" - " -x scripts too\n" - " -o, --omit-pid <PID,...> omit processes with PID\n"), fp); + fputs(_(" -s, --single-shot return one PID only\n"), fp); + fputs(_(" -c, --check-root omit processes with different root\n"), fp); + fputs(_(" -x scripts too\n"), fp); + fputs(_(" -o, --omit-pid <PID,...> omit processes with PID\n"), fp); fputs(USAGE_SEPARATOR, fp); fputs(USAGE_HELP, fp); fputs(USAGE_VERSION, fp); diff --git pmap.c pmap.c index 8f111a0..4ecabce 100644 --- pmap.c +++ pmap.c @@ -108,19 +108,19 @@ usage(FILE * out) fprintf(out, _(" %s [options] pid [pid ...]\n"), program_invocation_short_name); fputs(USAGE_OPTIONS, out); - fputs(_(" -x, --extended show details\n" - " -X show even more details\n" - " WARNING: format changes according to /proc/PID/smaps\n" - " -XX show everything the kernel provides\n" - " -c, --read-rc read the default rc\n" - " -C, --read-rc-from=<file> read the rc from file\n" - " -n, --create-rc create new default rc\n" - " -N, --create-rc-to=<file> create new rc to file\n" - " NOTE: pid arguments are not allowed with -n, -N\n" - " -d, --device show the device format\n" - " -q, --quiet do not display header and footer\n" - " -p, --show-path show path in the mapping\n" - " -A, --range=<low>[,<high>] limit results to the given range\n"), out); + fputs(_(" -x, --extended show details\n"), out); + fputs(_(" -X show even more details\n"), out); + fputs(_(" WARNING: format changes according to /proc/PID/smaps\n"), out); + fputs(_(" -XX show everything the kernel provides\n"), out); + fputs(_(" -c, --read-rc read the default rc\n"), out); + fputs(_(" -C, --read-rc-from=<file> read the rc from file\n"), out); + fputs(_(" -n, --create-rc create new default rc\n"), out); + fputs(_(" -N, --create-rc-to=<file> create new rc to file\n"), out); + fputs(_(" NOTE: pid arguments are not allowed with -n, -N\n"), out); + fputs(_(" -d, --device show the device format\n"), out); + fputs(_(" -q, --quiet do not display header and footer\n"), out); + fputs(_(" -p, --show-path show path in the mapping\n"), out); + fputs(_(" -A, --range=<low>[,<high>] limit results to the given range\n"), out); fputs(USAGE_SEPARATOR, out); fputs(USAGE_HELP, out); fputs(USAGE_VERSION, out); diff --git ps/help.c ps/help.c index b536f1a..9133903 100644 --- ps/help.c +++ ps/help.c @@ -96,85 +96,80 @@ void do_help (const char *opt, int rc) { " %s [options]\n"), myname); if (section == HELP_SMP || section == HELP_ALL) { - fprintf(out, _("\n" - "Basic options:\n" - " -A, -e all processes\n" - " -a all with tty, except session leaders\n" - " a all with tty, including other users\n" - " -d all except session leaders\n" - " -N, --deselect negate selection\n" - " r only running processes\n" - " T all processes on this terminal\n" - " x processes without controlling ttys\n")); + fputs(_("\nBasic options:\n"), out); + fputs(_(" -A, -e all processes\n"), out); + fputs(_(" -a all with tty, except session leaders\n"), out); + fputs(_(" a all with tty, including other users\n"), out); + fputs(_(" -d all except session leaders\n"), out); + fputs(_(" -N, --deselect negate selection\n"), out); + fputs(_(" r only running processes\n"), out); + fputs(_(" T all processes on this terminal\n"), out); + fputs(_(" x processes without controlling ttys\n"), out); } if (section == HELP_LST || section == HELP_ALL) { - fprintf(out, _("\n" - "Selection by list:\n" - " -C <command> command name\n" - " -G, --Group <gid> real group id or name\n" - " -g, --group <group> session or effective group name\n" - " -p, --pid <pid> process id\n" - " --ppid <pid> select by parent process id\n" - " -s, --sid <session> session id\n" - " -t, t, --tty <tty> terminal\n" - " -u, U, --user <uid> effective user id or name\n" - " -U, --User <uid> real user id or name\n" - "\n" + fputs(_("\nSelection by list:\n"), out); + fputs(_(" -C <command> command name\n"), out); + fputs(_(" -G, --Group <gid> real group id or name\n"), out); + fputs(_(" -g, --group <group> session or effective group name\n"), out); + fputs(_(" -p, --pid <pid> process id\n"), out); + fputs(_(" --ppid <pid> select by parent process id\n"), out); + fputs(_(" -s, --sid <session> session id\n"), out); + fputs(_(" -t, t, --tty <tty> terminal\n"), out); + fputs(_(" -u, U, --user <uid> effective user id or name\n"), out); + fputs(_(" -U, --User <uid> real user id or name\n"), out); + fputs(_("\n" " selection <arguments> take either:\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) { - fprintf(out, _("\n" - "Output formats:\n" - " -F extra full\n" - " -f full-format, including command lines\n" - " f, --forest ascii art process tree\n" - " -H show process hierarchy\n" - " -j jobs format\n" - " j BSD job control format\n" - " -l long format\n" - " l BSD long format\n" - " -M, Z add security data (for SELinux)\n" - " -O <format> preloaded with default columns\n" - " O <format> as -O, with BSD personality\n" - " -o, o, --format <format>\n" - " user defined format\n" - " s signal format\n" - " u user-oriented format\n" - " v virtual memory format\n" - " X register format\n" - " -y do not show flags, show rrs vs. addr (used with -l)\n" - " --context display security context (for SELinux)\n" - " --headers repeat header lines, one per page\n" - " --no-headers do not print header at all\n" - " --cols, --columns, --width <num>\n" - " set screen width\n" - " --rows, --lines <num>\n" - " set screen height\n")); + fputs(_("\nOutput formats:\n"), out); + fputs(_(" -F extra full\n"), out); + fputs(_(" -f full-format, including command lines\n"), out); + fputs(_(" f, --forest ascii art process tree\n"), out); + fputs(_(" -H show process hierarchy\n"), out); + fputs(_(" -j jobs format\n"), out); + fputs(_(" j BSD job control format\n"), out); + fputs(_(" -l long format\n"), out); + fputs(_(" l BSD long format\n"), out); + fputs(_(" -M, Z add security data (for SELinux)\n"), out); + fputs(_(" -O <format> preloaded with default columns\n"), out); + fputs(_(" O <format> as -O, with BSD personality\n"), out); + fputs(_(" -o, o, --format <format>\n" + " user defined format\n"), out); + fputs(_(" s signal format\n"), out); + fputs(_(" u user-oriented format\n"), out); + fputs(_(" v virtual memory format\n"), out); + fputs(_(" X register format\n"), out); + fputs(_(" -y do not show flags, show rrs vs. addr (used with -l)\n"), out); + fputs(_(" --context display security context (for SELinux)\n"), out); + fputs(_(" --headers repeat header lines, one per page\n"), out); + fputs(_(" --no-headers do not print header at all\n"), out); + fputs(_(" --cols, --columns, --width <num>\n" + " set screen width\n"), out); + fputs(_(" --rows, --lines <num>\n" + " set screen height\n"), out); } if (section == HELP_THD || section == HELP_ALL) { - fprintf(out, _("\n" - "Show threads:\n" - " H as if they where processes\n" - " -L possibly with LWP and NLWP columns\n" - " -m, m after processes\n" - " -T possibly with SPID column\n")); + fputs(_("\nShow threads:\n"), out); + fputs(_(" H as if they where processes\n"), out); + fputs(_(" -L possibly with LWP and NLWP columns\n"), out); + fputs(_(" -m, m after processes\n"), out); + fputs(_(" -T possibly with SPID column\n"), out); } 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" - "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" " display help and exit\n") , the_word_help diff --git skill.c skill.c index 01b29cb..5c8192a 100644 --- skill.c +++ skill.c @@ -324,11 +324,11 @@ static void __attribute__ ((__noreturn__)) kill_usage(FILE * out) fprintf(out, _(" %s [options] <pid> [...]\n"), program_invocation_short_name); fputs(USAGE_OPTIONS, out); - fputs(_(" <pid> [...] send signal to every <pid> listed\n" - " -<signal>, -s, --signal <signal>\n" - " specify the <signal> to be sent\n" - " -l, --list=[<signal>] list all signal names, or convert one to a name\n" - " -L, --table list all signal names in a nice table\n"), out); + fputs(_(" <pid> [...] send signal to every <pid> listed\n"), out); + fputs(_(" -<signal>, -s, --signal <signal>\n" + " specify the <signal> to be sent\n"), out); + fputs(_(" -l, --list=[<signal>] list all signal names, or convert one to a name\n"), out); + fputs(_(" -L, --table list all signal names in a nice table\n"), out); fputs(USAGE_SEPARATOR, out); fputs(USAGE_HELP, out); fputs(USAGE_VERSION, out); @@ -351,25 +351,25 @@ static void __attribute__ ((__noreturn__)) skillsnice_usage(FILE * out) program_invocation_short_name); } fputs(USAGE_OPTIONS, out); - fputs(_(" -f, --fast fast mode (not implemented)\n" - " -i, --interactive interactive\n" - " -l, --list list all signal names\n" - " -L, --table list all signal names in a nice table\n" - " -n, --no-action no action\n" - " -v, --verbose explain what is being done\n" - " -w, --warnings enable warnings (not implemented)\n"), out); + fputs(_(" -f, --fast fast mode (not implemented)\n"), out); + fputs(_(" -i, --interactive interactive\n"), out); + fputs(_(" -l, --list list all signal names\n"), out); + fputs(_(" -L, --table list all signal names in a nice table\n"), out); + fputs(_(" -n, --no-action no action\n"), out); + fputs(_(" -v, --verbose explain what is being done\n"), out); + fputs(_(" -w, --warnings enable warnings (not implemented)\n"), out); fputs(USAGE_SEPARATOR, out); fputs(_("Expression can be: terminal, user, pid, command.\n" - "The options below may be used to ensure correct interpretation.\n" - " -c, --command <command> expression is a command name\n" - " -p, --pid <pid> expression is a process id number\n" - " -t, --tty <tty> expression is a terminal\n" - " -u, --user <username> expression is a username\n"), out); + "The options below may be used to ensure correct interpretation.\n"), out); + fputs(_(" -c, --command <command> expression is a command name\n"), out); + fputs(_(" -p, --pid <pid> expression is a process id number\n"), out); + fputs(_(" -t, --tty <tty> expression is a terminal\n"), out); + fputs(_(" -u, --user <username> expression is a username\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(_("Alternatively, expression can be:\n" - " --ns <pid> match the processes that belong to the same\n" - " namespace as <pid>\n" - " --nslist <ns,...> list which namespaces will be considered for\n" + fputs(_("Alternatively, expression can be:\n"), out); + fputs(_(" --ns <pid> match the processes that belong to the same\n" + " namespace as <pid>\n"), out); + fputs(_(" --nslist <ns,...> list which namespaces will be considered for\n" " the --ns option.\n" " Available namespaces: ipc, mnt, net, pid, user, uts\n"), out); diff --git slabtop.c slabtop.c index dc89c4d..c135ec5 100644 --- slabtop.c +++ slabtop.c @@ -188,24 +188,24 @@ static void __attribute__((__noreturn__)) usage(FILE *out) fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options]\n"), program_invocation_short_name); fputs(USAGE_OPTIONS, out); - fputs(_(" -d, --delay <secs> delay updates\n" - " -o, --once only display once, then exit\n" - " -s, --sort <char> specify sort criteria by character (see below)\n"), out); + fputs(_(" -d, --delay <secs> delay updates\n"), out); + fputs(_(" -o, --once only display once, then exit\n"), out); + fputs(_(" -s, --sort <char> specify sort criteria by character (see below)\n"), out); fputs(USAGE_SEPARATOR, out); fputs(USAGE_HELP, out); fputs(USAGE_VERSION, out); - fputs(_("\nThe following are valid sort criteria:\n" - " a: sort by number of active objects\n" - " b: sort by objects per slab\n" - " c: sort by cache size\n" - " l: sort by number of slabs\n" - " v: sort by number of active slabs\n" - " n: sort by name\n" - " o: sort by number of objects (the default)\n" - " p: sort by pages per slab\n" - " s: sort by object size\n" - " u: sort by cache utilization\n"), out); + fputs(_("\nThe following are valid sort criteria:\n"), out); + fputs(_(" a: sort by number of active objects\n"), out); + fputs(_(" b: sort by objects per slab\n"), out); + fputs(_(" c: sort by cache size\n"), out); + fputs(_(" l: sort by number of slabs\n"), out); + fputs(_(" v: sort by number of active slabs\n"), out); + fputs(_(" n: sort by name\n"), out); + fputs(_(" o: sort by number of objects (the default)\n"), out); + fputs(_(" p: sort by pages per slab\n"), out); + fputs(_(" s: sort by object size\n"), out); + fputs(_(" u: sort by cache utilization\n"), out); fprintf(out, USAGE_MAN_TAIL("slabtop(1)")); exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); diff --git watch.c watch.c index 436d213..032dfb7 100644 --- watch.c +++ watch.c @@ -88,16 +88,16 @@ static void __attribute__ ((__noreturn__)) fprintf(out, _(" %s [options] command\n"), program_invocation_short_name); fputs(USAGE_OPTIONS, out); - fputs(_(" -b, --beep beep if command has a non-zero exit\n" - " -c, --color interpret ANSI color sequences\n" - " -d, --differences[=<permanent>]\n" - " highlight changes between updates\n" - " -e, --errexit exit if command has a non-zero exit\n" - " -g, --chgexit exit when output from command changes\n" - " -n, --interval <secs> seconds to wait between updates\n" - " -p, --precise attempt run command in precise intervals\n" - " -t, --no-title turn off header\n" - " -x, --exec pass command to exec instead of \"sh -c\"\n"), out); + fputs(_(" -b, --beep beep if command has a non-zero exit\n"), out); + fputs(_(" -c, --color interpret ANSI color sequences\n"), out); + fputs(_(" -d, --differences[=<permanent>]\n" + " highlight changes between updates\n"), out); + fputs(_(" -e, --errexit exit if command has a non-zero exit\n"), out); + fputs(_(" -g, --chgexit exit when output from command changes\n"), out); + fputs(_(" -n, --interval <secs> seconds to wait between updates\n"), out); + fputs(_(" -p, --precise attempt run command in precise intervals\n"), out); + fputs(_(" -t, --no-title turn off header\n"), out); + fputs(_(" -x, --exec pass command to exec instead of \"sh -c\"\n"), out); fputs(USAGE_SEPARATOR, out); fputs(USAGE_HELP, out); fputs(_(" -v, --version output version information and exit\n"), out); -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor