nixpkgs/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch

19 lines
632 B
Diff
Raw Normal View History

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