diff options
| author | Mai M <mathew1800@gmail.com> | 2022-04-08 20:51:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-08 20:51:36 -0400 |
| commit | 004e834c1424d533697d2c792d332109dec32ec0 (patch) | |
| tree | a34f6683bdfb2cca55139c6792fdb4f6291f1b21 /Source/Core | |
| parent | d4e4b5604728d313dcfd00b37a340dc0e400b7e6 (diff) | |
| parent | db4d81b9a89e67a2ec457692cfd2974b668e96dc (diff) | |
Merge pull request #10558 from shuffle2/lang
windows: simplify handling of gettext
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Translation.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index ef1434a19b..e08af734cc 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -466,11 +466,12 @@ if(GETTEXT_MSGFMT_EXECUTABLE) foreach(po ${LINGUAS}) get_filename_component(lang ${po} NAME_WE) if(WIN32) - set(mo_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}) + set(mo_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages) + set(mo ${mo_dir}/${lang}.mo) else() set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang}) + set(mo ${mo_dir}/dolphin-emu.mo) endif() - set(mo ${mo_dir}/dolphin-emu.mo) target_sources(dolphin-emu PRIVATE ${mo}) source_group("Localization\\\\Generated" FILES ${mo}) diff --git a/Source/Core/DolphinQt/Translation.cpp b/Source/Core/DolphinQt/Translation.cpp index e64eaa5984..c94638c389 100644 --- a/Source/Core/DolphinQt/Translation.cpp +++ b/Source/Core/DolphinQt/Translation.cpp @@ -275,7 +275,7 @@ static bool TryInstallTranslator(const QString& exact_language_code) std::string lang = qlang.toStdString(); auto filename = #if defined _WIN32 - File::GetExeDirectory() + StringFromFormat("/Languages/%s/dolphin-emu.mo", lang.c_str()) + File::GetExeDirectory() + StringFromFormat("/Languages/%s.mo", lang.c_str()) #elif defined __APPLE__ File::GetBundleDirectory() + StringFromFormat("/Contents/Resources/%s.lproj/dolphin-emu.mo", lang.c_str()) |
