top: adapted/generalized comments for Makevars --add-comments=

This commit is contained in:
Jim Warner 2011-11-06 17:08:43 -06:00 committed by Craig Small
parent 67034a9a4a
commit de3ed5bff8

View File

@ -37,11 +37,13 @@
// XGETTEXT_OPTION in po/Makevars, *any* preceeding c style
// comment will be propagated to the .pot file, providing
// that the gettext macro isn't empty as discussed above.
// However, this is far too aggressive so we have chosen
// the word 'Translation' to denote xgettext comments.
//
// /* Need Not Say 'TRANSLATORS': ...
// snprintf(buf, sizeof(buf), "%s", _( // unseen comment
//
// /* Translator Hint: ...
// /* Translation Hint: ...
// snprintf(buf, sizeof(buf), "%s", _("" // now it's seen!
//
// Translation, from po/ directory after make --------------
@ -89,16 +91,15 @@ const char *Uniq_nlstab[uniq_MAX];
static void build_desc_nlstab (void) {
char buf[SMLBUFSIZ];
/* -----------------------------------------------------------------------
. Note #1 for Translators:
/* Translation Notes ------------------------------------------------
. It is strongly recommend that the --no-wrap command line option
. be used with all supporting translation tools, when available.
.
. The following single lines contain only plain text used as
. the descriptions under Field Management when the 'f' key is typed.
. The following single lines contain only plain text used as the
. descriptions under Field Management when the 'f' key is typed.
.
. To avoid truncation, each translated line MUST be kept to a length
. of 20 characters or less.\n"
. To avoid truncation, each translated line MUST be kept to a
. length of 20 characters or less.
. */
snprintf(buf, sizeof(buf), "%s", _("Process Id"));
@ -194,8 +195,7 @@ static void build_desc_nlstab (void) {
static void build_norm_nlstab (void) {
char buf[MEDBUFSIZ];
/* -----------------------------------------------------------------------
. Note #2 for Translators:
/* Translation Notes ------------------------------------------------
. It is strongly recommend that the --no-wrap command line option
. be used with all supporting translation tools, when available.
.
@ -266,7 +266,7 @@ static void build_norm_nlstab (void) {
snprintf(buf, sizeof(buf), "%s", _("Off"));
Norm_nlstab[OFF_one_word_txt] = strdup(buf);
/* Translation Hint #1: Only the following words should be translated
/* Translation Hint: Only the following words should be translated
. delay, limit, user, cols */
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);
@ -426,8 +426,7 @@ static void build_norm_nlstab (void) {
static void build_uniq_nsltab (void) {
char buf[BIGBUFSIZ];
/* -----------------------------------------------------------------------
. Note #3 for Translators:
/* Translation Notes ------------------------------------------------
. It is strongly recommend that the --no-wrap command line option
. be used with all supporting translation tools, when available.
.
@ -479,7 +478,7 @@ static void build_uniq_nsltab (void) {
""));
Uniq_nlstab[KEYS_helpbas_fmt] = strdup(buf);
/* Translation Hint #2: As is true for the text above, the "keys" shown to the left and
/* Translation Hint: As is true for the text above, the "keys" shown to the left and
. also imbedded in the translatable text (along with escape seqs)
. should never themselves be translated. */
snprintf(buf, sizeof(buf), "%s", _(""
@ -516,15 +515,14 @@ static void build_uniq_nsltab (void) {
""));
Uniq_nlstab[WINDOWS_help_fmt] = strdup(buf);
/* -----------------------------------------------------------------------
. Note #4 for Translators:
/* Translation Notes ------------------------------------------------
. The following 'Help for color mapping' simulated screen should
. probably NOT be translated. It is terribly hard to follow in this
. form and any translation could produce unpleasing results that are
. unlikely to parallel the running top program.
. probably NOT be translated. It is terribly hard to follow in
. this form and any translation could produce unpleasing results
. that are unlikely to parallel the running top program.
.
. If you decide to proceed with translation, do the following lines
. only taking care not to disturbe the '~' + number sequence.
. If you decide to proceed with translation, do the following
. line only, taking care not to disturbe the '~' + number.
.
. --> " Tasks:~3 64 ~2total,~3 2 ~3running,~3 62
. --> " %%Cpu(s):~3 76.5 ~2user,~3 11.2 ~2system,~
@ -538,7 +536,6 @@ static void build_uniq_nsltab (void) {
. --> "Select ~1color~2 as number:\n"
. --> " 0~2 = black,~1 1~2 = red, ~1 2~2 = gree
. --> " 4~2 = blue, ~1 5~2 = magenta,~1 6~2 = cyan
.
. */
snprintf(buf, sizeof(buf), "%s", _(""
"Help for color mapping~2 - %s\n"
@ -590,7 +587,7 @@ static void build_uniq_nsltab (void) {
""));
Uniq_nlstab[STATE_lin2x5_fmt] = strdup(buf);
/* Translation Hint #3: Only the following abbreviations need be translated
/* Translation Hint: Only the following abbreviations need be translated
. us = user, sy = system, ni = nice, id = idle, wa = wait,
. hi hardware interrupt, si = software interrupt */
snprintf(buf, sizeof(buf), "%s", _("%%%s~3"
@ -598,7 +595,7 @@ static void build_uniq_nsltab (void) {
""));
Uniq_nlstab[STATE_lin2x6_fmt] = strdup(buf);
/* Translation Hint #4: Only the following abbreviations need be translated
/* Translation Hint: Only the following abbreviations need be translated
. us = user, sy = system, ni = nice, id = idle, wa = wait,
. hi hardware interrupt, si = software interrupt, st = steal time */
snprintf(buf, sizeof(buf), "%s", _("%%%s~3"
@ -606,7 +603,7 @@ static void build_uniq_nsltab (void) {
""));
Uniq_nlstab[STATE_lin2x7_fmt] = strdup(buf);
/* Translation Hint #5: Only the following need be translated
/* Translation Hint: Only the following need be translated
. abbreviations: Mem = physical memory/ram, Swap = the linux swap file
. words: total, used, free, buffers, cached */
snprintf(buf, sizeof(buf), "%s", _(""