summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a31d16)
raw | patch | inline | side by side (parent: 0a31d16)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Mon, 30 Aug 2010 15:18:15 +0000 (15:18 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:10:07 +0000 (07:10 +0000) |
Add a GETTEXT_ISO_LOCALE prerequisite to lib-gettext.sh, it'll be set
if we have an is_IS.ISO-8859-1 locale.
This is needed for an upcoming test that checks if our gettext library
can recode our UTF-8 po/is.po to is_IS.ISO-8859-1 on request.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
if we have an is_IS.ISO-8859-1 locale.
This is needed for an upcoming test that checks if our gettext library
can recode our UTF-8 po/is.po to is_IS.ISO-8859-1 on request.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
t/lib-gettext.sh | patch | blob | history |
diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
index ced175c53fc7ccb305a555f28b14fcb434b359f1..c9a079e8643ae18f9b76509e7162b77aeb76fad4 100644 (file)
--- a/t/lib-gettext.sh
+++ b/t/lib-gettext.sh
p
q
}')
- # Export it as an environmental variable so the t0202/test.pl Perl
- # test can use it too
- export is_IS_locale
+ # is_IS.ISO8859-1 on Solaris and FreeBSD, is_IS.iso88591 on Debian
+ is_IS_iso_locale=$(locale -a | sed -n '/^is_IS\.[iI][sS][oO]8859-*1$/{
+ p
+ q
+ }')
+
+ # Export them as an environmental variable so the t0202/test.pl
+ # Perl test can use it too
+ export is_IS_locale is_IS_iso_locale
if test -n "$is_IS_locale" &&
test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
else
say "# lib-gettext: No is_IS UTF-8 locale available"
fi
+
+ if test -n "$is_IS_iso_locale" &&
+ test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
+ then
+ # Some of the tests need the reference Icelandic locale
+ test_set_prereq GETTEXT_ISO_LOCALE
+
+ # Exporting for t0202/test.pl
+ GETTEXT_ISO_LOCALE=1
+ export GETTEXT_ISO_LOCALE
+ say "# lib-gettext: Found '$is_IS_iso_locale' as a is_IS ISO-8859-1 locale"
+ else
+ say "# lib-gettext: No is_IS ISO-8859-1 locale available"
+ fi
else
# Only run some tests when we don't have gettext support
test_set_prereq NO_GETTEXT