mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 14:22:40 -06:00
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:
parent
769b9b8073
commit
ee758c167a
1 changed files with 16 additions and 13 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue