| 1 |
Author: Jordi Mallach <[email protected]> |
| 2 |
Description: define DATA_ROOT_DIR and use it to look for locale files |
| 3 |
If DATA_DIR was modified at build time, locale files won't be picked |
| 4 |
up, as they are installed into the localedir, not the full datadir |
| 5 |
(which is correct). Instead, modify the lookup path. |
| 6 |
Forwarded: yes |
| 7 |
|
| 8 |
Index: dolphin-emu/CMakeLists.txt |
| 9 |
=================================================================== |
| 10 |
--- dolphin-emu.orig/CMakeLists.txt |
| 11 |
+++ dolphin-emu/CMakeLists.txt |
| 12 |
@@ -178,7 +178,9 @@ set_property(GLOBAL PROPERTY USE_FOLDERS |
| 13 |
|
| 14 |
# Set up paths |
| 15 |
set(datadir ${CMAKE_INSTALL_FULL_DATADIR}/dolphin-emu CACHE PATH "datadir") |
| 16 |
+set(datarootdir ${CMAKE_INSTALL_FULL_DATAROOTDIR} CACHE PATH "datarootdir") |
| 17 |
add_definitions(-DDATA_DIR="${datadir}/") |
| 18 |
+add_definitions(-DDATA_ROOT_DIR="${datarootdir}/") |
| 19 |
|
| 20 |
if(CMAKE_SYSROOT) |
| 21 |
# If we should use a sysroot, tell pkg-config to search for packages in there, not on the host |
| 22 |
Index: dolphin-emu/Source/Core/DolphinQt/Translation.cpp |
| 23 |
=================================================================== |
| 24 |
--- dolphin-emu.orig/Source/Core/DolphinQt/Translation.cpp |
| 25 |
+++ dolphin-emu/Source/Core/DolphinQt/Translation.cpp |
| 26 |
@@ -284,7 +284,7 @@ static bool TryInstallTranslator(const Q |
| 27 |
#elif defined LINUX_LOCAL_DEV |
| 28 |
fmt::format("{}/../Source/Core/DolphinQt/{}/dolphin-emu.mo", File::GetExeDirectory(), lang) |
| 29 |
#else |
| 30 |
|
| 31 |
+ fmt::format("{}/locale/{}/LC_MESSAGES/dolphin-emu.mo", DATA_ROOT_DIR, lang) |
| 32 |
#endif |
| 33 |
; |
| 34 |
|