From 129d43c5c90c20d2b25d915e0db767ee98ba7655 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 2 Jun 2013 15:11:37 +0200 Subject: [PATCH] Correctly find the gmo files in build dir The path to the lyx binary is either /bin (CMake) or /src (autotools). This means the po directory can be found one directory up. --- src/support/Package.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/support/Package.cpp b/src/support/Package.cpp index 2e2aebd2f7..26870ed91b 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -169,15 +169,11 @@ void Package::set_temp_dir(FileName const & temp_dir) const 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 res; - } - else + } else return FileName(locale_dir_.absFileName() + "/" + c + "/LC_MESSAGES/" PACKAGE ".mo"); } -- 2.39.2