diff --git a/HISTORY b/HISTORY index 6a699b8..aaaa838 100644 --- a/HISTORY +++ b/HISTORY @@ -337,3 +337,5 @@ Version 0.4.7 - fixed crash when deleting menuitem - fixed ecm time display - provide 10 last recordings in viewelement +- fixed translation in currentelement loops + diff --git a/libtemplate/templateview.c b/libtemplate/templateview.c index 869daf6..ac1c2e7 100644 --- a/libtemplate/templateview.c +++ b/libtemplate/templateview.c @@ -434,6 +434,21 @@ void cTemplateView::Translate(void) { func->SetTranslatedText(translation); } } + if (func->GetType() == ftLoop) { + cTemplateLoopFunction *funcsLoop = dynamic_cast(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); + } + } + } + } } } }