mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
more tweaks to i18nLibFileSearch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8523 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
54cdd0291a
commit
af6712f963
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user