fixed translation in currentelement loops

This commit is contained in:
louis 2015-05-22 14:07:03 +02:00
parent ac70c7bd59
commit ec68aeacf6
2 changed files with 17 additions and 0 deletions

View File

@ -337,3 +337,5 @@ Version 0.4.7
- fixed crash when deleting menuitem - fixed crash when deleting menuitem
- fixed ecm time display - fixed ecm time display
- provide 10 last recordings in <lastrecordings> viewelement - provide 10 last recordings in <lastrecordings> viewelement
- fixed translation in currentelement loops

View File

@ -434,6 +434,21 @@ void cTemplateView::Translate(void) {
func->SetTranslatedText(translation); func->SetTranslatedText(translation);
} }
} }
if (func->GetType() == ftLoop) {
cTemplateLoopFunction *funcsLoop = dynamic_cast<cTemplateLoopFunction*>(func);
funcsLoop->InitIterator();
cTemplateFunction *loopFunc = NULL;
while(loopFunc = funcsLoop->GetNextFunction()) {
if (loopFunc->GetType() == ftDrawText || loopFunc->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
string text = loopFunc->GetParameter(ptText);
string translation;
bool translated = globals->Translate(text, translation);
if (translated) {
loopFunc->SetTranslatedText(translation);
}
}
}
}
} }
} }
} }