texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp texi2any.pl


From: Patrice Dumas
Subject: texinfo/tp texi2any.pl
Date: Tue, 20 Nov 2012 17:27:44 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/11/20 17:27:44

Modified files:
        tp             : texi2any.pl 

Log message:
        unset $ENV{"LANGUAGE"} if $ENV{"LC_ALL"} or $ENV{"LANGUAGE"} is C or 
POSIX.
        Report from John Darrington code adapted from Karl.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.148&r2=1.149

Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -b -r1.148 -r1.149
--- texi2any.pl 20 Nov 2012 03:17:00 -0000      1.148
+++ texi2any.pl 20 Nov 2012 17:27:44 -0000      1.149
@@ -154,6 +154,15 @@
   $pkgdatadir = File::Spec->catdir($datadir, 'texinfo');
 }
 
+# work-around in case libintl-perl do not do it itself
+# see 
http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable
+
+if ((defined($ENV{"LC_ALL"}) and $ENV{"LC_ALL"} =~ /^(C|POSIX)$/)
+     or (defined($ENV{"LANG"}) and $ENV{"LANG"} =~ /^(C|POSIX)$/)) {
+  delete $ENV{"LANGUAGE"} if defined($ENV{"LANGUAGE"});
+}
+
+
 #my $messages_textdomain = 'texinfo';
 my $messages_textdomain = '@PACKAGE@';
 $messages_textdomain = 'texinfo' if ($messages_textdomain eq '@'.'PACKAGE@');



reply via email to

[Prev in Thread] Current Thread [Next in Thread]