[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src nls.cc,1.2,1.3 prefs.cc,1.13,1.14
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src nls.cc,1.2,1.3 prefs.cc,1.13,1.14 |
Date: |
Sat, 13 Apr 2002 14:32:44 -0400 |
Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv14608
Modified Files:
nls.cc prefs.cc
Log Message:
INITIALIZE the default language from the respective environment variables
Index: nls.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/nls.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** nls.cc 13 Apr 2002 14:51:20 -0000 1.2
--- nls.cc 13 Apr 2002 18:32:41 -0000 1.3
***************
*** 31,35 ****
void nls::init (config &myconfig)
{
! if (myconfig.language != "en")
set_language (myconfig.language);
--- 31,35 ----
void nls::init (config &myconfig)
{
! if (myconfig.language != "en_EN")
set_language (myconfig.language);
Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** prefs.cc 13 Apr 2002 11:20:45 -0000 1.13
--- prefs.cc 13 Apr 2002 18:32:41 -0000 1.14
***************
*** 45,49 ****
datadir = DATA_DIR; // Directory containing the gamedata
screen_mode = 0; // Fullscreen
- language = "en"; // English
audio_channels = 1; // Stereo
audio_resolution = 1; // 16 bit
--- 45,48 ----
***************
*** 52,56 ****
// set the path to the adonthellrc file:
! adonthellrc = string (getenv ("HOME")) + "/.adonthell";
}
--- 51,61 ----
// set the path to the adonthellrc file:
! adonthellrc = string (getenv ("HOME")) + "/.adonthell";
!
! // try to figure out the language
! char *lang = getenv ("LANG");
! if (lang == NULL) lang = getenv ("LC_ALL");
! if (lang == NULL) lang = getenv ("LC_MESSAGES");
! language = lang ? lang : "en_EN";
}
***************
*** 259,263 ****
<< "# Screen-mode num\n# 0 Windowed mode\n"
<< "# 1 Fullscreen mode\n Screen-mode " << (int) screen_mode <<
"\n\n"
! << "# Language [country code]\n Language [" << language << "]\n\n"
<< "# Audio-channels num\n# 0 Mono\n# 1 Stereo\n"
<< " Audio-channels " << (int) audio_channels << "\n\n"
--- 264,268 ----
<< "# Screen-mode num\n# 0 Windowed mode\n"
<< "# 1 Fullscreen mode\n Screen-mode " << (int) screen_mode <<
"\n\n"
! << "# Language [locale]\n Language [" << language << "]\n\n"
<< "# Audio-channels num\n# 0 Mono\n# 1 Stereo\n"
<< " Audio-channels " << (int) audio_channels << "\n\n"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src nls.cc,1.2,1.3 prefs.cc,1.13,1.14,
Kai Sterker <address@hidden> <=