From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EF5DE1F44D for ; Sun, 31 Mar 2024 06:43:58 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=sasl header.b=rAcgSQtC; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 829551F2174B for ; Sun, 31 Mar 2024 06:43:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D356883D; Sun, 31 Mar 2024 06:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="rAcgSQtC" Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2F856FB2 for ; Sun, 31 Mar 2024 06:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.228.157.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711867427; cv=none; b=qh9B0xA9P1FOYMlw7iRDuLze7/bf4qdu18mcgbp1fc4UVqA6RVcq9ioz+ZTCMslS3rK1ul6U061l9pTpINWcqUfHTdvufuRd9nJSEilGl0pL3dAmf/exjauD1Z12pXSXOoGdaubi0Pac8GUZdGtMe/trlFA59j2Q2DeG99PVXg0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711867427; c=relaxed/simple; bh=CNddlyyZF0EclzMe2XgjW+PTc2beR7Y5PUnI0ex20Cw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=SNCUCrWhRZG2tLzgwiC8e3ueGgGEbKAq4temMCH4I/Vhxe8sPZizzaXuFRU9APgVebIRYO8gp0C/kyVutUsEmVua17Y0hZN2A90ot7ewAkr3WOUTx0Ffm8uriKwlDYcI56ajcKCAZ2gIm1MzCXNf89YVI03DP8I1Ln7yQzOWOcI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b=rAcgSQtC; arc=none smtp.client-ip=173.228.157.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 5A8D11A5A1; Sun, 31 Mar 2024 02:43:45 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=CNddlyyZF0Ec lzMe2XgjW+PTc2beR7Y5PUnI0ex20Cw=; b=rAcgSQtCboxuZF94UjuQmldwbI71 XzjRYTHOiTMqNNhfg+kJjcxQmLvvZnd+SV8DIPXe9qbs4kFgHsgnAqPDKs6puarf zu5t47SEGLBIL/HfR3hyn1AbZM7TNijs6zpaxmToBCpbm2a/uJqQtwvt9+4vsfKg 9HFOyU9HjC+JB04= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 536E51A5A0; Sun, 31 Mar 2024 02:43:45 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.125.139.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id D1DE31A59E; Sun, 31 Mar 2024 02:43:41 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: =?utf-8?Q?Rub=C3=A9n?= Justo Cc: git@vger.kernel.org Subject: Re: [PATCH] advice: omit trailing whitespace In-Reply-To: <4c8da56e-974b-474e-aefe-1ced5ee69327@gmail.com> (=?utf-8?Q?=22Rub=C3=A9n?= Justo"'s message of "Sun, 31 Mar 2024 08:17:30 +0200") References: <4c8da56e-974b-474e-aefe-1ced5ee69327@gmail.com> Date: Sat, 30 Mar 2024 23:43:40 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 03570EE2-EF2A-11EE-96C3-F515D2CDFF5E-77302942!pb-smtp20.pobox.com Content-Transfer-Encoding: quoted-printable Rub=C3=A9n Justo writes: >> > for (cp =3D buf.buf; *cp; cp =3D np) { >> > np =3D strchrnul(cp, '\n'); >> > - fprintf(stderr, _("%shint: %.*s%s\n"), >> > + fprintf(stderr, _("%shint:%s%.*s%s\n"), >> > advise_get_color(ADVICE_COLOR_HINT), >> > + (np =3D=3D cp) ? "" : " ", >> > (int)(np - cp), cp, >> > advise_get_color(ADVICE_COLOR_RESET)); > > Thinking again on this I wonder, while we're here, if we could go furth= er > and move the "hint" literal to the args, to ease the translation work: > - fprintf(stderr, _("%shint:%s%.*s%s\n"), > + fprintf(stderr, "%s%s:%s%.*s%s\n", > advise_get_color(ADVICE_COLOR_HINT), > + _("hint"), > (np =3D=3D cp) ? "" : " ", > (int)(np - cp), cp, > advise_get_color(ADVICE_COLOR_RESET)); It is not guaranteed that any and all languages want to use a colon immediately after translation of "hint"; the current message string with or without my patch allows translators adjust that part to the target language, but your version will force them to always use only a colon there. Is that an improvement? I somehow do not think so.