From ee758c167a87891c34094d0773e2c309ee9dcd8f Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 16 May 2014 06:47:54 +0000 Subject: [PATCH] ide: Fixed issue with translation syncs #781 git-svn-id: svn://ultimatepp.org/upp/trunk@7386 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/t.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/uppsrc/ide/t.cpp b/uppsrc/ide/t.cpp index 5e3ed1fe5..7f64b7dcd 100644 --- a/uppsrc/ide/t.cpp +++ b/uppsrc/ide/t.cpp @@ -50,22 +50,25 @@ void LngParseCFile(const String& fn, VectorMap& 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& LngIndex()