updated: to the new Space API (pikotools)
changed: in locale txt files: the '(' and ')' characters should be escaped '\(' and '\)' or the whole string should be quoted added: when parsing locale files we print the line number where there was a syntax error git-svn-id: svn://ttmath.org/publicrep/winix/trunk@833 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -72,12 +72,19 @@ bool read = false;
|
||||
loc_parser.UTF8(input_as_utf8);
|
||||
loc_parser.SetSpace(space);
|
||||
|
||||
if( loc_parser.Parse(file_name) == PT::SpaceParser::ok )
|
||||
PT::SpaceParser::Status status = loc_parser.Parse(file_name);
|
||||
|
||||
if( status == PT::SpaceParser::ok )
|
||||
{
|
||||
read = true;
|
||||
AddLocale(lang);
|
||||
log << log3 << "Locale: read locale from: " << file_name << logend;
|
||||
}
|
||||
else
|
||||
if( status == PT::SpaceParser::syntax_error )
|
||||
{
|
||||
log << log1 << "Locale: syntax error in: " << file_name << " in line: " << loc_parser.line << logend;
|
||||
}
|
||||
|
||||
return read;
|
||||
}
|
||||
|
Reference in New Issue
Block a user