From: Alexander Shopov <ash@kambanaria.org>
To: git@vger.kernel.org, gitster@pobox.com, worldhello.net@gmail.com
Cc: Alexander Shopov <ash@kambanaria.org>
Subject: [[PATCH] [RESUBMIT] Consistency for substitution hints (i18n) 1/1] parse-options: use localized substitution hints
Date: Sun, 21 Apr 2024 20:14:05 +0200 [thread overview]
Message-ID: <20240421181408.82736-2-ash@kambanaria.org> (raw)
In-Reply-To: <20240421181408.82736-1-ash@kambanaria.org>
i18n: as translators choose substitution hints applicable
to their writing system, expose the ones in parse-options
for completeness
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
---
parse-options.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index 63a99dea6e..93712c6904 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -27,6 +27,7 @@ static void optbug(const struct option *opt, const char *reason)
}
static const char *optname(const struct option *opt, enum opt_parsed flags)
+// FIXME
{
static struct strbuf sb = STRBUF_INIT;
@@ -1055,17 +1056,27 @@ int parse_options(int argc, const char **argv,
}
static int usage_argh(const struct option *opts, FILE *outfile)
+/// Fixme
{
const char *s;
int literal = (opts->flags & PARSE_OPT_LITERAL_ARGHELP) ||
!opts->argh || !!strpbrk(opts->argh, "()<>[]|");
if (opts->flags & PARSE_OPT_OPTARG)
if (opts->long_name)
- s = literal ? "[=%s]" : "[=<%s>]";
+ s = literal ? "[=%s]" :
+ /* TRANSLATORS: keep as is unless you use hints for substitution other than `<>'
+ in which case use those */
+ _("[=<%s>]");
else
- s = literal ? "[%s]" : "[<%s>]";
+ s = literal ? "[%s]" :
+ /* TRANSLATORS: keep as is unless you use hints for substitution other than `<>'
+ in which case use those */
+ _("[<%s>]");
else
- s = literal ? " %s" : " <%s>";
+ s = literal ? " %s" :
+ /* TRANSLATORS: keep as is unless you use hints for substitution other than `<>'
+ in which case use those */
+ _(" <%s>");
return utf8_fprintf(outfile, s, opts->argh ? _(opts->argh) : _("..."));
}
--
2.44.0
prev parent reply other threads:[~2024-04-21 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 18:14 [[PATCH] [RESUBMIT] Consistency for substitution hints (i18n) 0/1] Alexander Shopov
2024-04-21 18:14 ` Alexander Shopov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240421181408.82736-2-ash@kambanaria.org \
--to=ash@kambanaria.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=worldhello.net@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).