diff --git a/src/Tools/updatets.py b/src/Tools/updatets.py index 0c344e6f1f..97e14cff1f 100755 --- a/src/Tools/updatets.py +++ b/src/Tools/updatets.py @@ -153,6 +153,7 @@ def update_translation(entry): tsBasename = os.path.join(entry["tsdir"],entry["tsname"]) execline = [] + execline.append (f"touch dummy_cpp_file_for_lupdate.cpp") #lupdate requires at least one source file to process the UI files execline.append (f"{QMAKE} -project -o {project_filename}") execline.append (f"sed 's/.*<\/translation>/<\/translation>/g' {tsBasename}.ts > {tsBasename}.ts.temp") execline.append (f"touch {tsBasename}.ts") # In case it didn't get created above @@ -161,6 +162,7 @@ def update_translation(entry): execline.append (f"{PYLUPDATE} `find ./ -name \"*.py\"` -ts {tsBasename}py.ts {log_redirect}") execline.append (f"{LCONVERT} -i {tsBasename}py.ts {tsBasename}.ts -o {tsBasename}.ts {log_redirect}") execline.append (f"rm {tsBasename}py.ts") + execline.append (f"rm dummy_cpp_file_for_lupdate.cpp") print(f"Executing special commands in {entry['workingdir']}:") for line in execline: print (line)