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:
2012-05-12 16:37:44 +00:00
parent ecc89d8596
commit 07e8e0c63c
4 changed files with 44 additions and 37 deletions

View File

@@ -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;
}