Subject: bug#26621: hint for translators is missing from POT file, but is opaque anyhow

From: Pádraig Brady <[email-masked]>
Date: Sun, 23 Apr 2017 21:11:38 -0700

On 23/04/17 08:17, Benno Schulenberg wrote:
> 
> Commit 2dab6cd3c2e18eb574b24e54fba86a33c80b6a27 changed
> the progress messages for dd, but in doing so separated
> the instruction/hint for translators from the call to
> ngettext().  For xgettext to pick up such comments, the
> comment must end of the line directly before the call.
> So the current POT file for coreutils does not contain
> this comment/hint/instruction.
> 
> Second, the comment seems to consist of two parts that
> appear to be unrelated.  So it would be better to split
> the text into two separate paragraphs.
> 
> Third, the second part of that comment reads like this:
> 
>      If one of
>      these formats A looks shorter on the screen than another format
>      B, then A's string length should be less than B's, and appending
>      strlen (B) - strlen (A) spaces to A should make it appear to be
>      at least as long as B.
> 
> I don't understand what it is trying to say.  Does it say
> that if, of those four strings, untranslated string A is
> shorter than untranslated string B, that then also the
> translation of string A must be shorter than the translation
> of string B?  If yes, then: 1) please reword, 2) why?, and
> 3) does the program blow up if not?  Or is this part of the
> comment not meant for translators at all?
> 
> Fourth, the first part of the comment begins with this:
> 
>      The instances of "s" in the following formats are
>      the SI symbol "s" (meaning second), and should not be translated.
> 
> Why should they not be translated?  In order to avoid problems
> with grammatical congruence in languages like Polish?  But for
> a language like Dutch I would accept the mild incongruence
> when the elapsed time is exactly x.1 seconds, which will be
> a rare occasion.  For all other numbers it will be much clearer
> to say "seconden" instead of just "s".  So I would suggest to
> change this part of the comment to:
> 
>      The instances of "s" in the next four strings are the SI
>      symbol "s" (meaning seconds).  It may be preferrable
>      to leave them untranslated, to avoid problems with
>      grammatical congruence.
> 
> Fifth (and this is the reason I arrived here), when using
> status=progress, the elapsed time that is printed is shown
> with four or five decimals.  1) Is the time measurement
> really this accurate?  2) Sometimes the last one or two
> or three decimals happen to be zero, and then they get
> truncated, making the progress message a bit shorter for
> one second.  It would be nicer to use a fixed number of
> decimals so that the message doesn't unnecessarily "jump".
> 
> Sixth, the format string uses %g, which means that the
> number of seconds will be displayed in exponential form
> when the number becomes very large.  Is that intentional?
> Wouldn't it be better to use %f?  I've played a bit with it,
> and I think %.1f is best, because also the other numbers
> in the progress message, when they are in decimal form,
> use a single decimal of precision.

Yes the different width numbers is not great.
This jumps around on my system:
  dd status=progress if=/dev/zero of=/dev/null bs=2M

Yes, http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-123-g2dab6cd
changed from %.6f to %g.

You can get some sense of the I/O overhead by looking
at the less significant decimal digits,
so I find the precision useful.

I'll change this back to .6f I think to avoid the jumping,
and fix up the TRANSLATOR notes.

cheers,
Pádraig