git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Add infrastructure for translating Git with gettext

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 14, 2010, 20:26 UTC
Message-ID
<AANLkTikuSTKbPkTrRtw4fvNUxlh32uhTlbq0g-q35dng@mail.gmail.com>
In-Reply-To
<1275846453-3805-2-git-send-email-avarab@gmail.com>
On Sun, Jun 6, 2010 at 17:47, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 6 quoted lines
> +# Try to use libintl's gettext.sh, or fall back to English if we
> +# can't.
> +. gettext.sh
> +
> +if test $? -eq 0 && test -z "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
> +then

It turns out that this doesn't actually work, and I can't find a workaround. In Bash and Solaris's /bin/sh this executes until "dies here". The problem is that I can't use the subshell trick, since the gettext.sh inclusion has to be done in the current shell (I checked, tests will fail).

    #!/bin/sh
    (. does-not-exist.sh)
    echo "A subshell made it! ret = $?"
    . does-not-exist.sh
  # dies here
    echo "A real shell made it! ret = $?"

Is there some clever shellscript trick that I'm missing, or will I have to resort to modifying the file at `make' time for this to work everywhere?

Previous: Ævar Arnfjörð BjarmasonNext: Thomas Rast
Message 13 of 16 in “Gettext support for Git”
  1. 0/2 Gettext support for GitÆvar Arnfjörð Bjarmason, Jun 6, 2010
  2. 1/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 6, 2010
  3. Jakub NarebskiJun 7, 2010
  4. Jeff EplerJun 7, 2010
  5. 1/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 7, 2010
  6. Junio C HamanoJun 14, 2010
  7. 0/2 Gettext support for GitÆvar Arnfjörð Bjarmason, Jun 15, 2010
  8. 1/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 15, 2010
  9. 2/2 Add initial C, Shell and Perl gettext translationsÆvar Arnfjörð Bjarmason, Jun 15, 2010
  10. 0/2 Gettext support for GitÆvar Arnfjörð Bjarmason, Jun 15, 2010
  11. 1/2 Add infrastructure for translating Git with gettextÆvar Arnfjörð Bjarmason, Jun 15, 2010
  12. 2/2 Add initial C, Shell and Perl gettext translationsÆvar Arnfjörð Bjarmason, Jun 15, 2010
  13. Ævar Arnfjörð BjarmasonJun 14, 2010
  14. Thomas RastJun 14, 2010
  15. Ævar Arnfjörð BjarmasonJun 14, 2010
  16. 2/2 Add initial C, Shell and Perl gettext translationsÆvar Arnfjörð Bjarmason, Jun 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.