]> git.lyx.org Git - features.git/commitdiff
more tweaks to i18nLibFileSearch
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Mar 2004 13:19:07 +0000 (13:19 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Mar 2004 13:19:07 +0000 (13:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8523 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/filetools.C

index 39415ee92654da36011b90d4cec9cee82d91b35c..5015e265293007133df84e12029bafb2bc5b44e5 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-24  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * filetools.C (i18nLibFileSearch): simplify the logic a bit
+
 2004-03-23  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * filetools.C (i18nLibFileSearch): fix the logic to match closely
index 05109c76b3808ae06659f201ee048a9413b4b5c9..5388a376f0f47868c1e3d98410febac957d4e170 100644 (file)
@@ -315,12 +315,8 @@ i18nLibFileSearch(string const & dir, string const & name,
           variable. But we don't use the value if the currently
           selected locale is the C locale. This is a GNU extension. */
        /* [Otherwise] We have to proceed with the POSIX methods of
-          looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems
-          this can be done by the `setlocale' function itself.  */
+          looking to `LC_ALL', `LC_xxx', and `LANG'. */
 
-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
-       lang = setlocale(LC_MESSAGES, NULL);
-#else
        string lang = GetEnv("LC_ALL");
        if (lang.empty()) {
                lang = GetEnv("LC_MESSAGES");
@@ -330,10 +326,9 @@ i18nLibFileSearch(string const & dir, string const & name,
                                lang = "C";
                }
        }
-#endif
 
        string const language = GetEnv("LANGUAGE");
-       if (lang != "C" && !language.empty())
+       if (lang != "C" && lang != "POSIX" && !language.empty())
                lang = language;
 
        lang = token(lang, '_', 0);