summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2011-11-07 03:08:27 -0600
committerCraig Small <csmall@enc.com.au>2011-12-22 23:48:05 +1100
commitbc441a67ea51f7f7258b6b351f8811808caa7584 (patch)
tree29fb813fdc6cd542b60aba1e7f32230861c22b8d
parentde3ed5bff8cdab0aac51de7941ff1b38884ee93e (diff)
downloadprocps-ng-bc441a67ea51f7f7258b6b351f8811808caa7584.tar.gz
top: added additional xgettext strings plus translator hints
-rw-r--r--top/top.c4
-rw-r--r--top/top_nls.c19
-rw-r--r--top/top_nls.h4
3 files changed, 22 insertions, 5 deletions
diff --git a/top/top.c b/top/top.c
index 0c24894..a64ff8d 100644
--- a/top/top.c
+++ b/top/top.c
@@ -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;
diff --git a/top/top_nls.c b/top/top_nls.c
index 96693ae..ffd64de 100644
--- a/top/top_nls.c
+++ b/top/top_nls.c
@@ -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);
}
diff --git a/top/top_nls.h b/top/top_nls.h
index 76395a5..1b02932 100644
--- a/top/top_nls.h
+++ b/top/top_nls.h
@@ -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
};