nixpkgs/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch
2020-04-04 13:46:26 -04:00

19 lines
632 B
Diff

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