mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 05:23:03 +01:00
Make LC_MESSAGES env var work as expected (get only filename) for an alternative messages file held in the INTL dir.
This commit is contained in:
parent
de8a30d57c
commit
991de0b29e
@ -91,7 +91,7 @@ static const char* LOGFILE = "firebird.log";
|
||||
#elif defined(WIN_NT)
|
||||
static const char* WORKFILE = "c:\\temp\\";
|
||||
static const char* MSG_FILE = "firebird.msg";
|
||||
static const char MSG_FILE_LANG[]= "intl/%.8s.msg";
|
||||
static const char MSG_FILE_LANG[]= "intl\\%.8s.msg";
|
||||
const int LOCALE_MAX = 6;
|
||||
static const char* LOGFILE = "firebird.log";
|
||||
#elif defined(VMS)
|
||||
|
@ -1484,6 +1484,13 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle,
|
||||
if (fb_utils::readenv("LC_MESSAGES", p))
|
||||
{
|
||||
sanitize(p);
|
||||
Firebird::string::size_type pos = p.find_last_of('/');
|
||||
if (pos == Firebird::string::npos)
|
||||
pos = p.find_last_of('\\');
|
||||
|
||||
if (pos != Firebird::string::npos)
|
||||
p.erase(0, pos + 1);
|
||||
|
||||
fb_utils::snprintf(translated_msg_file,
|
||||
sizeof(translated_msg_file), MSG_FILE_LANG, p.c_str());
|
||||
gds__prefix_msg(msg_file, translated_msg_file);
|
||||
@ -1493,6 +1500,7 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle,
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if (status) {
|
||||
/* Default to standard message file */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user