From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()
Date: Mon, 11 Apr 2011 00:43:52 +0200 [thread overview]
Message-ID: <BANLkTimjkuvOc4mS4hfC7PiGWrRAb_2uog@mail.gmail.com> (raw)
In-Reply-To: <7voc4ncg0l.fsf@alter.siamese.dyndns.org>
On Sun, Apr 3, 2011 at 21:05, Junio C Hamano <gitster@pobox.com> wrote:
> Perhaps it is not an issue in real life; after all eval_gettext interface
> is not something you invented in 5 minutes without thinking deeply, but is
> what you plan to use from outside codebase that presumably has seen a wide
> use in the field, and it may be just that I am worried too much about an
> implausible corner case, but I thought I should bring it up.
It's a corner case, but if we run into it we can easily solve it like
this:
#!/bin/sh
. gettext.sh
HOME=/home/junio
path='$HOME/.gitconfig'
var=core.i18n
(
export HOME var ;# no need for HOME, but just an illustration
# TRANSLATORS: $path will be "$HOME/.gitconfig"
eval_gettext 'Look at $path and find definition of $var variable.'; echo
)
Which results in:
$ sh /tmp/foo.sh
Look at $HOME/.gitconfig and find definition of core.i18n variable.
next prev parent reply other threads:[~2011-04-10 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 16:42 [PATCH 0/2] i18n: Shell script translation infrastructure Ævar Arnfjörð Bjarmason
2011-04-03 16:42 ` [PATCH 1/2] git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext() Ævar Arnfjörð Bjarmason
2011-04-03 19:05 ` Junio C Hamano
2011-04-10 22:43 ` Ævar Arnfjörð Bjarmason [this message]
2011-04-03 16:42 ` [PATCH 2/2] git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers Ævar Arnfjörð Bjarmason
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=BANLkTimjkuvOc4mS4hfC7PiGWrRAb_2uog@mail.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).