diff options
Diffstat (limited to 'macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t')
-rw-r--r-- | macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t b/macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t index baf8ce7720..428ba5efe6 100644 --- a/macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t +++ b/macros/texinfo/texinfo/tp/maintain/lib/libintl-perl/tests/03dcpgettext_xs.t @@ -47,14 +47,27 @@ $bound_dir = bindtextdomain additional => $locale_dir; ok defined $bound_dir; ok (File::Spec->catdir ($locale_dir), File::Spec->catdir ($bound_dir)); +my $missing_locale = 'locale de_AT missing'; +my $setlocale = Locale::Messages::setlocale (POSIX::LC_ALL() => ''); +if ($setlocale && $setlocale =~ /(?:austria|at)/i) { + $missing_locale = ''; +} else { + require Locale::Util; + + $setlocale = Locale::Util::set_locale (POSIX::LC_ALL(), 'de', 'AT'); + if ($setlocale && $setlocale =~ /(?:austria|at)/i) { + $missing_locale = ''; + } +} + # make sure dgettext and dpgettext return diff values -ok 'Anzeigen', dcgettext (existing => 'View', LC_MESSAGES); -ok 'Ansicht', dcpgettext (existing => 'Which folder would you like to view?','View', LC_MESSAGES); -ok 'Not translated', dcpgettext (existing => 'none', 'Not translated', LC_MESSAGES); +skip $missing_locale, 'Anzeigen', dcgettext (existing => 'View', LC_MESSAGES); +skip $missing_locale, 'Ansicht', dcpgettext (existing => 'Which folder would you like to view?','View', LC_MESSAGES); +skip $missing_locale, 'Not translated', dcpgettext (existing => 'none', 'Not translated', LC_MESSAGES); -ok 'Ein weiterer Blick', dcpgettext (additional => 'Context', 'Another View', LC_MESSAGES); -ok 'Not translated', dcpgettext (additional => 'none', 'Not translated', LC_MESSAGES); -ok 'Ein weiterer Blick', dcpgettext (additional => 'Context', 'Another View', LC_MESSAGES); +skip $missing_locale, 'Eine andere Ansicht mit Kontext', dcpgettext (additional => 'Context', 'Another View', LC_MESSAGES); +skip $missing_locale, 'Not translated', dcpgettext (additional => 'none', 'Not translated', LC_MESSAGES); +skip $missing_locale, 'Eine andere Ansicht mit Kontext', dcpgettext (additional => 'Context', 'Another View', LC_MESSAGES); __END__ |