]> granicus.if.org Git - procps-ng/commitdiff
top: added additional xgettext strings plus translator hints
authorJim Warner <james.warner@comcast.net>
Mon, 7 Nov 2011 09:08:27 +0000 (03:08 -0600)
committerCraig Small <csmall@enc.com.au>
Thu, 22 Dec 2011 12:48:05 +0000 (23:48 +1100)
top/top.c
top/top_nls.c
top/top_nls.h

index 0c248947b3c4ae70285cc63390df6bade1165cd2..a64ff8df702e34c5538c9b2eeb8c44f66bbbebe3 100644 (file)
--- 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;
index 96693ae7ab238ab4c9c2613177edcbf3622845dd..ffd64de56fa540b7d754fba3961d21c61696f04c 100644 (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);
 }
 
 
index 76395a5993f5bf70848b1ef4546d652e4676e9c3..1b029324f570c1ed152bf81623d254ae06d8d90c 100644 (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
 };