mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed translation in currentelement loops
This commit is contained in:
parent
ac70c7bd59
commit
ec68aeacf6
2
HISTORY
2
HISTORY
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user