ide: Fixed issue with translation syncs #781

git-svn-id: svn://ultimatepp.org/upp/trunk@7386 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-05-16 06:47:54 +00:00
parent 769b9b8073
commit ee758c167a

View file

@ -50,22 +50,25 @@ void LngParseCFile(const String& fn, VectorMap<String, LngEntry>& lng)
{
String data = LoadFile(fn);
CParser p(data, fn);
while(!p.IsEof()) {
if((p.Id("t_") || p.Id("tt_")) && p.Char('('))
if(p.IsString()) {
String tid = p.ReadString();
LngEntry& le = lng.GetAdd(tid);
le.text.GetAdd(LNG_enUS) = GetENUS(tid);
le.AddFileLine(p);
le.added = true;
if(!p.Char(')'))
try {
while(!p.IsEof()) {
if((p.Id("t_") || p.Id("tt_")) && p.Char('('))
if(p.IsString()) {
String tid = p.ReadString();
LngEntry& le = lng.GetAdd(tid);
le.text.GetAdd(LNG_enUS) = GetENUS(tid);
le.AddFileLine(p);
le.added = true;
if(!p.Char(')'))
t_error(p);
}
else
t_error(p);
}
else
t_error(p);
else
p.SkipTerm();
p.SkipTerm();
}
}
catch(CParser::Error) {}
}
const Index<int>& LngIndex()