Made Celestia also look for localized version of files in the 'locale' directory.
This commit is contained in:
parent
c1aed42a56
commit
d47260538f
|
@ -75,8 +75,15 @@ string LocaleFilename(const string & filename)
|
||||||
{
|
{
|
||||||
localeFilename = filename + '_' + _("LANGUAGE");
|
localeFilename = filename + '_' + _("LANGUAGE");
|
||||||
}
|
}
|
||||||
if (stat(localeFilename.c_str(), &filestat) != 0) {
|
|
||||||
|
if (stat(localeFilename.c_str(), &filestat) != 0)
|
||||||
|
{
|
||||||
|
localeFilename = string("locale/") + localeFilename;
|
||||||
|
if (stat(localeFilename.c_str(), &filestat) != 0)
|
||||||
|
{
|
||||||
localeFilename = filename;
|
localeFilename = filename;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return localeFilename;
|
return localeFilename;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue