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

Re: Re*: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX

From
Torsten Bögershausen <tboegi@web.de>
Date
Mar 13, 2012, 19:19 UTC
Message-ID
<4F5F9DD1.50907@web.de>
In-Reply-To
<7vmx7lpl5a.fsf@alter.siamese.dyndns.org>
Show 26 quoted lines
> -- >8 --
> Subject: i18n: fix auto detection of gettext scheme for shell scripts
>
> A new code added by ad17ea7 (add a Makefile switch to avoid gettext
> translation in shell scripts, 2012-01-23) tried to optionally force
> a gettext scheme to "fallthrough", but ended up forcing it to everybody.
>
> Signed-off-by: Junio C Hamano<gitster@pobox.com>
> ---
>   git-sh-i18n.sh |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
> index d5fae99..6a27f68 100644
> --- a/git-sh-i18n.sh
> +++ b/git-sh-i18n.sh
> @@ -21,7 +21,7 @@ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
>   if test -n "@@USE_GETTEXT_SCHEME@@"
>   then
>   	GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@"
> -elif test -n "@@USE_FALLTHROUGH_GETTEXT_SCHEME@@$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
> +elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
>   then
>   	: no probing necessary
>   elif test -n "$GIT_GETTEXT_POISON"
> --

Thanks for the patch. Here are the results of t0204: a) Suse 12.1 # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale # lib-gettext: No is_IS ISO-8859-1 locale available ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes ok 3 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic (missing GETTEXT_ISO_LOCALE) ok 4 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes (missing GETTEXT_ISO_LOCALE) ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8 ok 6 # skip gettext: Fetching a UTF-8 msgid -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE) ok 7 - gettext.c: git init UTF-8 -> UTF-8 ok 8 # skip gettext.c: git init UTF-8 -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE) # passed all 8 test(s) 1..8 ==================== b) Ubuntu 10.4: tb@maxi:~/projects/git/tb/t$ ./t0204-gettext-reencode-sanity.sh # lib-gettext: No is_IS UTF-8 locale available # lib-gettext: No is_IS ISO-8859-1 locale available ok 1 # skip gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic (missing GETTEXT_LOCALE) ok 2 # skip gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes (missing GETTEXT_LOCALE) ok 3 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic (missing GETTEXT_ISO_LOCALE) ok 4 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes (missing GETTEXT_ISO_LOCALE) ok 5 # skip gettext: Fetching a UTF-8 msgid -> UTF-8 (missing GETTEXT_LOCALE) ok 6 # skip gettext: Fetching a UTF-8 msgid -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE) ok 7 # skip gettext.c: git init UTF-8 -> UTF-8 (missing GETTEXT_LOCALE) ok 8 # skip gettext.c: git init UTF-8 -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE) # passed all 8 test(s) 1..8 ============== c) Mac OS # lib-gettext: Found 'is_IS.UTF-8' as an is_IS UTF-8 locale # lib-gettext: Found 'is_IS.ISO8859-1' as an is_IS ISO-8859-1 locale ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes ok 3 - gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic not ok - 4 gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes # # LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Old English Runes" >runes && # # if grep "^TEST: Old English Runes$" runes # then # say "Your system can not handle this complexity and returns the string as-is" # else # # Both Solaris and GNU libintl will return this stream of # # question marks, so it is s probably portable enough # printf "TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????" >runes-expect && # test_cmp runes-expect runes # fi # ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8 ok 6 - gettext: Fetching a UTF-8 msgid -> ISO-8859-1 ok 7 - gettext.c: git init UTF-8 -> UTF-8 ok 8 - gettext.c: git init UTF-8 -> ISO-8859-1 # failed 1 among 8 test(s) 1..8 ============== (But that was expected, wasn't it? I added your original t0204 patch on top of that, and here we go: ============== # lib-gettext: Found 'is_IS.UTF-8' as an is_IS UTF-8 locale # lib-gettext: Found 'is_IS.ISO8859-1' as an is_IS ISO-8859-1 locale ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes ok 3 - gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic ok 4 - gettext: impossible ISO-8859-1 output ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8 ok 6 - gettext: Fetching a UTF-8 msgid -> ISO-8859-1 ok 7 - gettext.c: git init UTF-8 -> UTF-8 ok 8 - gettext.c: git init UTF-8 -> ISO-8859-1 # passed all 8 test(s) 1..8 /Torsten

Previous: Junio C HamanoNext: Junio C Hamano
Message 23 of 25 in “Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX”
  1. Change t0204-gettext-reencode-sanity.sh to pass under Mac OSXTorsten Bögershausen, Mar 5, 2012
  2. Junio C HamanoMar 5, 2012
  3. Ævar Arnfjörð BjarmasonMar 7, 2012
  4. Junio C HamanoMar 7, 2012
  5. Ævar Arnfjörð BjarmasonMar 7, 2012
  6. Junio C HamanoMar 7, 2012
  7. Ævar Arnfjörð BjarmasonMar 7, 2012
  8. Junio C HamanoMar 7, 2012
  9. Junio C HamanoMar 7, 2012
  10. Torsten BögershausenMar 8, 2012
  11. Johannes SixtMar 8, 2012
  12. Torsten BögershausenMar 8, 2012
  13. Torsten BögershausenMar 8, 2012
  14. Re*: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSXJunio C Hamano, Mar 9, 2012
  15. Torsten BögershausenMar 10, 2012
  16. Junio C HamanoMar 11, 2012
  17. Torsten BögershausenMar 11, 2012
  18. Junio C HamanoMar 11, 2012
  19. Torsten BögershausenMar 11, 2012
  20. Junio C HamanoMar 11, 2012
  21. Torsten BögershausenMar 12, 2012
  22. Junio C HamanoMar 12, 2012
  23. Torsten BögershausenMar 13, 2012
  24. Junio C HamanoMar 13, 2012
  25. Junio C HamanoMar 12, 2012

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.