Tools: Fix translation extraction bug

This commit is contained in:
Chris Hennes
2022-04-21 10:55:08 -05:00
parent a4a0d11eca
commit ea5e9538da

View File

@@ -149,9 +149,8 @@ def update_translation(entry):
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} -r")
execline.append (f"sed 's/<translation.*>.*<\/translation>/<translation type=\"unfinished\"><\/translation>/g' {tsBasename}.ts > {tsBasename}.ts.temp")
execline.append (f"touch {tsBasename}.ts") # In case it didn't get created above
execline.append (f"{LUPDATE} {project_filename} -ts {tsBasename}.ts {log_redirect}")
execline.append (f"sed 's/<translation.*>.*<\/translation>/<translation type=\"unfinished\"><\/translation>/g' {tsBasename}.ts > {tsBasename}.ts.temp")
execline.append (f"mv {tsBasename}.ts.temp {tsBasename}.ts")
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}")