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.
FileName Package::messages_file(string const & c) const
{
if (in_build_dir_) {
FileName Package::messages_file(string const & c) const
{
if (in_build_dir_) {
- FileName res = FileName(lyx_dir().absFileName() + "/po/"
- + c + ".gmo");
- if (!res.isReadableFile())
- res = FileName(top_srcdir().absFileName() + "/po/"
- + c + ".gmo");
-
+ FileName res = FileName(lyx_dir().absFileName() + "/../po/" + c + ".gmo");
+ if (!res.isReadableFile())
+ res = FileName(top_srcdir().absFileName() + "/po/" + c + ".gmo");
return FileName(locale_dir_.absFileName() + "/" + c
+ "/LC_MESSAGES/" PACKAGE ".mo");
}
return FileName(locale_dir_.absFileName() + "/" + c
+ "/LC_MESSAGES/" PACKAGE ".mo");
}