Enhancement - StringTable integration
- StringTable now integrated into Context. - Docs updated for new "locale" configuration variable. - StringTable unit tests implemented.
This commit is contained in:
@@ -95,16 +95,21 @@ void Context::initialize (int argc, char** argv)
|
||||
config.set ("color", "off");
|
||||
}
|
||||
|
||||
// Load appropriate stringtable as soon after the config file as possible, to
|
||||
// allow all subsequent messages to be localizable.
|
||||
std::string location = expandPath (config.get ("data.location"));
|
||||
std::string locale = config.get ("locale");
|
||||
if (locale != "")
|
||||
stringtable.load (location + "/strings." + locale);
|
||||
|
||||
// TODO Handle "--version, -v" right here.
|
||||
|
||||
// init TDB.
|
||||
std::string location = config.get ("data.location");
|
||||
std::vector <std::string> all;
|
||||
split (all, location, ',');
|
||||
foreach (path, all)
|
||||
tdb.location (expandPath (*path));
|
||||
|
||||
// TODO Load appropriate stringtable.
|
||||
// TODO Load pending.data.
|
||||
// TODO Load completed.data.
|
||||
// TODO Load deleted.data.
|
||||
|
||||
Reference in New Issue
Block a user