do {
meminfo();
- printf("%7s %10s %10s %10s %10s %10s %10s\n",
- "", _("total"), _("used"), _("free"), _("shared"),
- _("buffers"), _("cached"));
+ /* Translation Hint: You can use 9 character words in
+ * the header, and the words need to be right align to
+ * beginning of a number. */
+ printf("%s\n", _(" total used free shared buffers cached"));
printf("%-7s", _("Mem:"));
printf(" %10s", scale_size(kb_main_total, flags, args));
printf(" %10s", scale_size(kb_main_used, flags, args));
else if (argc - optind > 1)
usage (0);
else if (criteria_count == 0) {
- warnx(_("No matching criteria specified"));
+ warnx(_("no matching criteria specified"));
usage (0);
}
}
}
if (shmdt(addr))
- perror(_("shmdt"));
+ perror(_("shared memory detach"));
out_destroy:
if (shmctl(shmid, IPC_RMID, NULL))
- perror(_("IPC_RMID"));
+ perror(_("shared memory remove"));
return;
}
if (!q_option && (x_option | d_option)) {
if (x_option) {
if (sizeof(KLONG) == 4)
+ /* Translation Hint: Please keep
+ * alignment of the following four
+ * headers intact. */
printf
(_("Address Kbytes RSS Dirty Mode Mapping\n"));
else
}
if (!x_option && !d_option) {
if (sizeof(KLONG) == 8)
+ /* Translation Hint: keep total string length
+ * as 24 characters. Adjust %16 if needed*/
printf(_(" total %16ldK\n"),
(total_shared + total_private_writeable +
total_private_readonly) >> 10);
else
+ /* Translation Hint: keep total string length
+ * as 16 characters. Adjust %8 if needed*/
printf(_(" total %8ldK\n"),
(total_shared + total_private_writeable +
total_private_readonly) >> 10);
fprintf(stderr, _("archdefs:%s\n"), archdefs);
open_psdb(namelist_file);
- fprintf(stderr,_("namelist_file=\"%s\"\n"),namelist_file?namelist_file:"<no System.map file>");
+ fprintf(stderr,_("namelist_file=\"%s\"\n"),namelist_file?namelist_file:_("<no System.map file>"));
}
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options]\n", program_invocation_short_name);
+ _(" %s [options]\n"), program_invocation_short_name);
if (section == USAGE_SELECTION || section == USAGE_ALL) {
fputs(_("\nSimple options:\n"), out);
fputs(_(" -A all processes\n"), out);
fputs(_(" display help\n"), out);
}
if (section == USAGE_DEFAULT)
- fprintf(out,
- _("\n Try `%s --help <selection|list|output|threads|misc|all>'\n"
- " for more information.\n"), program_invocation_short_name);
+
+ /* Translation Hint: do not translate arguments, that breaks
+ * string comparison. Outputting something like following
+ * might work.
+ *
+ * Zry `%s --help <selection|list|output|threads|misc|all>
+ * (zlekzio|lizt|czreen vrites|threadz|mizc|trezt)
+ */
+ fprintf(out, _("\n Try `%s --help <selection|list|output|threads|misc|all>'\n"
+ " for more information.\n"), program_invocation_short_name);
fprintf(out, USAGE_MAN_TAIL("ps(1)"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
return _("Garbage option.");
break;
default:
- printf(_(" ? %s\n"),ps_argv[thisarg]);
+ printf(" ? %s\n",ps_argv[thisarg]);
return _("Something broke.");
} /* switch */
if(err) return err;
trailer = (otype=='b') ? "END_BSD" : "END_SYS5" ;
fnode = do_one_spec("pid",NULL);
- if(!fnode)fprintf(stderr,"Seriously crashing. Goodbye cruel world.\n");
+ if(!fnode)fprintf(stderr,_("Seriously crashing. Goodbye cruel world.\n"));
endp = sfn->f_cooked; while(endp->next) endp = endp->next; /* find end */
endp->next = fnode;
fnode = do_one_spec(trailer,NULL);
- if(!fnode) { fprintf(stderr,"Seriously crashing. Goodbye cruel world.\n"); exit(1); }
+ if(!fnode) { fprintf(stderr,_("Seriously crashing. Goodbye cruel world.\n")); exit(1); }
endp = fnode; while(endp->next) endp = endp->next; /* find end */
endp->next = sfn->f_cooked;
sfn->f_cooked = fnode;
// with sorting. Do the threads remain grouped, with sorting
// by process, or do the threads get sorted by themselves?
if(sort_list && (thread_flags&TF_no_sort)){
- return _("Tell procps@freelists.org what you expected.");
+ return _("Tell PACKAGE_BUGREPORT what you expected.");
}
// If nothing else, try to use $PS_FORMAT before the default.
if(tmp && *tmp){
const char *err;
sf_node sfn;
- if(thread_flags&TF_must_use) return _("Tell procps@freelists.org what you want. (-L/-T, -m/m/H, and $PS_FORMAT)");
+ if(thread_flags&TF_must_use) return _("Tell PACKAGE_BUGREPORT what you want. (-L/-T, -m/m/H, and $PS_FORMAT)");
sfn.sf = tmp;
sfn.f_cooked = NULL;
err = format_parse(&sfn);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
- fprintf(out, " %s [options] pid...\n", program_invocation_short_name);
+ fprintf(out, _(" %s [options] pid...\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(USAGE_HELP, out);
fputs(USAGE_VERSION, out);
{
int i;
+ /* Translation Hint: the following few messages to "CMD" are
+ * for debugging, and does not have to be translated. */
fprintf(stderr, _("signal: %d\n"), sig_or_pri);
fprintf(stderr, _("%d TTY: "), tty_count);
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options] <pid> [...]\n", program_invocation_short_name);
+ _(" %s [options] <pid> [...]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" <pid> [...] send signal to every <pid> listed\n"), out);
fputs(_(" -<signal>, -s, --signal <signal>\n"), out);
if (program == PROG_SKILL) {
fprintf(out,
- " %s [signal] [options] <expression>\n",
+ _(" %s [signal] [options] <expression>\n"),
program_invocation_short_name);
} else {
fprintf(out,
- " %s [new priority] [options] <expression>\n",
+ _(" %s [new priority] [options] <expression>\n"),
program_invocation_short_name);
}
fputs(USAGE_OPTIONS, out);
static void __attribute__((__noreturn__)) usage(FILE *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);
fprintf(out, _(" -d, --delay <secs> delay updates\n"));
fprintf(out, _(" -o, --once only display once, then exit\n"));
}
if (tcgetattr(STDIN_FILENO, &saved_tty) == -1)
- warn(_("tcgetattr"));
+ warn(_("terminal setting retrieval"));
old_rows = rows;
term_size(0);
" %-35s: %d / %d (%.1f%%)\n"
" %-35s: %.2fK / %.2fK (%.1f%%)\n"
" %-35s: %.2fK / %.2fK / %.2fK\n\n",
+ /* Translation Hint: Next five strings must not
+ * exceed 35 length in characters. */
_("Active / Total Objects (% used)"),
stats.nr_active_objs, stats.nr_objs,
100.0 * stats.nr_active_objs / stats.nr_objs,
slab_list = slabsort(slab_list);
attron(A_REVERSE);
- print_line("%6s %6s %4s %8s %6s %8s %10s %-23s\n",
- _("OBJS"), _("ACTIVE"), _("USE"), _("OBJ SIZE"),
- _("SLABS"), _("OBJ/SLAB"), _("CACHE SIZE"),
- _("NAME"));
+ /* Translation Hint: Please keep alignment of the
+ * following intact. */
+ printw("%-78s\n", _(" OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME"));
attroff(A_REVERSE);
curr = slab_list;
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options] [variable[=value] ...]\n", program_invocation_short_name);
+ _(" %s [options] [variable[=value] ...]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all display all variables\n"), out);
fputs(_(" -A alias of -a\n"), out);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
- fprintf(out, " %s [options] [tty]\n", program_invocation_short_name);
+ fprintf(out,
+ _(" %s [options] [tty]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -d, --delay <secs> update delay in seconds\n"), out);
fputs(_(" -s, --scale <num> vertical scale\n"), out);
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options] [delay [count]]\n",
+ _(" %s [options] [delay [count]]\n"),
program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --active active/inactive memory\n"), out);
static void new_header(void)
{
- printf
- ("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n");
+ /* Translation Hint: Translating folloging header & fields
+ * that follow (marked with max x chars) might not work,
+ * unless manual page is translated as well. */
+ printf(_("procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----\n"));
printf
("%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s\n",
- "r", "b", "swpd", "free", a_option ? "inact" : "buff",
- a_option ? "active" : "cache", "si", "so", "bi", "bo", "in", "cs",
- "us", "sy", "id", "wa");
+ /* Translation Hint: max 2 chars */
+ _("r"),
+ /* Translation Hint: max 2 chars */
+ _("b"),
+ /* Translation Hint: max 6 chars */
+ _("swpd"),
+ /* Translation Hint: max 6 chars */
+ _("free"),
+ /* Translation Hint: max 6 chars */
+ a_option ? _("inact") :
+ /* Translation Hint: max 6 chars */
+ _("buff"),
+ /* Translation Hint: max 6 chars */
+ a_option ? _("active") :
+ /* Translation Hint: max 6 chars */
+ _("cache"),
+ /* Translation Hint: max 4 chars */
+ _("si"),
+ /* Translation Hint: max 4 chars */
+ _("so"),
+ /* Translation Hint: max 5 chars */
+ _("bi"),
+ /* Translation Hint: max 5 chars */
+ _("bo"),
+ /* Translation Hint: max 4 chars */
+ _("in"),
+ /* Translation Hint: max 4 chars */
+ _("cs"),
+ /* Translation Hint: max 2 chars */
+ _("us"),
+ /* Translation Hint: max 2 chars */
+ _("sy"),
+ /* Translation Hint: max 2 chars */
+ _("id"),
+ /* Translation Hint: max 2 chars */
+ _("wa"));
}
static unsigned long unitConvert(unsigned int size)
static void diskpartition_header(const char *partition_name)
{
- printf("%-10s %10s %10s %10s %10s\n", partition_name, _("reads "),
- _("read sectors"), _("writes "), _("requested writes"));
+ printf("%-10s %10s %10s %10s %10s\n",
+ partition_name,
+ /* Translation Hint: Translating folloging disk partition
+ * header fields that follow (marked with max x chars) might
+ * not work, unless manual page is translated as well. */
+ /* Translation Hint: max 10 chars. The word is
+ * expected to be centralized, use spaces at the end
+ * to do that. */
+ _("reads "),
+ /* Translation Hint: max 10 chars */
+ _("read sectors"),
+ /* Translation Hint: max 10 chars. The word is
+ * expected to be centralized, use spaces at the end
+ * to do that. */
+ _("writes "),
+ /* Translation Hint: max 10 chars */
+ _("requested writes"));
}
static int diskpartition_format(const char *partition_name)
static void diskheader(void)
{
+ /* Translation Hint: Translating folloging header & fields
+ * that follow (marked with max x chars) might not work,
+ * unless manual page is translated as well. */
printf(_("disk- ------------reads------------ ------------writes----------- -----IO------\n"));
-
printf("%5s %6s %6s %7s %7s %6s %6s %7s %7s %6s %6s\n",
- " ", _("total"), _("merged"), _("sectors"), _("ms"), _("total"),
- _("merged"), _("sectors"), _("ms"), _("cur"), _("sec"));
+ " ",
+ /* Translation Hint: max 6 chars */
+ _("total"),
+ /* Translation Hint: max 6 chars */
+ _("merged"),
+ /* Translation Hint: max 7 chars */
+ _("sectors"),
+ /* Translation Hint: max 7 chars */
+ _("ms"),
+ /* Translation Hint: max 6 chars */
+ _("total"),
+ /* Translation Hint: max 6 chars */
+ _("merged"),
+ /* Translation Hint: max 7 chars */
+ _("sectors"),
+ /* Translation Hint: max 7 chars */
+ _("ms"),
+ /* Translation Hint: max 6 chars */
+ _("cur"),
+ /* Translation Hint: max 6 chars */
+ _("sec"));
}
static void diskformat(void)
static void slabheader(void)
{
- printf("%-24s %6s %6s %6s %6s\n", _("Cache"), _("Num"), _("Total"),
- _("Size"), _("Pages"));
+ printf("%-24s %6s %6s %6s %6s\n",
+ /* Translation Hint: Translating folloging slab fields that
+ * follow (marked with max x chars) might not work, unless
+ * manual page is translated as well. */
+ /* Translation Hint: max 24 chars */
+ _("Cache"),
+ /* Translation Hint: max 6 chars */
+ _("Num"),
+ /* Translation Hint: max 6 chars */
+ _("Total"),
+ /* Translation Hint: max 6 chars */
+ _("Size"),
+ /* Translation Hint: max 6 chars */
+ _("Pages"));
}
static void slabformat(void)
break;
default:
errx(EXIT_FAILURE,
- _
- ("-S requires k, K, m or M (default is kb)"));
+ /* Translation Hint: do not change argument characters */
+ _("-S requires k, K, m or M (default is kb)"));
}
szDataUnit[0] = optarg[0];
break;
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options]\n", program_invocation_short_name);
+ _(" %s [options]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -h, --no-header do not print header\n"), out);
fputs(_(" -u, --no-current ignore current process username\n"), out);
if (header) {
/* print uptime and headers */
print_uptime();
- printf("%-*s TTY ", userlen, "USER");
+ /* Translation Hint: Following five uppercase messages are
+ * headers. Try to keep alignment intact. */
+ printf(_("%-*s TTY "), userlen, _("USER"));
if (from)
- printf("FROM ");
+ printf(_("FROM "));
if (longform)
- printf(" LOGIN@ IDLE JCPU PCPU WHAT\n");
+ printf(_(" LOGIN@ IDLE JCPU PCPU WHAT\n"));
else
- printf(" IDLE WHAT\n");
+ printf(_(" IDLE WHAT\n"));
}
utmpname(UTMP_FILE);
{
fputs(USAGE_HEADER, out);
fprintf(out,
- " %s [options] command\n", program_invocation_short_name);
+ _(" %s [options] command\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -b, --beep beep if command has a non-zero exit\n"), out);
fputs(_(" -c, --color interpret ANSI color sequences\n"), out);