emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69985: closed (Untranslatable message in src/chown-core.h:95)


From: GNU bug Tracking System
Subject: bug#69985: closed (Untranslatable message in src/chown-core.h:95)
Date: Sun, 24 Mar 2024 20:22:01 +0000

Your message dated Sun, 24 Mar 2024 20:19:13 +0000
with message-id <bf07871c-ea3a-c823-5d22-91c270f5cdbc@draigBrady.com>
and subject line Re: bug#69985: Untranslatable message in src/chown-core.h:95
has caused the debbugs.gnu.org bug report #69985,
regarding Untranslatable message in src/chown-core.h:95
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
69985: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69985
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Untranslatable message in src/chown-core.h:95 Date: Sun, 24 Mar 2024 17:57:47 +0100
Hi,

In src/chown-core.h:95 (coreutils-9.5-pre1), the following message is 
impossible to translate as it is created by concatenating string fragments:

static inline void
emit_from_option_description (bool user)
{
  printf (_("\
      --from=CURRENT_OWNER:CURRENT_GROUP\n\
                         change the %sgroup of each file only if\n\
                         its current owner and/or group match those 
specified\n\
                         here.  Either may be omitted, in which case a 
match\n\
                         is not required for the omitted attribute\n\
"), user ? "owner and/or " : "");
}

A translatable message must *never ever* be produced by concatenating 
substrings. Even if the substrings are themselves translated, there is no 
guaranties that the order of the words is the same in every language.

There is, unfortunately, no easy solution that save keystrokes. It must be 
written like this:

if (user)
  printf (_("\
      --from=CURRENT_OWNER:CURRENT_GROUP\n\
                         change the owner and/or group of each file only if\n\
                         its current owner and/or group match those 
specified\n\
                         here.  Either may be omitted, in which case a 
match\n\
                         is not required for the omitted attribute\n\
"));
else
  printf (_("\
      --from=CURRENT_OWNER:CURRENT_GROUP\n\
                         change the group of each file only if\n\
                         its current owner and/or group match those 
specified\n\
                         here.  Either may be omitted, in which case a 
match\n\
                         is not required for the omitted attribute\n\
"));

That make sense as both are distinct messages with different purposes.

I also suspect that the two messages should be even more different than they 
currently are. The message, when user is false, suspiciously contains one more 
"owner and/or" that is not removed and it says "Either may be omitted" when 
only the group is mentioned at the beginning of the message.

Frederic







--- End Message ---
--- Begin Message --- Subject: Re: bug#69985: Untranslatable message in src/chown-core.h:95 Date: Sun, 24 Mar 2024 20:19:13 +0000 User-agent: Mozilla Thunderbird
On 24/03/2024 16:57, Frédéric Marchal wrote:
Hi,

In src/chown-core.h:95 (coreutils-9.5-pre1), the following message is
impossible to translate as it is created by concatenating string fragments:

static inline void
emit_from_option_description (bool user)
{
   printf (_("\
       --from=CURRENT_OWNER:CURRENT_GROUP\n\
                          change the %sgroup of each file only if\n\
                          its current owner and/or group match those
specified\n\
                          here.  Either may be omitted, in which case a
match\n\
                          is not required for the omitted attribute\n\
"), user ? "owner and/or " : "");
}

A translatable message must *never ever* be produced by concatenating
substrings. Even if the substrings are themselves translated, there is no
guaranties that the order of the words is the same in every language.

There is, unfortunately, no easy solution that save keystrokes. It must be
written like this:

if (user)
   printf (_("\
       --from=CURRENT_OWNER:CURRENT_GROUP\n\
                          change the owner and/or group of each file only if\n\
                          its current owner and/or group match those
specified\n\
                          here.  Either may be omitted, in which case a
match\n\
                          is not required for the omitted attribute\n\
"));
else
   printf (_("\
       --from=CURRENT_OWNER:CURRENT_GROUP\n\
                          change the group of each file only if\n\
                          its current owner and/or group match those
specified\n\
                          here.  Either may be omitted, in which case a
match\n\
                          is not required for the omitted attribute\n\
"));

That make sense as both are distinct messages with different purposes.

I also suspect that the two messages should be even more different than they
currently are. The message, when user is false, suspiciously contains one more
"owner and/or" that is not removed and it says "Either may be omitted" when
only the group is mentioned at the beginning of the message.

The composed strings are accurate, but yes not translatable.
The attached simplifies the description a little,
so there is a single string to cater for both chown and chgrp.

Marking this as done.

thanks,
Pádraig

Attachment: coreutils-chown-translation-fix.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]