diff --git a/LunaTranslator/LunaTranslator/textsource/filetrans.py b/LunaTranslator/LunaTranslator/textsource/filetrans.py index aa885bf3..8c2118ed 100644 --- a/LunaTranslator/LunaTranslator/textsource/filetrans.py +++ b/LunaTranslator/LunaTranslator/textsource/filetrans.py @@ -168,11 +168,13 @@ class filetrans(basetext): return time.sleep(0.1) + lenfile = len(file) + class __p: def __del__(self): gobject.baseobject.settin_ui.progresssignal2.emit( "{}/{} {:0.2f}% ".format( - index + 1, len(file), 100 * (index + 1) / len(file) + index + 1, lenfile, 100 * (index + 1) / lenfile ), (index + 1), )