nixpkgs/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch
2019-05-03 22:40:04 +09:00

21 lines
722 B
Diff

diff --git a/src/translations.cpp b/src/translations.cpp
index 2585b7ec56..7bb005823c 100644
--- a/src/translations.cpp
+++ b/src/translations.cpp
@@ -195,14 +195,12 @@ void set_language()
auto env = getenv( "LANGUAGE" );
locale_dir = std::string( FILENAMES["base_path"] + "lang/mo/" + ( env ? env : "none" ) +
"/LC_MESSAGES/cataclysm-dda.mo" );
-#elif (defined __linux__ || (defined MACOSX && !defined TILES))
+#else
if( !FILENAMES["base_path"].empty() ) {
locale_dir = FILENAMES["base_path"] + "share/locale";
} else {
locale_dir = "lang/mo";
}
-#else
- locale_dir = "lang/mo";
#endif
const char *locale_dir_char = locale_dir.c_str();