nixpkgs-suyu/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch
Mitsuhiro Nakamura d77ce49c75 cataclysm-dda{,-git}: fix locale directory
PREFIX/share/locale should be searched for translations not only on Linux.
2018-01-22 22:37:02 +09:00

20 lines
636 B
Diff

diff --git a/src/translations.cpp b/src/translations.cpp
index 6520cfe..49f7b2c 100644
--- a/src/translations.cpp
+++ b/src/translations.cpp
@@ -72,15 +72,11 @@ void set_language(bool reload_options)
// Step 2. Bind to gettext domain.
const char *locale_dir;
-#ifdef __linux__
if (!FILENAMES["base_path"].empty()) {
locale_dir = std::string(FILENAMES["base_path"] + "share/locale").c_str();
} else {
locale_dir = "lang/mo";
}
-#else
- locale_dir = "lang/mo";
-#endif // __linux__
bindtextdomain("cataclysm-dda", locale_dir);
bind_textdomain_codeset("cataclysm-dda", "UTF-8");