From: Alexander Shopov <ash@kambanaria.org>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Git List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
martin.agren@gmail.com, bmwill@google.com,
Jeff King <peff@peff.net>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
Xin Jiang <worldhello.net@gmail.com>
Subject: Re: [PATCH 1/1] Mark messages for translations
Date: Mon, 15 Jan 2018 10:16:27 +0100 [thread overview]
Message-ID: <CAP6f5M=HdjfQT+oO76sMfcD7zOfajeukh_VxSL_diqEsCWAYWw@mail.gmail.com> (raw)
In-Reply-To: <CAP6f5MnaMiqEMbGW_xj6X495jF=txpzeq+DEHOkz7VCg2D6D9w@mail.gmail.com>
And again, sigh:
>> const char git_usage_string[] =
....
>> const char git_more_info_string[] =
> It is not obvious to me where git_usage_string is looked up in the
> message catalog. It is used that way in builtin/help.c ..
I wanted to be consistent with the current state of the file. This is the
same way const char git_more_info_string[] is defined and initialized.
Having it this way saves the lookup on each usage I guess but any performance
gains will be negligible. Is there a convention?
> We have settled with lower-case letters at the beginning of error
> messages. (See Documentation/CodingGuidelines, "Error Messages".) You
> could fix that while you are touching die, die_errno, etc, messages.
Great! It will allow for further reduction in repetition of messages.
> I notice you change past tense to present tense in some cases.
I am reading this that messages SHOULD be in present tense (unless they MUST
be in past tense). This is good. Perhaps I will look at current messages and
then fix en masse (if there is sth to fix).
> I'm not a friend of geeky abbreviations like "chdir" or "cwd" in
> user-visible messages
I agree but I would also keep in mind that using the name of the function
may alllow to parametrize the messages like:
Cannot execute "%s" on "%s" - for example. Anyway this is not that important
for me. Will wait for other opinions.
>> - die_errno("fork failed");
>> + die_errno(_("fork failed"));
>> - die_errno("setsid failed");
>> + die_errno(_("setsid failed"));
> it is useful to have the function name in the message. Which rises the
> question:why translate them at all?
Why not eat the cake while having it - one can pass function name in a
message like: '"%s" failed'
Regards:
al_shopov
next prev parent reply other threads:[~2018-01-15 9:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 5:44 [PATCH 0/1] Marked end user messages for translation Alexander Shopov
2018-01-15 5:44 ` [PATCH 1/1] Mark messages for translations Alexander Shopov
2018-01-15 7:33 ` Johannes Sixt
[not found] ` <CAP6f5Mnn+pRdL6ihgwcqsTwyGy+EQfBbgPxkFmGLcWL-hJx-8g@mail.gmail.com>
[not found] ` <CAP6f5MnaMiqEMbGW_xj6X495jF=txpzeq+DEHOkz7VCg2D6D9w@mail.gmail.com>
2018-01-15 9:16 ` Alexander Shopov [this message]
2018-01-15 9:58 ` Eric Sunshine
2018-01-15 10:21 ` Duy Nguyen
2018-02-06 6:15 ` [PATCH 0/1] " Alexander Shopov
2018-02-06 6:15 ` [PATCH 1/1] " Alexander Shopov
2018-02-06 7:32 ` Eric Sunshine
2018-02-06 7:38 ` Jeff King
2018-02-09 7:44 ` [PATCH 0/1] " Alexander Shopov
2018-02-09 7:44 ` [PATCH 1/1] " Alexander Shopov
2018-02-09 18:20 ` Junio C Hamano
2018-02-09 19:15 ` Junio C Hamano
2018-02-09 19:30 ` Jeff King
2018-02-10 11:31 ` [PATCH] t0002: simplify error checking Jeff King
2018-02-12 15:03 ` [PATCH 1/1] Mark messages for translations Alexander Shopov
2018-02-12 15:15 ` Jeff King
2018-02-13 13:19 ` [PATCH 0/1] Mark messages for translation Alexander Shopov
2018-02-13 13:19 ` [PATCH 1/1] Mark messages for translations Alexander Shopov
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP6f5M=HdjfQT+oO76sMfcD7zOfajeukh_VxSL_diqEsCWAYWw@mail.gmail.com' \
--to=ash@kambanaria.org \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=martin.agren@gmail.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).