From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 24 14:14:07 2024 Received: (at submit) by debbugs.gnu.org; 24 Mar 2024 18:14:07 +0000 Received: from localhost ([127.0.0.1]:47383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roSMA-0007A8-0d for submit@debbugs.gnu.org; Sun, 24 Mar 2024 14:14:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:55106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roRB9-0003iP-9G for submit@debbugs.gnu.org; Sun, 24 Mar 2024 12:58:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1roRAS-0007x8-U4 for bug-coreutils@gnu.org; Sun, 24 Mar 2024 12:57:56 -0400 Received: from msg-2.mailo.com ([213.182.54.12] helo=mailo.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1roRAQ-0005WN-6c for bug-coreutils@gnu.org; Sun, 24 Mar 2024 12:57:56 -0400 Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Sun, 24 Mar 2024 17:57:47 +0100 (CET) X-EA-Auth: taMTQDpIJn1F09SBN+FVv9wjqvuyxc8rrol6oKZe7N4hyDRCL1aC/28dfGNARuSjjK0+rzwhDqJjJspWUcpVIuNczuCMEznyU+rzB1DC62I= From: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Marchal To: bug-coreutils@gnu.org Subject: Untranslatable message in src/chown-core.h:95 Date: Sun, 24 Mar 2024 17:57:47 +0100 Message-ID: <1882492.tdWV9SEqCh@marchal> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: pass client-ip=213.182.54.12; envelope-from=fmarchal@perso.be; helo=mailo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 24 Mar 2024 14:14:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 24 16:21:10 2024 Received: (at 69985-done) by debbugs.gnu.org; 24 Mar 2024 20:21:10 +0000 Received: from localhost ([127.0.0.1]:47450 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roUL7-00020n-L1 for submit@debbugs.gnu.org; Sun, 24 Mar 2024 16:21:10 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:48375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1roUL1-000207-LP for 69985-done@debbugs.gnu.org; Sun, 24 Mar 2024 16:21:07 -0400 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41488eb6f9fso1384745e9.0 for <69985-done@debbugs.gnu.org>; Sun, 24 Mar 2024 13:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711311556; x=1711916356; darn=debbugs.gnu.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:from:to:cc:subject:date :message-id:reply-to; bh=6P4xL2/ZI0ahVCw6eiLvuFB58NSIgWSVI3pNXiMH7TU=; b=dA4uxZpLz9LvZIgsmWnwaLDxKamQmvjL6oIXiycLaqZPxdyWSZN8GXCD/cVfOK/gjM YIOgNW/KVf81D+U+NGoONvgeHK3+Hazcyq8VuzIlA4dOBUORnWfq6tmRye3XWsk9taNr JSMfDU16ZX1xLxrjGOZ0aigZLv0kDCT/My0InckXazeb7PsyPGWgnkiEtOVUj3oJRfh5 ioBv2JpeYKEmsZ0xS4sNMuGmIjsb71sTpZBCBLLeY0aJlBJyhp972h+nF59RjeLwnrZy 882+PyyqxOF/fbvkO/gtW8J6HAx+RW5jKuviguxKW3J9V4v7oGuYjlfbI8WTRpMaffDV frmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711311556; x=1711916356; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6P4xL2/ZI0ahVCw6eiLvuFB58NSIgWSVI3pNXiMH7TU=; b=rvTgHaHSG5qhubcxYiDurkTudvlodZ/C4r6HRaX+CAncIVw0b9oUpeUzIaGceteEOY o3V0G+WGD9EwWLWMCqZ8rua3lIizXGc3mEXxY24lpL9Z8r7Y9SyxmufyFyM3aIgCDpOT kVZfGADfMFZvOfaFec39CxukEWOeeEM5eW7CRtVPfIBT0iPetoJugesAyBOSzGJnrbva X9GQwS/e+agN+s0+xXGUQswQJT2JWiU3AoosdLr68ceiXEDnwLNpnyJvAdA9LHYP2Ix3 nm1dMFqjIgdlhnf/tSoaQEfJbFjIlzMtfNhBGsH8brvuf5dgATU4bGwk0CyZOGSO+F5k Ot4w== X-Forwarded-Encrypted: i=1; AJvYcCXouA/3iv8TBvjepkuAmNOYB2ptrkQpvH8zMzwkRf2UM4zRzGmj+tMEVbv58U4Z4REdLscvCotpfpuHSb1yBOFZtU+fHfkIIJPvew== X-Gm-Message-State: AOJu0YwgSs0m3mcT15Aqtb7TmsjDvR7sF+tvqiml2+z/2CjuPAz3EegH EL96E2BIXtBcPWioWEJhT3debbm7YlNYgHC8sYztAGYkXQzNULWN X-Google-Smtp-Source: AGHT+IEcerKWVb+qYeTwXrcMVna4AGa9sbKFKStn/OglrPPpjYwMCCeS8GJIxhGHtaaRswoj3lP+pA== X-Received: by 2002:a05:600c:2981:b0:414:69ae:bcfc with SMTP id r1-20020a05600c298100b0041469aebcfcmr3220084wmd.24.1711311555424; Sun, 24 Mar 2024 13:19:15 -0700 (PDT) Received: from [192.168.1.39] (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146]) by smtp.googlemail.com with ESMTPSA id k30-20020a05600c1c9e00b0041469869d11sm6084391wms.47.2024.03.24.13.19.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Mar 2024 13:19:14 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------LnUz0PoP8d440kur3i7fnHot" Message-ID: Date: Sun, 24 Mar 2024 20:19:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69985: Untranslatable message in src/chown-core.h:95 Content-Language: en-US To: =?UTF-8?B?RnLDqWTDqXJpYyBNYXJjaGFs?= , 69985-done@debbugs.gnu.org, Wenbin Lv References: <1882492.tdWV9SEqCh@marchal> From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: <1882492.tdWV9SEqCh@marchal> X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69985-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) This is a multi-part message in MIME format. --------------LnUz0PoP8d440kur3i7fnHot Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------LnUz0PoP8d440kur3i7fnHot Content-Type: text/x-patch; charset=UTF-8; name="coreutils-chown-translation-fix.patch" Content-Disposition: attachment; filename="coreutils-chown-translation-fix.patch" Content-Transfer-Encoding: base64 RnJvbSBiYWVhOTg4MWY3OTY5MDU1MmIwYWEzY2E2ODQ0YmJmNjRmYTZlNTVlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/ PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogU3VuLCAyNCBNYXIgMjAyNCAyMDoxMjo1MyAr MDAwMApTdWJqZWN0OiBbUEFUQ0hdIGRvYzogZml4IHRyYW5zbGF0aW9uIGlzc3VlIGluIGNo b3duL2NoZ3JwIGFtYWxnYW1hdGlvbgoKKiBzcmMvY2hvd24tY29yZS5oIChlbWl0X2Zyb21f b3B0aW9uX2Rlc2NyaXB0aW9uKTogVGhlIGNvbmRpdGlvbmFsCnN0cmluZyBjb21wb3NpdGlv biBoZXJlIGNhdXNlZCBpc3N1ZXMgZm9yIHRyYW5zbGF0b3JzLgpJbnN0ZWFkIG1vdmUgdG8g YSBtb3JlIGdlbmVyYWwgZGVzY3JpcHRpb24gLi4uCihzcmMvY2hvd24uYyAodXNhZ2UpOiAu Li4gaGVyZS4KRml4ZXMgaHR0cHM6Ly9idWdzLmdudS5vcmcvNjk5ODUKLS0tCiBzcmMvY2hv d24tY29yZS5oIHwgMTIgLS0tLS0tLS0t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LS1uby1wcmVzZXJ2ZS1yb290ICBkbyBub3QgdHJlYXQgJy8nIHNw ZWNpYWxseSAodGhlIGRlZmF1bHQpXG5cCiAgICAgICAtLXByZXNlcnZlLXJvb3QgICAgZmFp bCB0byBvcGVyYXRlIHJlY3Vyc2l2ZWx5IG9uICcvJ1xuXAotLSAKMi40NC4wCgo= --------------LnUz0PoP8d440kur3i7fnHot-- From unknown Sun Jun 22 11:41:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 22 Apr 2024 11:24:15 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator