From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Eric Sunshine <sunshine@sunshineco.com>, Git List <git@vger.kernel.org>
Subject: Re: [RFC PATCH 1/3] config --global --edit: create a template file if needed
Date: Fri, 25 Jul 2014 10:59:43 -0700 [thread overview]
Message-ID: <xmqqegx9720g.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpqtx65ctqm.fsf@anie.imag.fr> (Matthieu Moy's message of "Fri, 25 Jul 2014 18:01:53 +0200")
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>>> +static char *default_user_config()
>>> +{
>>> + struct strbuf buf = STRBUF_INIT;
>>> + strbuf_addf(&buf,
>>> + _("# This is Git's user-wide configuration file.\n"
>>> + "[core]\n"
>>> + "# Please, adapt and uncomment the following lines:\n"
>>> + "# user = %s\n"
>>> + "# email = %s\n"),
>>
>> "[core]", "user =", "email =" should not be translated. Would it make
>> sense to keep these outside of _()?
>
> I would say no, as the code and the string to translate would be much
> less readable without core, user and email inline.
>
> Were you suggesting stg like
>
> _("# This is Git's user-wide configuration file.\n"
> "[%s]\n"
> "# Please, adapt and uncomment the following lines:\n"
> "# %s = %s\n"
> "# %s = %s\n"),
> "core", "name", ..., "email", ...
>
> ?
;-) That is a clever way to say what my first reaction to Eric's
comment was, which was to have this as multiple strbuf_addf().
Technically speaking, the '#' at the beginning of lines must not be
translated, either, and if that goes without saying, i.e. if the
translators know well enough not to change them, then I can be
persuaded that we can expect that translators know well enough not
to touch the three substrings Eric pointed out.
So, the original message may be fine as-is.
>>> + if (fd) {
>>> + char *content = default_user_config();
>>> + write_str_in_full(fd, content);
>>
>> close(fd);
>
> Indeed.
>
>>> + free(content);
>>> + }
>>> + else if (errno != EEXIST)
>>> + die_errno(_("Cannot create configuration file %s"), config_file);
>>
>> Other error messages in this file (including those just above this
>> block) begin with a lowercase letter.
>
> Applied.
>
> Thanks,
next prev parent reply other threads:[~2014-07-25 18:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 13:44 [RFC PATCH 1/3] config --global --edit: create a template file if needed Matthieu Moy
2014-07-25 13:44 ` [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter Matthieu Moy
2014-07-25 13:57 ` Tanay Abhra
2014-07-25 18:06 ` Junio C Hamano
2014-07-25 18:16 ` Matthieu Moy
2014-07-25 13:44 ` [RFC PATCH 3/3] commit: advertize config --global --edit on guessed identity Matthieu Moy
2014-07-25 15:40 ` Eric Sunshine
2014-07-25 15:37 ` [RFC PATCH 1/3] config --global --edit: create a template file if needed Eric Sunshine
2014-07-25 16:01 ` Matthieu Moy
2014-07-25 17:51 ` Eric Sunshine
2014-07-25 17:59 ` Junio C Hamano [this message]
2014-07-25 17:36 ` Junio C Hamano
2014-07-25 17:52 ` Matthieu Moy
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=xmqqegx9720g.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.