texinfo-commits
[Top][All Lists]
Advanced

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

[6196] Add search array in warning message on locales dir for document


From: Patrice Dumas
Subject: [6196] Add search array in warning message on locales dir for document
Date: Sun, 29 Mar 2015 19:52:13 +0000

Revision: 6196
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6196
Author:   pertusus
Date:     2015-03-29 19:52:12 +0000 (Sun, 29 Mar 2015)
Log Message:
-----------
Add search array in warning message on locales dir for document
messages not found.

Modified Paths:
--------------
    trunk/tp/texi2any.pl

Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl        2015-03-28 13:07:12 UTC (rev 6195)
+++ trunk/tp/texi2any.pl        2015-03-29 19:52:12 UTC (rev 6196)
@@ -213,17 +213,19 @@
 
 #my @search_locale_dirs = ("$datadir/locale", (map $_ . '/LocaleData', @INC),
 #  qw (/usr/share/locale /usr/local/share/locale));
+my @search_locale_dirs = ();
 
 if (($command_suffix eq '.pl' and !(defined($ENV{'TEXINFO_DEV_SOURCE'}) 
      and $ENV{'TEXINFO_DEV_SOURCE'} eq 0)) or $ENV{'TEXINFO_DEV_SOURCE'}) {
   # in case of build from the source directory, out of source build, 
   # this helps to locate the locales.
   my $locales_dir_found = 0;
-  foreach my $locales_dir (
+  @search_locale_dirs = (
     File::Spec->catdir($libsrcdir, $updir, 'LocaleData'),
-    File::Spec->catdir($curdir, 'LocaleData'), 
+    File::Spec->catdir($curdir, 'LocaleData'),
     File::Spec->catdir($updir, $updir, $updir, 'tp', 'LocaleData'),
-    File::Spec->catdir($updir, $updir, 'tp', 'LocaleData')) {
+    File::Spec->catdir($updir, $updir, 'tp', 'LocaleData'));
+  foreach my $locales_dir (@search_locale_dirs) {
     if (-d $locales_dir) {
       Locale::Messages::bindtextdomain ($strings_textdomain, $locales_dir);
       # the messages in this domain are not regenerated automatically, 
@@ -234,7 +236,7 @@
     }
   }
   if (!$locales_dir_found) {
-    warn "Locales dir for document strings not found\n";
+    warn "Locales dir for document strings not found (@search_locale_dirs)\n";
   }
 } else {
   Locale::Messages::bindtextdomain ($strings_textdomain, 




reply via email to

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