mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Refactor gettext init
Put the gettext init code in a macro and define it appropriately depending on whether gettext is actually available or not.
This commit is contained in:
@@ -1132,11 +1132,7 @@ int main(int argc, char *argv[])
|
||||
// Create user data directory
|
||||
fs::CreateDir(porting::path_userdata);
|
||||
|
||||
#ifdef LC_MESSAGES
|
||||
setlocale(LC_MESSAGES, "");
|
||||
bindtextdomain(PROJECT_NAME, (porting::path_userdata+"/locale").c_str());
|
||||
textdomain(PROJECT_NAME);
|
||||
#endif
|
||||
init_gettext((porting::path_userdata+"/locale").c_str());
|
||||
|
||||
// Initialize debug streams
|
||||
#ifdef RUN_IN_PLACE
|
||||
|
Reference in New Issue
Block a user