diff options
author | louis <louis.braun@gmx.de> | 2015-05-22 14:07:03 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-05-22 14:07:03 +0200 |
commit | ec68aeacf6d28e3f50409ba0a6575de981996cf9 (patch) | |
tree | 62ce7e34cbcf047bebf011b823c45e8f8db1ad4e | |
parent | ac70c7bd59a8a4840067aa7bba21e5ad8b3e36cd (diff) | |
download | vdr-plugin-skindesigner-ec68aeacf6d28e3f50409ba0a6575de981996cf9.tar.gz vdr-plugin-skindesigner-ec68aeacf6d28e3f50409ba0a6575de981996cf9.tar.bz2 |
fixed translation in currentelement loops
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | libtemplate/templateview.c | 15 |
2 files changed, 17 insertions, 0 deletions
@@ -337,3 +337,5 @@ Version 0.4.7 - fixed crash when deleting menuitem - fixed ecm time display - provide 10 last recordings in <lastrecordings> 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<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); + } + } + } + } } } } |