From ec68aeacf6d28e3f50409ba0a6575de981996cf9 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 22 May 2015 14:07:03 +0200 Subject: fixed translation in currentelement loops --- libtemplate/templateview.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libtemplate') 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); + } + } + } + } } } } -- cgit v1.2.3