top: added additional xgettext strings plus translator hints

This commit is contained in:
Jim Warner 2011-11-07 03:08:27 -06:00 committed by Craig Small
parent de3ed5bff8
commit bc441a67ea
3 changed files with 22 additions and 5 deletions

View File

@ -3371,14 +3371,14 @@ static void summary_show (void) {
if (CHKw(w, View_CPUSUM)) {
// display just the 1st /proc/stat line
summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):"); // nls_maybe
summaryhlp(&smpcpu[Cpu_tot], N_txt(WORD_allcpus_txt));
Msg_row += 1;
} else {
int i;
char tmp[MEDBUFSIZ];
// display each cpu's states separately, screen height permitting...
for (i = 0; i < Cpu_tot; i++) {
snprintf(tmp, sizeof(tmp), "Cpu%-3d:", smpcpu[i].id); // nls_maybe
snprintf(tmp, sizeof(tmp), N_fmt(WORD_eachcpu_fmt), smpcpu[i].id);
summaryhlp(&smpcpu[i], tmp);
Msg_row += 1;
if (!isROOM(anyFLG, 1)) break;

View File

@ -267,7 +267,7 @@ static void build_norm_nlstab (void) {
Norm_nlstab[OFF_one_word_txt] = strdup(buf);
/* Translation Hint: Only the following words should be translated
. delay, limit, user, cols */
. delay, limit, user, cols (abbreviation for columns)*/
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);
@ -403,12 +403,18 @@ static void build_norm_nlstab (void) {
snprintf(buf, sizeof(buf), "%s", _("conflicting process selections (U/p/u)"));
Norm_nlstab[SELECT_clash_txt] = strdup(buf);
/* Translation Hint: This is an abbreviation (limit 2 characters) for:
. kilobytes (1000 bytes) */
snprintf(buf, sizeof(buf), "%s", _("Kb"));
Norm_nlstab[AMT_kilobyte_txt] = strdup(buf);
/* Translation Hint: This is an abbreviation (limit 2 characters) for:
. megabytes (1,000,000 bytes) */
snprintf(buf, sizeof(buf), "%s", _("Mb"));
Norm_nlstab[AMT_megabyte_txt] = strdup(buf);
/* Translation Hint: This is an abbreviation (limit 2 characters) for:
. gigabytes (1,000,000,000 bytes) */
snprintf(buf, sizeof(buf), "%s", _("Gb"));
Norm_nlstab[AMT_gigabyte_txt] = strdup(buf);
@ -417,6 +423,17 @@ static void build_norm_nlstab (void) {
snprintf(buf, sizeof(buf), "%s", _("Tasks"));
Norm_nlstab[WORD_process_txt] = strdup(buf);
/* Translation Hint: The following "word" is meant to represent either a single
. cpu or all of the processors in a multi-processor computer
. (should be exactly 6 characters, not counting the colon)*/
snprintf(buf, sizeof(buf), "%s", _("Cpu(s):"));
Norm_nlstab[WORD_allcpus_txt] = strdup(buf);
/* Translation Hint: The following "word" is meant to represent a single processor
. (should be exactly 3 characters) */
snprintf(buf, sizeof(buf), "%s", _("Cpu%-3d:"));
Norm_nlstab[WORD_eachcpu_fmt] = strdup(buf);
}

View File

@ -63,8 +63,8 @@ enum norm_nls {
NAME_windows_fmt, NOT_onsecure_txt, NOT_smp_cpus_txt, OFF_one_word_txt,
ON_word_only_txt, RC_bad_entry_fmt, RC_bad_files_fmt, SCROLL_coord_fmt,
SELECT_clash_txt, THREADS_show_fmt, TIME_accumed_fmt, UNKNOWN_cmds_txt,
UNKNOWN_opts_fmt, USAGE_abbrev_txt, WORD_process_txt, WORD_threads_txt,
WRITE_rcfile_fmt, WRONG_switch_fmt,
UNKNOWN_opts_fmt, USAGE_abbrev_txt, WORD_allcpus_txt, WORD_eachcpu_fmt,
WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt,
norm_MAX
};