From patchwork Fri May 31 18:01:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew DeVore X-Patchwork-Id: 10970625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D41C92A for ; Fri, 31 May 2019 18:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7212628D94 for ; Fri, 31 May 2019 18:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 655F228D9D; Fri, 31 May 2019 18:02:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0089B28D94 for ; Fri, 31 May 2019 18:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbfEaSCC (ORCPT ); Fri, 31 May 2019 14:02:02 -0400 Received: from resqmta-po-01v.sys.comcast.net ([96.114.154.160]:33656 "EHLO resqmta-po-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfEaSCC (ORCPT ); Fri, 31 May 2019 14:02:02 -0400 Received: from resomta-po-12v.sys.comcast.net ([96.114.154.236]) by resqmta-po-01v.sys.comcast.net with ESMTP id WkLLh6w21HkmzWlqrhCKOl; Fri, 31 May 2019 18:02:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20180828_2048; t=1559325721; bh=oZVqoL4RKSpo678tSWPn/15KADuCc42+nOh3WQtpzoI=; h=Received:Received:Date:From:To:Subject:Message-ID:MIME-Version: Content-Type; b=rWS6opT9EEZbwKb7mPSYt2V3CTh2a7WK0gSKTw93BzIXnGP9z/GO/CoCewwZ/W9e5 BXX4nAVpxAp2+7k3PCriialx6XHJlXvCG7uneY97RE4hcetsgAUkF4ZhyWoWfORV9X DFa81c4ipa/sTSkVVZ9evquv2J63TVK2mKW9HN5lIKjqtZ4AnuUHxDWQVppmupL9JJ YnrW+Fo7eStddduR10Dtcw7jd8Dlq3U69WWOYlJ6MSD4eFqDkpTGjI1wNU98pI8+gV CixYFUSWzGek8/f4yJe9vEyZMxn4vC0Fa1ArdINzuljYNKB1sBpOirWCyb1+ARpLC4 mFt46iEcH/G8A== Received: from comcast.net ([IPv6:2601:647:4b02:2491:a4f1:9a8c:7e29:36eb]) by resomta-po-12v.sys.comcast.net with ESMTPSA id WlqmhLjb7T55RWlqrhQdKs; Fri, 31 May 2019 18:02:01 +0000 X-Xfinity-VMeta: sc=0;st=legit Date: Fri, 31 May 2019 11:01:56 -0700 From: Matthew DeVore To: git@vger.kernel.org Cc: emilyshaffer@google.com Subject: [PATCH 1/1] list-objects-filter-options: error is localizeable Message-ID: <20190531180156.GA7633@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The "invalid filter-spec" message is user-facing and not a BUG, so make it localizeable. For reference, the message appears in this context: $ git rev-list --filter=blob:nonse --objects HEAD fatal: invalid filter-spec 'blob:nonse' Signed-off-by: Matthew DeVore --- list-objects-filter-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c index c0036f7378..e46ea467bc 100644 --- a/list-objects-filter-options.c +++ b/list-objects-filter-options.c @@ -81,21 +81,21 @@ static int gently_parse_list_objects_filter( filter_options->choice = LOFC_SPARSE_PATH; filter_options->sparse_path_value = strdup(v0); return 0; } /* * Please update _git_fetch() in git-completion.bash when you * add new filters */ if (errbuf) - strbuf_addf(errbuf, "invalid filter-spec '%s'", arg); + strbuf_addf(errbuf, _("invalid filter-spec '%s'"), arg); memset(filter_options, 0, sizeof(*filter_options)); return 1; } int parse_list_objects_filter(struct list_objects_filter_options *filter_options, const char *arg) { struct strbuf buf = STRBUF_INIT; if (gently_parse_list_objects_filter(filter_options, arg, &buf))