mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Correctly find the gmo files in build dir
The path to the lyx binary is either <build_dir>/bin (CMake) or <build_dir>/src (autotools). This means the po directory can be found one directory up.
This commit is contained in:
parent
90610dbc0d
commit
129d43c5c9
@ -169,15 +169,11 @@ void Package::set_temp_dir(FileName const & temp_dir) const
|
|||||||
FileName Package::messages_file(string const & c) const
|
FileName Package::messages_file(string const & c) const
|
||||||
{
|
{
|
||||||
if (in_build_dir_) {
|
if (in_build_dir_) {
|
||||||
FileName res = FileName(lyx_dir().absFileName() + "/po/"
|
FileName res = FileName(lyx_dir().absFileName() + "/../po/" + c + ".gmo");
|
||||||
+ c + ".gmo");
|
|
||||||
if (!res.isReadableFile())
|
if (!res.isReadableFile())
|
||||||
res = FileName(top_srcdir().absFileName() + "/po/"
|
res = FileName(top_srcdir().absFileName() + "/po/" + c + ".gmo");
|
||||||
+ c + ".gmo");
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
return FileName(locale_dir_.absFileName() + "/" + c
|
return FileName(locale_dir_.absFileName() + "/" + c
|
||||||
+ "/LC_MESSAGES/" PACKAGE ".mo");
|
+ "/LC_MESSAGES/" PACKAGE ".mo");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user